From c14c6631696ed13be2bcbb5cf463a3b6e6bda258 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Thu, 21 Nov 2019 15:57:32 -0500 Subject: [PATCH] Avoid auto_renew update for NOT NULL pain Signed-off-by: Dan Scott --- .../src/sql/Pg/version-upgrade/3.3.3-3.4.0-upgrade-db.sql | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Open-ILS/src/sql/Pg/version-upgrade/3.3.3-3.4.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/3.3.3-3.4.0-upgrade-db.sql index 8cd090e1cc..178087479c 100644 --- a/Open-ILS/src/sql/Pg/version-upgrade/3.3.3-3.4.0-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/version-upgrade/3.3.3-3.4.0-upgrade-db.sql @@ -812,8 +812,9 @@ $$ LANGUAGE 'plpgsql'; SELECT evergreen.upgrade_deps_block_check('1188', :eg_version); -UPDATE action.circulation SET auto_renewal = FALSE WHERE auto_renewal IS NULL; -UPDATE action.aged_circulation SET auto_renewal = FALSE WHERE auto_renewal IS NULL; +-- Took care of this in the 3.1.5-3.2.0 upgrade +--UPDATE action.circulation SET auto_renewal = FALSE WHERE auto_renewal IS NULL; +--UPDATE action.aged_circulation SET auto_renewal = FALSE WHERE auto_renewal IS NULL; SELECT evergreen.upgrade_deps_block_check('1189', :eg_version); @@ -869,11 +870,12 @@ COMMIT; -- alter a table with pending transactions. They also need to occur -- after the above updates or the SET NOT NULL change will fail. -ALTER TABLE action.circulation ALTER COLUMN auto_renewal SET DEFAULT FALSE; -ALTER TABLE action.circulation ALTER COLUMN auto_renewal SET NOT NULL; +-- Took care of this in the 3.1.5-3.2.0 upgrade +--ALTER TABLE action.circulation ALTER COLUMN auto_renewal SET DEFAULT FALSE; +--ALTER TABLE action.circulation ALTER COLUMN auto_renewal SET NOT NULL; -ALTER TABLE action.aged_circulation ALTER COLUMN auto_renewal SET DEFAULT FALSE; -ALTER TABLE action.aged_circulation ALTER COLUMN auto_renewal SET NOT NULL; +--ALTER TABLE action.aged_circulation ALTER COLUMN auto_renewal SET DEFAULT FALSE; +--ALTER TABLE action.aged_circulation ALTER COLUMN auto_renewal SET NOT NULL; -- Update auditor tables to catch changes to source tables. -- Can be removed/skipped if there were no schema changes. -- 2.11.0