From 1f25f132a0ebb50127588dab3f5d4ec2bf98d3b2 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 21 Sep 2021 10:10:38 -0400 Subject: [PATCH] LP#1737019: (follow-up) fix issue in schema update Looks like 'SET DEFAULT ...' and 'SET NOT NULL' cannot be combined in a single ALTER TABLE statement. Signed-off-by: Galen Charlton --- Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-active-flag.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-active-flag.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-active-flag.sql index 4a5aeee8db..fce1555b86 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-active-flag.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-active-flag.sql @@ -8,6 +8,7 @@ ALTER TABLE acq.funding_source ADD COLUMN active BOOL; UPDATE acq.funding_source SET active = 't'; -ALTER TABLE acq.funding_source ALTER COLUMN active SET NOT NULL DEFAULT TRUE; +ALTER TABLE acq.funding_source ALTER COLUMN active SET DEFAULT TRUE; +ALTER TABLE acq.funding_source ALTER COLUMN active SET NOT NULL; -COMMIT; \ No newline at end of file +COMMIT; -- 2.11.0