feat: add custom SQL handling for triggers and virtual tables

- Introduced a new method `runCustomMigrations` in `DbService` to execute custom SQL statements that Drizzle cannot manage, such as triggers and virtual tables.
- Updated `database-patterns.md` and `README.md` to document the handling of custom SQL and its importance in maintaining database integrity during migrations.
- Refactored `messageFts.ts` to define FTS5 virtual table and associated triggers as idempotent SQL statements for better migration management.
This commit is contained in:
fullex
2026-01-04 01:07:04 +08:00
parent b1de7283dc
commit 3dfd5c7c2b
7 changed files with 567 additions and 561 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -9,12 +9,12 @@
"when": 1767272575118
},
{
"breakpoints": true,
"idx": 1,
"version": "6",
"when": 1767455592181,
"tag": "0001_futuristic_human_fly",
"breakpoints": true
"version": "6",
"when": 1767455592181
}
],
"version": "7"
}
}