From b31bef70269814d526eee86d93d18500abe4aaa9 Mon Sep 17 00:00:00 2001 From: Hankin Date: Tue, 25 Mar 2025 16:59:20 +0800 Subject: [PATCH] add question category --- 1742891265_create_question_category.up.sql | 7 +++++++ 1742891508_table_question_add_category_id.up.sql | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 1742891265_create_question_category.up.sql create mode 100644 1742891508_table_question_add_category_id.up.sql diff --git a/1742891265_create_question_category.up.sql b/1742891265_create_question_category.up.sql new file mode 100644 index 0000000..c4c425c --- /dev/null +++ b/1742891265_create_question_category.up.sql @@ -0,0 +1,7 @@ +CREATE TABLE `ufutx_question_category` ( + `id` INT NOT NULL AUTO_INCREMENT , + `name` VARCHAR(100) NOT NULL COMMENT "名称", + `created_at` TIMESTAMP NULL DEFAULT NULL , + `updated_at` TIMESTAMP NULL DEFAULT NULL , + PRIMARY KEY (`id`) +) ENGINE = InnoDB COMMENT = '问题分类'; \ No newline at end of file diff --git a/1742891508_table_question_add_category_id.up.sql b/1742891508_table_question_add_category_id.up.sql new file mode 100644 index 0000000..537cc66 --- /dev/null +++ b/1742891508_table_question_add_category_id.up.sql @@ -0,0 +1,2 @@ +ALTER TABLE `ufutx_question` +ADD COLUMN `category_id` INT default NULL COMMENT "分类id" after `id` \ No newline at end of file