mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Make highlight modification two steps
This commit is contained in:
parent
6ad14dfc14
commit
76b382966d
3 changed files with 22 additions and 2 deletions
|
|
@ -6,7 +6,6 @@ BEGIN;
|
|||
|
||||
UPDATE omnivore.highlight SET updated_at = created_at WHERE updated_at IS NULL;
|
||||
ALTER TABLE omnivore.highlight
|
||||
ALTER COLUMN updated_at SET DEFAULT current_timestamp,
|
||||
ALTER COLUMN updated_at SET NOT NULL;
|
||||
ALTER COLUMN updated_at SET DEFAULT current_timestamp;
|
||||
|
||||
COMMIT;
|
||||
|
|
|
|||
11
packages/db/migrations/0132.do.add_highlight_not_null.sql
Executable file
11
packages/db/migrations/0132.do.add_highlight_not_null.sql
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
-- Type: DO
|
||||
-- Name: add_highlight_not_null
|
||||
-- Description: Add a not null clause to the highlight updated_at column
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE omnivore.highlight
|
||||
ALTER COLUMN updated_at SET NOT NULL ;
|
||||
|
||||
|
||||
COMMIT;
|
||||
10
packages/db/migrations/0132.undo.add_highlight_not_null.sql
Executable file
10
packages/db/migrations/0132.undo.add_highlight_not_null.sql
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
-- Type: UNDO
|
||||
-- Name: add_highlight_not_null
|
||||
-- Description: Add a not null clause to the highlight updated_at column
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE omnivore.highlight
|
||||
ALTER COLUMN updated_at DROP NOT NULL;
|
||||
|
||||
COMMIT;
|
||||
Loading…
Reference in a new issue