summaryrefslogtreecommitdiff
path: root/src/db.rs
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2017-06-17 14:47:35 -0400
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2017-06-17 14:47:35 -0400
commit30d40fea83f4d9e06e14f260c23a31020bd39509 (patch)
tree12d0972235342129342db8fbc79888b480f628da /src/db.rs
parentd458c767da041d17781c5f2da25372af69a5d3aa (diff)
app: Introduce subcommands for serve and create user.
(Doesn't yet create users)
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();
}