Constrain serial.issuance.holding_code to be valid JSON or NULL
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 5 Apr 2012 15:46:05 +0000 (11:46 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 5 Apr 2012 15:59:54 +0000 (11:59 -0400)
commit5b22d4221633605d147e0099776735c12b9f671e
tree36ed53879a531674182ad440a242a1b8bcd05ab2
parent4643f3613ad57ad4cdcf99a9bf17faf4c63870af
Constrain serial.issuance.holding_code to be valid JSON or NULL

*NOTE* when merging to master and rel_2_2, you'll need to replace XXXX
not only in the upgrade script but in the version-upgrade script as well!

This avoids serial.materialize_holding_code() failing on bad data.  The
upgrade script will actually throw away bad values for
serial.issuance.holding_code.  This is no real loss, since bad data
there prevents any serials functions around the row in question from
working properly anyway.

This problem was reported by Martha Driscoll and Ben Shum.

*Also* put a couple of changes missed from the 0700 upgrade script into
210.schema.serials.sql.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/sql/Pg/210.schema.serials.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.serial-holding-code-constraint.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/version-upgrade/2.1-2.2-upgrade-db.sql