Add creation timestamps

This commit is contained in:
Bat
2018-04-30 18:46:27 +01:00
parent 0fd63eb886
commit e93bb3a21f
9 changed files with 28 additions and 5 deletions
@@ -0,0 +1,5 @@
-- This file should undo anything in `up.sql`
ALTER TABLE posts DROP COLUMN creation_date;
ALTER TABLE blogs DROP COLUMN creation_date;
ALTER TABLE users DROP COLUMN creation_date;
ALTER TABLE instances DROP COLUMN creation_date;
@@ -0,0 +1,5 @@
-- Your SQL goes here
ALTER TABLE posts ADD COLUMN creation_date TIMESTAMP NOT NULL DEFAULT now();
ALTER TABLE blogs ADD COLUMN creation_date TIMESTAMP NOT NULL DEFAULT now();
ALTER TABLE users ADD COLUMN creation_date TIMESTAMP NOT NULL DEFAULT now();
ALTER TABLE instances ADD COLUMN creation_date TIMESTAMP NOT NULL DEFAULT now();