db->createCommand($sql)->execute(); if(!empty($res)) return ''; $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 "M250425182123AddReservationServiceStoreSecondaryCard cannot be reverted.\n"; return false; } }