mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-19 22:26:13 -04:00
feat(event cache store): enable foreign keys pragma \o/
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user