diff --git a/migrations/postgres/2022-01-29-154457_add_not_null_constraint_to_email_blocklist/down.sql b/migrations/postgres/2022-01-29-154457_add_not_null_constraint_to_email_blocklist/down.sql index 291a97c5..e406ff43 100644 --- a/migrations/postgres/2022-01-29-154457_add_not_null_constraint_to_email_blocklist/down.sql +++ b/migrations/postgres/2022-01-29-154457_add_not_null_constraint_to_email_blocklist/down.sql @@ -1 +1,4 @@ --- This file should undo anything in `up.sql` \ No newline at end of file +ALTER TABLE email_blocklist ALTER COLUMN notification_text DROP NOT NULL; +ALTER TABLE email_blocklist ALTER COLUMN notify_user DROP NOT NULL; +ALTER TABLE email_blocklist ALTER COLUMN note DROP NOT NULL; +ALTER TABLE email_blocklist ALTER COLUMN email_address DROP NOT NULL; diff --git a/migrations/postgres/2022-01-29-154457_add_not_null_constraint_to_email_blocklist/up.sql b/migrations/postgres/2022-01-29-154457_add_not_null_constraint_to_email_blocklist/up.sql index 33cf74b5..ad76cfd4 100644 --- a/migrations/postgres/2022-01-29-154457_add_not_null_constraint_to_email_blocklist/up.sql +++ b/migrations/postgres/2022-01-29-154457_add_not_null_constraint_to_email_blocklist/up.sql @@ -1 +1,4 @@ --- Your SQL goes here \ No newline at end of file +ALTER TABLE email_blocklist ALTER COLUMN email_address SET NOT NULL; +ALTER TABLE email_blocklist ALTER COLUMN note SET NOT NULL; +ALTER TABLE email_blocklist ALTER COLUMN notify_user SET NOT NULL; +ALTER TABLE email_blocklist ALTER COLUMN notification_text SET NOT NULL;