db->createCommand($sql)->execute(); if (empty($res)) { $sql = " CREATE TABLE `qimall_addons_store_reserve_technician_scheduling_time` ( `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', `sid` int(11) DEFAULT NULL COMMENT '排期id', `start_time` int(11) DEFAULT NULL COMMENT '开始时间', `end_time` int(11) DEFAULT NULL COMMENT '结束时间', `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 "M241007063457QimallAddonsStoreReserveTechnicianSchedulingTime cannot be reverted.\n"; return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M241007063457QimallAddonsStoreReserveTechnicianSchedulingTime cannot be reverted.\n"; return false; } */ }