From b0bc3043898ac53e3510ecab14e474a8307cc3c2 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Sat, 8 Nov 2025 15:08:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=95=B0=E6=8D=AE=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=94=B9=E4=B8=BAgo-chat=E5=90=8C=E9=A1=B9=E7=9B=AE=E5=90=8D?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E5=88=9D=E5=A7=8B=E4=B8=A4=E4=B8=AA=E7=94=A8?= =?UTF-8?q?=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.toml | 2 +- chat.sql => go-chat.sql | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) rename chat.sql => go-chat.sql (92%) diff --git a/config.toml b/config.toml index 73d767b..90145e3 100644 --- a/config.toml +++ b/config.toml @@ -2,7 +2,7 @@ appName = "chat_room" [mysql] host = "127.0.0.1" -name = "chat" +name = "go-chat" password = "root1234" port = 3306 tablePrefix = "" diff --git a/chat.sql b/go-chat.sql similarity index 92% rename from chat.sql rename to go-chat.sql index 4cab988..419332a 100644 --- a/chat.sql +++ b/go-chat.sql @@ -1,4 +1,4 @@ -CREATE DATABASE chat; +CREATE DATABASE IF NOT EXISTS `go-chat`; DROP TABLE IF EXISTS `users`; CREATE TABLE IF NOT EXISTS `users` ( @@ -17,6 +17,8 @@ CREATE TABLE IF NOT EXISTS `users` ( UNIQUE KEY `idx_uuid` (`uuid`), UNIQUE KEY `username_2` (`username`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '用户表'; +INSERT INTO `users` VALUES (1, '860dac42-e0a8-4aa5-9c47-403dc1af107e', 'user001', 'user001', 'user001', 'user001', '', NOW(), NULL, 0); +INSERT INTO `users` VALUES (2, '6e21f12a-7452-41b6-ac7c-4c2e5fb10ad7', 'user002', 'user002', 'user002', 'user002', '', NOW(), NULL, 0); DROP TABLE IF EXISTS `user_friends`;