summaryrefslogtreecommitdiff
path: root/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.rs')
-rw-r--r--src/db.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/db.rs b/src/db.rs
index 678e603..dea9924 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -12,9 +12,8 @@ pub fn init(conn: &mut Connection) -> Result<()> {
info!("Initializing db...");
conn.execute("
BEGIN;
- CREATE TABLE users (username TEXT,
- salt TEXT,
- passwd TEXT);
+ CREATE TABLE IF NOT EXISTS users
+ (username TEXT, salt TEXT, passwd TEXT);
COMMIT;
").unwrap();
}