Refactor notifications

This commit is contained in:
Bat
2018-07-26 15:46:10 +02:00
parent 44172b67d5
commit c87d490664
12 changed files with 146 additions and 46 deletions
@@ -0,0 +1,8 @@
-- This file should undo anything in `up.sql`
ALTER TABLE notifications ADD COLUMN title VARCHAR NOT NULL;
ALTER TABLE notifications ADD COLUMN content TEXT;
ALTER TABLE notifications ADD COLUMN link VARCHAR;
ALTER TABLE notifications ADD COLUMN data VARCHAR;
ALTER TABLE notifications DROP COLUMN kind;
ALTER TABLE notifications DROP COLUMN object_id;
@@ -0,0 +1,8 @@
-- Your SQL goes here
ALTER TABLE notifications DROP COLUMN title;
ALTER TABLE notifications DROP COLUMN content;
ALTER TABLE notifications DROP COLUMN link;
ALTER TABLE notifications DROP COLUMN data;
ALTER TABLE notifications ADD COLUMN kind VARCHAR NOT NULL DEFAULT 'unknown';
ALTER TABLE notifications ADD COLUMN object_id INTEGER NOT NULL DEFAULT 0;