Skip to content

Commit

Permalink
Merge pull request #2905 from omnivore-app/fix/highlight-date
Browse files Browse the repository at this point in the history
add default value = now() to updatedAt field in highlight tables only
  • Loading branch information
sywhb authored Oct 11, 2023
2 parents 00b33b6 + 3201f96 commit 6ad14df
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
10 changes: 0 additions & 10 deletions packages/db/migrations/0131.do.add_default_value_to_updated_at.sql
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;

1 comment on commit 6ad14df

@vercel
Copy link

@vercel vercel bot commented on 6ad14df Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.