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