feat(migrations): Default 'posted' columns to NOW()

This commit is contained in:
Vincent Ambo 2018-04-08 19:29:56 +02:00
parent 15d460bab3
commit f281749b8c
2 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1,2 @@
ALTER TABLE threads ALTER COLUMN posted DROP DEFAULT;
ALTER TABLE posts ALTER COLUMN posted DROP DEFAULT;

View file

@ -0,0 +1,2 @@
ALTER TABLE threads ALTER COLUMN posted SET DEFAULT (NOW() AT TIME ZONE 'UTC');
ALTER TABLE posts ALTER COLUMN posted SET DEFAULT (NOW() AT TIME ZONE 'UTC');