db->createCommand($sql)->execute(); if (!empty($res)) return ''; $sql = "CREATE TABLE `qimall_addons_store_collect` ( `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(4) DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]', `created_at` int(11) NOT NULL DEFAULT '0', `updated_at` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='门店收藏表';"; $this->execute($sql); } /** * {@inheritdoc} */ public function safeDown() { echo "M230216091033AddQimallAddonsStoreCollect cannot be reverted.\n"; return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M230216091033AddQimallAddonsStoreCollect cannot be reverted.\n"; return false; } */ }