| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- namespace addons\Agent\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240417073614AddTableAgentCancelLog
- */
- class M240417073614AddTableAgentCancelLog extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "CREATE TABLE `qimall_addons_agent_cancel_log` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `mall_id` int(11) unsigned NOT NULL DEFAULT '0',
- `source_table` varchar(255) NOT NULL DEFAULT '' COMMENT '来源表',
- `source_table_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作来源业务id',
- `from_type` varchar(50) NOT NULL DEFAULT '' COMMENT '来源类型',
- `order_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '记录时订单状态[0:支付;1:完成]',
- `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态,-1:失效,1:正常,2:冻结',
- `created_at` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间戳',
- `updated_at` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间戳',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `idx_mall_user` (`mall_id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='代理分红记录表';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240417073614AddTableAgentCancelLog cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240417073614AddTableAgentCancelLog cannot be reverted.\n";
- return false;
- }
- */
- }
|