Autosync first edition

This commit is contained in:
micialware committed 2026-08-13 09:06:22 +03:00
1 parent ccac3e5a03
commit a21fd5e69b
6 files changed
+218 -111

No files matched your search

+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
}