Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add default value = now() to updatedAt field in highlight tables only #2905

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@

BEGIN;

UPDATE omnivore.user_profile SET updated_at = created_at WHERE updated_at IS NULL;
ALTER TABLE omnivore.user_profile
ALTER COLUMN updated_at SET DEFAULT current_timestamp,
ALTER COLUMN updated_at SET NOT NULL;

UPDATE omnivore.labels SET updated_at = created_at WHERE updated_at IS NULL;
ALTER TABLE omnivore.labels
ALTER COLUMN updated_at SET DEFAULT current_timestamp,
ALTER COLUMN updated_at SET NOT NULL;

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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

BEGIN;

ALTER TABLE omnivore.user_profile ALTER COLUMN updated_at DROP NOT NULL;

ALTER TABLE omnivore.labels ALTER COLUMN updated_at DROP NOT NULL;

ALTER TABLE omnivore.highlight ALTER COLUMN updated_at DROP NOT NULL;

COMMIT;
Loading