| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace addons\SecondaryCard\console\migrations;
- use yii\db\Migration;
- /**
- * Class M241228013756SecondaryCard
- */
- class M241228013756SecondaryCard extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql="CREATE TABLE `qimall_addons_reservation_service_store_secondary_card` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `mall_id` int(11) unsigned NOT NULL COMMENT '商城ID',
- `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '技师用户ID',
- `store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店id',
- `secondary_card_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '绑定的次卡ID',
- `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态0禁用,-1删除,1正常',
- `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 `user_id` (`user_id`) USING BTREE,
- KEY `store_id` (`store_id`) USING BTREE,
- KEY `secondary_card_id` (`secondary_card_id`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='技师绑定的o2o门店次卡';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M241228013756SecondaryCard cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M241228013756SecondaryCard cannot be reverted.\n";
- return false;
- }
- */
- }
|