feat(saas): add down migrations for all incremental schema changes (AUD3-DB-01)
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

- 16 down SQL files in migrations/down/ for each incremental migration
- db::run_down_migrations() executes rollback files in reverse order
- migrate_down CLI task: task=migrate_down timestamp=20260402
- Initial schema and seed data excluded (would be destructive)
This commit is contained in:
iven
2026-04-05 01:35:33 +08:00
parent 3b0ab1a7b7
commit 745c2fd754
18 changed files with 123 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
-- Down: Drop knowledge base tables (reverse creation order due to FK)
-- Note: This does NOT reverse the pgvector extension installation or role permission updates.
DROP TABLE IF EXISTS knowledge_usage;
DROP TABLE IF EXISTS knowledge_versions;
DROP TABLE IF EXISTS knowledge_chunks;
DROP TABLE IF EXISTS knowledge_items;
DROP TABLE IF EXISTS knowledge_categories;