diff --git a/.gitignore b/.gitignore index 8d335a9..407522a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,11 @@ +# Cargo/Rust /target -/.vscode +Cargo.lock + +# Visual studio code +.vscode + +# Sqlite databases /*.db -Cargo.lock \ No newline at end of file +*.db-shm +*.db-wal \ No newline at end of file diff --git a/sprinklers_database/src/lib.rs b/sprinklers_database/src/lib.rs index 671fc6f..974e2c0 100644 --- a/sprinklers_database/src/lib.rs +++ b/sprinklers_database/src/lib.rs @@ -17,6 +17,9 @@ pub fn setup_db() -> Result { // let conn = DbConn::open_in_memory()?; let mut conn = DbConn::open("test.db")?; + // Go ahead and use write ahead log for better perf + conn.execute_batch("PRAGMA journal_mode=WAL;")?; + let migs = create_migrations(); migs.apply(&mut conn)?;