Add a notification model

This commit is contained in:
Bat
2018-05-13 13:44:18 +01:00
parent c6b2560eb0
commit 780a51157f
5 changed files with 61 additions and 0 deletions
@@ -0,0 +1,2 @@
-- This file should undo anything in `up.sql`
DROP TABLE notifications;
@@ -0,0 +1,8 @@
-- Your SQL goes here
CREATE TABLE notifications (
id SERIAL PRIMARY KEY,
title VARCHAR NOT NULL DEFAULT '',
content TEXT,
link VARCHAR,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE NOT NULL
)