refactor: 目标,任务,习惯都放一张表中

This commit is contained in:
kkunkka
2025-10-10 12:40:31 +08:00
parent b9cb079139
commit 79c0e37b87
6 changed files with 30 additions and 17 deletions

View File

@@ -1,16 +1,14 @@
drop table if exists `goals`;
drop table if exists `goal`;
CREATE TABLE if not exists `goals`
CREATE TABLE if not exists `goal`
(
id INT auto_increment NOT NULL PRIMARY KEY,
id INT unsigned auto_increment PRIMARY KEY,
status enum ('DOING', 'DONE', 'CANCEL') default 'DOING' not null,
create_time DATETIME NULL,
update_time DATETIME NULL,
type enum('GOAL', 'TASK', 'HABIT') default 'TASK' NOT NULL ,
name varchar(100) NOT NULL,
tag varchar(100) NULL,
detail varchar(100) NULL
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_0900_ai_ci
COMMENT ='目标管理表';
COMMENT ='目标管理表';