数据结构优化

This commit is contained in:
李琦
2026-01-19 16:14:08 +08:00
parent 6d789c7c2a
commit 68c4c6df1c
36 changed files with 4063 additions and 760 deletions

15
server/cleanup_tables.sql Normal file
View File

@@ -0,0 +1,15 @@
-- 清理脚本:删除可能有问题的表
-- 在执行 nl_blog.sql 之前先执行此脚本
SET FOREIGN_KEY_CHECKS = 0;
-- 删除 operation_logs 表(如果存在)
DROP TABLE IF EXISTS `operation_logs`;
-- 删除 tags 表(如果存在)
DROP TABLE IF EXISTS `tags`;
-- 删除 post_tags 关联表(如果存在,因为它可能引用 tags
DROP TABLE IF EXISTS `post_tags`;
SET FOREIGN_KEY_CHECKS = 1;