| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace addons\Store\console\migrations;
- use addons\Store\common\models\StoreAdmin;
- use yii\db\Migration;
- /**
- * Class M241120090530createQimallAddonsStoreAssociatedUser
- */
- class M241120090530createQimallAddonsStoreAssociatedUser extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("CREATE TABLE `qimall_addons_store_associated_user` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `mall_id` int(11) NOT NULL DEFAULT '0' COMMENT '商城ID',
- `store_id` int(11) NOT NULL DEFAULT '0' COMMENT '门店id',
- `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
- `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态[0禁用 1启用 -1删除]',
- `created_at` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
- `updated_at` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
- PRIMARY KEY (`id`),
- KEY `idx_mall_store_user` (`mall_id`,`store_id`,`user_id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='门店关联会员';");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M241120090530createQimallAddonsStoreAssociatedUser cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M241120090530createQimallAddonsStoreAssociatedUser cannot be reverted.\n";
- return false;
- }
- */
- }
|