db->createCommand($sql)->execute(); if(!empty($res)) return ''; $sql = " CREATE TABLE `qimall_addons_store_reserve_technician_scheduling` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `mall_id` int(11) NOT NULL COMMENT '商城id', `store_id` int(11) NOT NULL COMMENT '门店id', `user_id` int(11) DEFAULT NULL COMMENT 'user_id', `date_time` int(11) DEFAULT NULL COMMENT '日期', `is_all_day` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否全天(0:不是,1:是)', `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态(-1:删除,0:禁用,1:启用)', `created_at` bigint(20) DEFAULT NULL COMMENT '创建时间', `updated_at` bigint(20) DEFAULT NULL COMMENT '修改时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; "; $this->execute($sql); } /** * {@inheritdoc} */ public function safeDown() { echo "M241007063133QimallAddonsStoreReserveTechnicianScheduling cannot be reverted.\n"; return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M241007063133QimallAddonsStoreReserveTechnicianScheduling cannot be reverted.\n"; return false; } */ }