From 24cdc4a53c72053b34dfbf3937a8050a8370e49a Mon Sep 17 00:00:00 2001 From: nek0 Date: Sat, 10 Aug 2019 11:41:57 +0200 Subject: [PATCH] beautify auth init query --- src/Model/Auth.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Model/Auth.hs b/src/Model/Auth.hs index 2fc34bd..8846f65 100644 --- a/src/Model/Auth.hs +++ b/src/Model/Auth.hs @@ -50,10 +50,10 @@ import Model.User initToken :: PGS.Query initToken = mconcat - [ "create table if not exists \"token\" (" - , "token_string bytea not null primary key," - , "token_user integer references \"user\"(user_id) not null," - , "token_expiry timestamptz not null" + [ "CREATE TABLE IF NOT EXISTS \"token\" (" + , "token_string BYTEA NOT NULL PRIMARY KEY," + , "token_user INTEGER REFERENCES \"user\"(user_id) NOT NULL," + , "token_expiry TIMESTAMPTZ NOT NULL" , ")" ]