feat(model): 为 Comment 和 PointHistory 实体添加逻辑删除功能

This commit is contained in:
sivdead
2025-08-31 14:03:10 +08:00
parent 59232f99ca
commit 72adc5b232
6 changed files with 37 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
-- Add logical delete support for comments and point_histories tables
-- Add deleted_at column to comments table
ALTER TABLE comments ADD COLUMN deleted_at DATETIME(6) NULL;
-- Add deleted_at column to point_histories table
ALTER TABLE point_histories ADD COLUMN deleted_at DATETIME(6) NULL;
-- Add index for better performance on logical delete queries
CREATE INDEX idx_comments_deleted_at ON comments(deleted_at);
CREATE INDEX idx_point_histories_deleted_at ON point_histories(deleted_at);