Skip to content

Instantly share code, notes, and snippets.

@mkaranasou
Created April 9, 2020 11:23
Show Gist options
  • Save mkaranasou/9938053b534a159cf694f1c90de6db5d to your computer and use it in GitHub Desktop.
Save mkaranasou/9938053b534a159cf694f1c90de6db5d to your computer and use it in GitHub Desktop.
Alter a postgres constraint check
ALTER TABLE IF EXISTS table_y2020_w15
DROP CONSTRAINT table_y2020_w15_created_at_check,
ADD CONSTRAINT table_y2020_w15_created_at_check CHECK (created_at >= '2020-04-06 00:00:00' AND created_at <= '2020-04-12 23:59:59.999999' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment