Forward-port 3.2.3 upgrade script
authorDan Wells <dbw2@calvin.edu>
Tue, 22 Jan 2019 19:33:08 +0000 (14:33 -0500)
committerDan Wells <dbw2@calvin.edu>
Tue, 22 Jan 2019 19:33:08 +0000 (14:33 -0500)
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/sql/Pg/version-upgrade/3.2.2-3.2.3-upgrade-db.sql [new file with mode: 0644]

diff --git a/Open-ILS/src/sql/Pg/version-upgrade/3.2.2-3.2.3-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/3.2.2-3.2.3-upgrade-db.sql
new file mode 100644 (file)
index 0000000..865beff
--- /dev/null
@@ -0,0 +1,17 @@
+--Upgrade Script for 3.2.2 to 3.2.3
+\set eg_version '''3.2.3'''
+BEGIN;
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('3.2.3', :eg_version);
+
+SELECT evergreen.upgrade_deps_block_check('1141', :eg_version);
+
+ALTER TABLE vandelay.session_tracker
+    ALTER COLUMN record_type TYPE TEXT,
+    ALTER COLUMN record_type SET DEFAULT 'bib'::TEXT;
+
+ALTER TABLE vandelay.session_tracker
+    ADD CONSTRAINT vand_tracker_valid_record_type
+        CHECK (record_type IN ('bib', 'authority'));
+
+
+COMMIT;