diff options
Diffstat (limited to 'src/db.rs')
-rw-r--r-- | src/db.rs | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -701,11 +701,9 @@ pub fn s_insert_column( | |||
701 | Ok(()) | 701 | Ok(()) |
702 | } | 702 | } |
703 | 703 | ||
704 | pub fn db_setup(config: Cfg) -> MLE<()> { | 704 | pub 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 ); |