feat: add database config and migration system

This commit is contained in:
Developer
2026-03-18 16:01:59 +08:00
parent 493624ecf8
commit b0ce7dcbaf
4 changed files with 107 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
-- 优化查询性能
CREATE INDEX IF NOT EXISTS idx_records_user_date ON records(user_id, date);
CREATE INDEX IF NOT EXISTS idx_records_user_category ON records(user_id, category);
CREATE INDEX IF NOT EXISTS idx_records_user_type ON records(user_id, type);
CREATE INDEX IF NOT EXISTS idx_recurring_user ON recurring_bills(user_id);
CREATE INDEX IF NOT EXISTS idx_categories_user_type ON categories(user_id, type);