From 7c687dd3c8fba9f7632f5e29d94a708e5f497abd Mon Sep 17 00:00:00 2001 From: kongdeqiang <123456> Date: 星期一, 12 十月 2026 09:55:39 +0800 Subject: [PATCH] fix: 新增分组 --- src/main/resources/db/h2-schema.sql | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/src/main/resources/db/h2-schema.sql b/src/main/resources/db/h2-schema.sql index 34b11a6..65246bc 100644 --- a/src/main/resources/db/h2-schema.sql +++ b/src/main/resources/db/h2-schema.sql @@ -21,11 +21,26 @@ ); DROP TABLE IF EXISTS `chat`; +DROP TABLE IF EXISTS `chat_group`; +CREATE TABLE `chat_group` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `user_id` bigint NOT NULL, + `name` varchar(64) NOT NULL, + `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE (`user_id`, `name`) +); + CREATE TABLE `chat` ( `id` bigint NOT NULL AUTO_INCREMENT, `user_id` bigint NOT NULL, `title` varchar(255) NOT NULL DEFAULT '鏂板璇�', `meta` varchar(4000) DEFAULT NULL, + `pinned` tinyint NOT NULL DEFAULT 0, + `pinned_at` timestamp DEFAULT NULL, + `archived` tinyint NOT NULL DEFAULT 0, + `archived_at` timestamp DEFAULT NULL, + `group_id` bigint DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) -- Gitblit v1.9.1