summaryrefslogtreecommitdiff
path: root/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.rs')
-rw-r--r--src/db.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/db.rs b/src/db.rs
index 2ffcff5..36fab75 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -701,11 +701,9 @@ pub fn s_insert_column(
701 Ok(()) 701 Ok(())
702} 702}
703 703
704pub fn db_setup(config: Cfg) -> MLE<()> { 704pub fn db_setup(path: &str) -> MLE<()> {
705 println!("Initiating database");
706 705
707 let data = format!("{}/data.db", config.data); 706 let connection = Connection::open(path)?;
708 let connection = Connection::open(data)?;
709 707
710 connection.execute_batch( 708 connection.execute_batch(
711 "CREATE TABLE 'user_config' ( 'id' TEXT, 'value' TEXT ); 709 "CREATE TABLE 'user_config' ( 'id' TEXT, 'value' TEXT );