feat(migrations): Default 'posted' columns to NOW()
This commit is contained in:
parent
15d460bab3
commit
f281749b8c
2 changed files with 4 additions and 0 deletions
2
migrations/2018-04-08-172739_default_posted/down.sql
Normal file
2
migrations/2018-04-08-172739_default_posted/down.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE threads ALTER COLUMN posted DROP DEFAULT;
|
||||
ALTER TABLE posts ALTER COLUMN posted DROP DEFAULT;
|
2
migrations/2018-04-08-172739_default_posted/up.sql
Normal file
2
migrations/2018-04-08-172739_default_posted/up.sql
Normal 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');
|
Loading…
Reference in a new issue