]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP#1856047: Avoid major upgrade pain with auto_renewal column user/dbs/avoid_hours_of_asset.circulation_updates user/dbs/lp1856047_avoid_hours_of_asset.circulation_updates
authorDan Scott <dan@coffeecode.net>
Wed, 11 Dec 2019 14:20:48 +0000 (09:20 -0500)
committerDan Scott <dan@coffeecode.net>
Wed, 11 Dec 2019 14:45:47 +0000 (09:45 -0500)
commit632401a6ee6c4eac311b2f2c400ac052bf988485
treee7d9ce8b4b04572d2d6c781be193c05f0c9c1622
parent1711f0fe3fbb09f56e2f4befd13de076fc621bb3
LP#1856047: Avoid major upgrade pain with auto_renewal column

If we don't set the auto_renewal column to DEFAULT FALSE NOT NULL from
the beginning, then we need to apply updates to all of the circulation
rows -- which can take an extremely long time.

Setting these attributes from the beginning turns the subsequent upgrade
UPDATE statement into a no-op, as none of the rows will be NULL. And the
subsequent ALTER COLUMN statement that adds the DEFAULT FALSE NOT NULL
attributes runs harmlessly.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Open-ILS/src/sql/Pg/upgrade/1123.schema.autorenewals.sql
Open-ILS/src/sql/Pg/version-upgrade/3.1.5-3.2.0-upgrade-db.sql