[open-ils-commits] [GIT] Evergreen ILS branch master updated. 75feb55201f37b563deb6b71b5d0b50182fec1d8

Evergreen Git git at git.evergreen-ils.org
Thu Aug 1 06:58:28 EDT 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  75feb55201f37b563deb6b71b5d0b50182fec1d8 (commit)
       via  9e1f8b62fed4265ca9e4775dc77f4b4e670dc75e (commit)
      from  649ddb2d71f39ab0abc8bda48f3c05de6b522140 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 75feb55201f37b563deb6b71b5d0b50182fec1d8
Author: Chris Sharp <csharp at georgialibraries.org>
Date:   Thu Aug 1 06:57:31 2019 -0400

    LP#1006466 - Stamping upgrade script
    
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index d70e59d05a..242b41e0d2 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -92,7 +92,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1169', :eg_version); -- berick/csharp/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1170', :eg_version); -- rhamby/csharp
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/1170.schema.action_hold_request_fkey_to_hold_type.sql b/Open-ILS/src/sql/Pg/upgrade/1170.schema.action_hold_request_fkey_to_hold_type.sql
new file mode 100644
index 0000000000..25b5801fa1
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/1170.schema.action_hold_request_fkey_to_hold_type.sql
@@ -0,0 +1,24 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1170', :eg_version);
+
+CREATE TABLE config.hold_type (
+    id          SERIAL,
+    hold_type   TEXT UNIQUE,
+    description TEXT
+);
+
+INSERT INTO config.hold_type (hold_type,description) VALUES
+    ('C','Copy Hold'),
+    ('V','Volume Hold'),
+    ('T','Title Hold'),
+    ('M','Metarecord Hold'),
+    ('R','Recall Hold'),
+    ('F','Force Hold'),
+    ('I','Issuance Hold'),
+    ('P','Part Hold')
+;
+
+ALTER TABLE action.hold_request ADD CONSTRAINT hold_request_hold_type_fkey FOREIGN KEY (hold_type) REFERENCES config.hold_type(hold_type) DEFERRABLE INITIALLY DEFERRED;
+
+COMMIT;

commit 9e1f8b62fed4265ca9e4775dc77f4b4e670dc75e
Author: Rogan Hamby <rogan.hamby at gmail.com>
Date:   Tue Apr 16 12:49:07 2019 -0400

    adding fk constraint to hold_type on action.hold_request and reporter class
    
    Signed-off-by: Rogan Hamby <rogan.hamby at gmail.com>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index 7270ee3be6..c8db25c2b6 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -6356,6 +6356,7 @@ SELECT  usr,
 			<link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
 			<link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
 			<link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
+			<link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
 		</links>
 		<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
 			<actions>
@@ -12813,6 +12814,14 @@ SELECT  usr,
 		</links>
 	</class>
 
+	<class id="cht" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_type" oils_persist:tablename="config.hold_type" reporter:label="Hold Type" oils_persist:readonly="true">
+    	<fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
+        	<field name="id" reporter:selector="name" reporter:datatype="id"/>
+        	<field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
+        	<field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
+    	</fields>
+	</class>
+
 	<!-- ********************************************************************************************************************* -->
 </IDL>
 
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index b516ac60e8..d70e59d05a 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -1318,4 +1318,21 @@ CREATE TABLE config.copy_tag_type (
 CREATE INDEX config_copy_tag_type_owner_idx
     ON config.copy_tag_type (owner);
 
+CREATE TABLE config.hold_type (
+    id          SERIAL,
+    hold_type   TEXT UNIQUE,
+    description TEXT
+);
+
+INSERT INTO config.hold_type (hold_type,description) VALUES
+    ('C','Copy Hold'),
+    ('V','Volume Hold'),
+    ('T','Title Hold'),
+    ('M','Metarecord Hold'),
+    ('R','Recall Hold'),
+    ('F','Force Hold'),
+    ('I','Issuance Hold'),
+    ('P','Part Hold')
+;
+
 COMMIT;
diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql
index b2d2e185ac..900c1b36d3 100644
--- a/Open-ILS/src/sql/Pg/090.schema.action.sql
+++ b/Open-ILS/src/sql/Pg/090.schema.action.sql
@@ -442,7 +442,7 @@ CREATE TABLE action.hold_request (
 	selection_ou		INT				NOT NULL,
 	selection_depth		INT				NOT NULL DEFAULT 0,
 	pickup_lib		INT				NOT NULL REFERENCES actor.org_unit DEFERRABLE INITIALLY DEFERRED,
-	hold_type		TEXT				NOT NULL, -- CHECK (hold_type IN ('M','T','V','C')),  -- XXX constraint too constraining...
+	hold_type		TEXT				REFERENCES config.hold_type (hold_type) DEFERRABLE INITIALLY DEFERRED,
 	holdable_formats	TEXT,
 	phone_notify		TEXT,
 	email_notify		BOOL				NOT NULL DEFAULT FALSE,
diff --git a/Open-ILS/src/sql/Pg/upgrade/xxxx.schema.action_hold_request_fkey_to_hold_type.sql b/Open-ILS/src/sql/Pg/upgrade/xxxx.schema.action_hold_request_fkey_to_hold_type.sql
new file mode 100644
index 0000000000..8362f62397
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/xxxx.schema.action_hold_request_fkey_to_hold_type.sql
@@ -0,0 +1,19 @@
+CREATE TABLE config.hold_type (
+    id          SERIAL,
+    hold_type   TEXT UNIQUE,
+    description TEXT
+);
+
+INSERT INTO config.hold_type (hold_type,description) VALUES
+    ('C','Copy Hold'),
+    ('V','Volume Hold'),
+    ('T','Title Hold'),
+    ('M','Metarecord Hold'),
+    ('R','Recall Hold'),
+    ('F','Force Hold'),
+    ('I','Issuance Hold'),
+    ('P','Part Hold')
+;
+
+ALTER TABLE action.hold_request ADD CONSTRAINT hold_request_hold_type_fkey FOREIGN KEY (hold_type) REFERENCES config.hold_type(hold_type) DEFERRABLE INITIALLY DEFERRED;
+

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/examples/fm_IDL.xml                       |  9 ++++++++
 Open-ILS/src/sql/Pg/002.schema.config.sql          | 19 ++++++++++++++++-
 Open-ILS/src/sql/Pg/090.schema.action.sql          |  2 +-
 ...chema.action_hold_request_fkey_to_hold_type.sql | 24 ++++++++++++++++++++++
 ...chema.action_hold_request_fkey_to_hold_type.sql | 19 +++++++++++++++++
 5 files changed, 71 insertions(+), 2 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/1170.schema.action_hold_request_fkey_to_hold_type.sql
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/xxxx.schema.action_hold_request_fkey_to_hold_type.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list