Add default empty value to the text field in received_emails table

This commit is contained in:
Hongbo Wu 2023-02-01 13:43:12 +08:00
parent e723ce1bf4
commit c4905aaba8
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,9 @@
-- Type: DO
-- Name: add_default_value_to_text_in_received_emails
-- Description: Add default value to the text field in received_emails table
BEGIN;
ALTER TABLE omnivore.received_emails ALTER COLUMN text SET DEFAULT '';
COMMIT;

View file

@ -0,0 +1,9 @@
-- Type: UNDO
-- Name: add_default_value_to_text_in_received_emails
-- Description: Add default value to the text field in received_emails table
BEGIN;
ALTER TABLE omnivore.received_emails ALTER COLUMN text DROP DEFAULT;
COMMIT;