diff --git a/1781687373_create_category.up.sql b/1781687373_create_category.up.sql index fb224d8..cde88f3 100644 --- a/1781687373_create_category.up.sql +++ b/1781687373_create_category.up.sql @@ -5,6 +5,6 @@ CREATE TABLE `category` ( `description` VARCHAR(255) COMMENT '分类描述', `sort_order` INT DEFAULT 0 COMMENT '排序权重(数字越小越靠前)', `is_active` TINYINT DEFAULT 1 COMMENT '是否启用:1-禁用 2-启用', - `created_at` TIMESTAMP DEFAULT NULL COMMENT '创建时间', - `updated_at` TIMESTAMP DEFAULT NULL COMMENT '更新时间' + `created_at` TIMESTAMP NULL DEFAULT NULL COMMENT '创建时间', + `updated_at` TIMESTAMP NULL DEFAULT NULL COMMENT '更新时间' ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '课程系列分类表'; \ No newline at end of file diff --git a/1781687840_create_course_series.up.sql b/1781687840_create_course_series.up.sql index d57cb22..8022ae9 100644 --- a/1781687840_create_course_series.up.sql +++ b/1781687840_create_course_series.up.sql @@ -6,6 +6,6 @@ CREATE TABLE `course_series` ( `cover_image` VARCHAR(500) COMMENT '系列封面图URL', `total_months` INT DEFAULT 10 COMMENT '总月数(固定10个月)', `is_active` TINYINT DEFAULT 1 COMMENT '是否启用:1-禁用 2-启用', - `created_at` TIMESTAMP DEFAULT NULL COMMENT '创建时间', - `updated_at` TIMESTAMP DEFAULT NULL COMMENT '更新时间' + `created_at` TIMESTAMP NULL DEFAULT NULL COMMENT '创建时间', + `updated_at` TIMESTAMP NULL DEFAULT NULL COMMENT '更新时间' ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '课程系列表'; \ No newline at end of file diff --git a/1781687994_create_course.up.sql b/1781687994_create_course.up.sql index 41f1912..717995a 100644 --- a/1781687994_create_course.up.sql +++ b/1781687994_create_course.up.sql @@ -17,8 +17,8 @@ CREATE TABLE `course` ( `is_published` TINYINT DEFAULT 1 COMMENT '是否上架:1-下架 2-上架', -- 时间戳 -`created_at` TIMESTAMP DEFAULT NULL COMMENT '创建时间', -`updated_at` TIMESTAMP DEFAULT NULL COMMENT '更新时间', +`created_at` TIMESTAMP NULL DEFAULT NULL COMMENT '创建时间', +`updated_at` TIMESTAMP NULL DEFAULT NULL COMMENT '更新时间', FOREIGN KEY (`series_id`) REFERENCES `course_series` (`id`) ON DELETE CASCADE, -- 唯一约束:同一系列同一年同一月份只能有一条记录 diff --git a/1781688012_create_video.up.sql b/1781688012_create_video.up.sql index 83643b3..e1b27a1 100644 --- a/1781688012_create_video.up.sql +++ b/1781688012_create_video.up.sql @@ -13,8 +13,8 @@ CREATE TABLE `video` ( `release_date` DATE COMMENT '发布日期(具体某一天)', `is_free` TINYINT DEFAULT 1 COMMENT '是否免费试看:1-付费 2-免费', - `created_at` TIMESTAMP DEFAULT NULL COMMENT '创建时间', - `updated_at` TIMESTAMP DEFAULT NULL COMMENT '更新时间', + `created_at` TIMESTAMP NULL DEFAULT NULL COMMENT '创建时间', + `updated_at` TIMESTAMP NULL DEFAULT NULL COMMENT '更新时间', FOREIGN KEY (`course_id`) REFERENCES `course`(`id`) ON DELETE CASCADE,