execute($sql); $sql = "CREATE TABLE `qimall_addons_cloud_stock_import_level_fail_log` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `mall_id` int(11) NOT NULL DEFAULT 0 COMMENT '商城ID', `log_id` int(11) NOT NULL DEFAULT 0 COMMENT '导入批次id', `user_id` int(11) NULL DEFAULT NULL, `level` int(11) NOT NULL COMMENT '导入等级的id', `reason` varchar(255) NOT NULL DEFAULT '' COMMENT '失败原因', `extra` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '导入的内容', `updated_at` int(11) NOT NULL DEFAULT 0, `created_at` int(11) NOT NULL DEFAULT 0 COMMENT '添加时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8 ROW_FORMAT = Dynamic COMMENT = '代理等级导入失败日志';"; $this->execute($sql); $sql = "CREATE TABLE `qimall_addons_cloud_stock_import_stock_fail_log` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `mall_id` int(11) NOT NULL DEFAULT 0 COMMENT '商城ID', `log_id` int(11) NOT NULL DEFAULT 0 COMMENT '导入批次id', `user_id` int(11) NULL DEFAULT NULL, `goods_id` int(11) NOT NULL DEFAULT 0 COMMENT '导入的商品的id', `reason` varchar(255) NOT NULL DEFAULT '' COMMENT '失败原因', `extra` text NULL COMMENT '导入的内容', `updated_at` int(11) NOT NULL DEFAULT 0, `created_at` int(11) NOT NULL DEFAULT 0 COMMENT '添加时间', `num` int(11) NOT NULL DEFAULT 0 COMMENT '库存数量', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8 COMMENT = '库存导入失败日志' ROW_FORMAT = Dynamic; "; $this->execute($sql); $sql = "CREATE TABLE `qimall_addons_cloud_stock_import_stock_log` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `mall_id` int(11) NOT NULL DEFAULT 0 COMMENT '商城ID', `counts` int(11) NOT NULL DEFAULT 0 COMMENT '导入数量', `success_counts` int(11) NOT NULL DEFAULT 0 COMMENT '导入成功数量', `fail_counts` int(11) NOT NULL DEFAULT 0 COMMENT '导入失败数量', `upload_file` varchar(255) NOT NULL DEFAULT '' COMMENT '上传文件存在路径', `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态:1:导入成功;2导入失败;3:导入中;4:导入中断', `updated_at` int(11) NOT NULL DEFAULT 0, `created_at` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8 COMMENT = '会员导入日志表' ROW_FORMAT = Dynamic; "; $this->execute($sql); } /** * {@inheritdoc} */ public function safeDown() { echo "M240429132301CreateTableQimallAddonsCloudStockImportLevelLog cannot be reverted.\n"; return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M240417082535CreateTableAgentApply cannot be reverted.\n"; return false; } */ }