Use UUID models and soft deletion, persist file relationships with deduplicated monthly MinIO objects, and add admin file management. Update mini-program media handling and add local dev configuration.
28 lines
1.3 KiB
Go
28 lines
1.3 KiB
Go
package store
|
|
|
|
// 仅删除当前情侣空间的数据,不按用户 ID 删除其他空间或个人账本。
|
|
var sharedDataDeleteStatements = []string{
|
|
"DELETE FROM smoking_logs WHERE account_id IN (SELECT id FROM smoking_accounts WHERE couple_id = ?)",
|
|
"DELETE FROM smoking_accounts WHERE couple_id = ?",
|
|
"DELETE FROM diary_comments WHERE couple_id = ?",
|
|
"DELETE FROM checkin_logs WHERE couple_id = ?",
|
|
"DELETE FROM photos WHERE album_id IN (SELECT id FROM albums WHERE couple_id = ?)",
|
|
"DELETE FROM albums WHERE couple_id = ?",
|
|
"DELETE FROM diaries WHERE couple_id = ?",
|
|
"DELETE FROM timeline WHERE couple_id = ?",
|
|
"DELETE FROM songs WHERE couple_id = ?",
|
|
"DELETE FROM checkins WHERE couple_id = ?",
|
|
"DELETE FROM period_records WHERE couple_id = ?",
|
|
"DELETE FROM period_daily_records WHERE couple_id = ?",
|
|
"DELETE FROM period_sex_records WHERE couple_id = ?",
|
|
"DELETE FROM pet_dailies WHERE couple_id = ?",
|
|
"DELETE FROM pet_achievements WHERE couple_id = ?",
|
|
"DELETE FROM pet_items WHERE couple_id = ?",
|
|
"DELETE FROM pet_dynamics WHERE couple_id = ?",
|
|
"DELETE FROM pets WHERE couple_id = ?",
|
|
"DELETE FROM activity_log WHERE couple_id = ?",
|
|
"DELETE FROM notify_log WHERE couple_id = ?",
|
|
"DELETE FROM subscribe_message_logs WHERE couple_id = ?",
|
|
"DELETE FROM settings WHERE key IN (CONCAT('bg_', ?), CONCAT('bgver_', ?))",
|
|
}
|