diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/database/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/database/mod.rs b/src/database/mod.rs index 0674477..f2185fb 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs | |||
| @@ -12,6 +12,10 @@ pub async fn init_pool(path: &str) -> Result<DbPool> { | |||
| 12 | } | 12 | } |
| 13 | let pool = SqlitePool::connect(&format!("sqlite:{path}?mode=rwc")).await?; | 13 | let pool = SqlitePool::connect(&format!("sqlite:{path}?mode=rwc")).await?; |
| 14 | run_migrations(&pool).await?; | 14 | run_migrations(&pool).await?; |
| 15 | // Clear stale voice activity records from previous run. | ||
| 16 | sqlx::query("DELETE FROM voice_activity") | ||
| 17 | .execute(&pool) | ||
| 18 | .await?; | ||
| 15 | Ok(pool) | 19 | Ok(pool) |
| 16 | } | 20 | } |
| 17 | 21 | ||
