Autosync first edition

This commit is contained in:
2026-08-13 09:06:22 +03:00
parent ccac3e5a03
commit a21fd5e69b
6 changed files with 218 additions and 111 deletions
+8
View File
@@ -55,3 +55,11 @@ fn make_card_stats(conn: &Connection) -> Result<(), rusqlite::Error> {
conn.execute(query, ())?;
Ok(())
}
pub fn default_connection() -> Connection {
let path = app_data_dir();
let db_file = path.join("data.db");
let connection = Connection::open(db_file).unwrap();
connection.execute("PRAGMA foreign_keys = ON;", []).unwrap();
connection
}