From 04cf96cdc3ef6c78b2d4754e3c8028b5c1c45fc0 Mon Sep 17 00:00:00 2001
From: Guillaume Horel <guillaume.horel@gmail.com>
Date: Fri, 28 Dec 2018 12:04:28 -0500
Subject: update schema

---
 schema.sql | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index a2a74b1..5fd2c3e 100644
--- a/schema.sql
+++ b/schema.sql
@@ -1,10 +1,12 @@
+CREATE TABLE users(
+       id serial PRIMARY KEY,
+       name text,
+       password text);
+
 CREATE TABLE sessions(
+       id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
        created_at timestamp DEFAULT now(),
-       session_id uuid DEFAULT gen_random_uuid(),
+       expire timestamp,
        user_id integer REFERENCES users(id)
 );
 
-CREATE TABLE users(
-       id integer PRIMARY KEY serial,
-       user_name text
-       password text);
-- 
cgit v1.2.3-70-g09d2

