db->createCommand($sql)->execute(); if(!empty($res)) return ''; $sql="CREATE TABLE `qimall_addons_store_reserve_setting` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `mall_id` int(10) unsigned NOT NULL COMMENT '商城ID', `store_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '门店id', `setting` text COMMENT '', `status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态0禁用,-1删除,1正常', `created_at` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE, KEY `store_id` (`store_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='预约门店独立设置';"; $this->execute($sql); } /** * {@inheritdoc} */ public function safeDown() { echo "M240929021221QimallAddonsStoreReserveSetting cannot be reverted.\n"; return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M240929021221QimallAddonsStoreReserveSetting cannot be reverted.\n"; return false; } */ }