From ded909c30d08b501bc2a2cbbc3ec85a34c28ab4b Mon Sep 17 00:00:00 2001 From: Michael Li Date: Thu, 31 Aug 2023 12:31:24 +0800 Subject: [PATCH] fixed mirgration for pgsql alter table error --- scripts/migration/postgres/0007_content_type_alter.up.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/migration/postgres/0007_content_type_alter.up.sql b/scripts/migration/postgres/0007_content_type_alter.up.sql index 4df0470d..2315fa6c 100644 --- a/scripts/migration/postgres/0007_content_type_alter.up.sql +++ b/scripts/migration/postgres/0007_content_type_alter.up.sql @@ -1,3 +1,3 @@ -ALTER TABLE p_post_content ALTER COLUMN content SET DATA TYPE TEXT NOT NULL DEFAULT ''; -ALTER TABLE p_comment_content ALTER COLUMN content SET DATA TYPE TEXT NOT NULL DEFAULT ''; -ALTER TABLE p_comment_reply ALTER COLUMN content SET DATA TYPE TEXT NOT NULL DEFAULT ''; +ALTER TABLE p_post_content ALTER COLUMN content SET DATA TYPE TEXT, ALTER COLUMN content SET NOT NULL, ALTER COLUMN content SET DEFAULT ''; +ALTER TABLE p_comment_content ALTER COLUMN content SET DATA TYPE TEXT, ALTER COLUMN content SET NOT NULL, ALTER COLUMN content SET DEFAULT ''; +ALTER TABLE p_comment_reply ALTER COLUMN content SET DATA TYPE TEXT, ALTER COLUMN content SET NOT NULL, ALTER COLUMN content SET DEFAULT '';