From 4a75bcac70417691f106f18a32a1cc33d55b0060 Mon Sep 17 00:00:00 2001
From: Guillaume Horel <guillaume.horel@gmail.com>
Date: Sun, 30 Dec 2018 11:58:59 -0500
Subject: update schema

---
 schema.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index 5fd2c3e..b533685 100644
--- a/schema.sql
+++ b/schema.sql
@@ -7,6 +7,6 @@ CREATE TABLE sessions(
        id uuid DEFAULT gen_random_uuid() PRIMARY KEY,
        created_at timestamp DEFAULT now(),
        expire timestamp,
-       user_id integer REFERENCES users(id)
+       user_id integer REFERENCES users(id) ON DELETE CASCADE
 );
 
-- 
cgit v1.2.3-70-g09d2

