This commit is contained in:
beabigegg
2025-08-28 08:59:46 +08:00
parent b9557250a4
commit 4f7f46b07a
42 changed files with 4992 additions and 494 deletions

18
mysql/init/01-init.sql Normal file
View File

@@ -0,0 +1,18 @@
-- 初始化暫時規範管理系統資料庫
-- 此檔案會在 MySQL 容器啟動時自動執行
-- 設定字符集和排序規則
ALTER DATABASE tempspec_db CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
-- 確保時區設定
SET time_zone = '+08:00';
-- 創建必要的索引以提升效能
-- 注意:資料表結構由 SQLAlchemy 自動創建,這裡只需要創建額外的索引
-- 記錄初始化完成
INSERT INTO mysql.general_log (event_time, user_host, thread_id, server_id, command_type, argument)
VALUES (NOW(), 'init_script', 0, 1, 'Query', 'TempSpec Database Initialized');
-- 輸出初始化資訊
SELECT 'TempSpec System Database Initialized Successfully' as STATUS;