LP#1806968 Vand ses. tracker upgrade SQL additions
authorBill Erickson <berickxx@gmail.com>
Thu, 6 Dec 2018 17:09:58 +0000 (12:09 -0500)
committerBill Erickson <berickxx@gmail.com>
Mon, 17 Dec 2018 21:58:32 +0000 (16:58 -0500)
Force the default value to show in the DB as 'bib'::text instead of
'bib'::vandelay.bib_queue_queue_type, which might be confusing.

Removed some stray SQL from the script.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.vandelay-record-type-fix.sql

index 1187011..0ba8a6e 100644 (file)
@@ -1,16 +1,14 @@
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
 
 ALTER TABLE vandelay.session_tracker
-    ALTER COLUMN record_type TYPE TEXT;
+    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'));
 
-END;
-$$ LANGUAGE plpgsql;
+COMMIT;
 
-COMMIT;
\ No newline at end of file