migrate_course_sys/1781687840_create_course_series.up.sql
2026-06-18 11:13:32 +08:00

11 lines
740 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

CREATE TABLE `course_series` (
`id` INT PRIMARY KEY AUTO_INCREMENT COMMENT '系列ID',
`category_id` INT DEFAULT NULL COMMENT '所属分类ID可空表示未分类',
`title` VARCHAR(255) NOT NULL COMMENT '系列名称Python全栈开发',
`description` TEXT COMMENT '系列简介',
`cover_image` VARCHAR(500) COMMENT '系列封面图URL',
`total_months` INT DEFAULT 10 COMMENT '总月数固定10个月',
`is_active` TINYINT DEFAULT 1 COMMENT '是否启用1-禁用 2-启用',
`created_at` TIMESTAMP NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` TIMESTAMP NULL DEFAULT NULL COMMENT '更新时间'
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '课程系列表';