Avoid auto_renew update for NOT NULL pain
authorDan Scott <dan@coffeecode.net>
Thu, 21 Nov 2019 20:57:32 +0000 (15:57 -0500)
committerDan Scott <dan@coffeecode.net>
Fri, 3 Jan 2020 19:31:28 +0000 (14:31 -0500)
Signed-off-by: Dan Scott <dan@coffeecode.net>
Open-ILS/src/sql/Pg/version-upgrade/3.3.3-3.4.0-upgrade-db.sql

index 8cd090e..1780874 100644 (file)
@@ -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.