feat(event cache store): enable foreign keys pragma \o/

This commit is contained in:
Benjamin Bouvier
2024-11-28 11:06:02 +01:00
parent aa0eb760de
commit daa984f7de

View File

@@ -358,6 +358,9 @@ async fn run_migrations(conn: &SqliteAsyncConn, version: u8) -> Result<()> {
}
if version < 3 {
// Enable foreign keys for this database.
conn.execute_batch("PRAGMA foreign_keys = ON;").await?;
conn.with_transaction(|txn| {
txn.execute_batch(include_str!("../migrations/event_cache_store/003_events.sql"))?;
txn.set_db_version(3)