| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace addons\Agent\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240417082535CreateTableAgentApply
- */
- class M240417082535CreateTableAgentApply extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $createSql = "CREATE TABLE `qimall_addons_agent_apply` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `mall_id` int(11) NOT NULL,
- `user_id` int(11) NOT NULL,
- `mobile` varchar(45) NOT NULL,
- `name` varchar(45) NOT NULL,
- `remark` varchar(1000) NOT NULL DEFAULT '' COMMENT '申请备注',
- `check_remark` varchar(1000) NOT NULL DEFAULT '' COMMENT '审核备注',
- `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
- `check_status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '0待审核1审核通过2不通过',
- `created_at` int(11) NOT NULL DEFAULT '0',
- `updated_at` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `idx_mall_user` (`mall_id`,`user_id`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='渠道分红审核';";
- $this->execute($createSql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240417082535CreateTableAgentApply cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240417082535CreateTableAgentApply cannot be reverted.\n";
- return false;
- }
- */
- }
|