From 30d40fea83f4d9e06e14f260c23a31020bd39509 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Sat, 17 Jun 2017 14:47:35 -0400 Subject: app: Introduce subcommands for serve and create user. (Doesn't yet create users) --- src/db.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/db.rs') 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(); } -- cgit v1.2.3