Add can_have_copies field to config.bib_source.
authorJason Stephenson <jstephenson@mvlc.org>
Fri, 30 Sep 2011 15:28:08 +0000 (11:28 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Tue, 15 Nov 2011 22:14:25 +0000 (17:14 -0500)
Add the column definition to config.bib_source in
002.schema.config.sql.

Insert TRUE into the column for the default sources created in
950.data.seed-values.sql.

Add the field definition to class id cbs in fm_IDL.xml.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql

index d605f1d..ec1cac6 100644 (file)
@@ -4863,6 +4863,7 @@ SELECT  usr,
                        <field name="quality" reporter:datatype="int" />
                        <field name="source" reporter:datatype="text"/>
                        <field name="transcendant" reporter:datatype="bool"/>
+                       <field name="can_have_copies" reporter:datatype="bool"/>
                </fields>
                <links/>
         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
index 51ab5bc..dc8dcd7 100644 (file)
@@ -92,13 +92,16 @@ CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
        quality         INT     CHECK ( quality BETWEEN 0 AND 100 ),
        source          TEXT    NOT NULL UNIQUE,
-       transcendant    BOOL    NOT NULL DEFAULT FALSE
+       transcendant    BOOL    NOT NULL DEFAULT FALSE,
+       can_have_copies BOOL    NOT NULL DEFAULT TRUE
 );
 COMMENT ON TABLE config.bib_source IS $$
 This is table is used to set up the relative "quality" of each
 MARC source, such as OCLC.  Also identifies "transcendant" sources,
 i.e., sources of bib records that should display in the OPAC
-even if no copies or located URIs are attached.
+even if no copies or located URIs are attached. Also indicates if
+the source is allowed to have actual copies on its bibs. Volumes
+for targeted URIs are unaffected by this setting.
 $$;
 
 CREATE TABLE config.standing (
index e317202..d199e9a 100644 (file)
@@ -1,10 +1,10 @@
 --002.schema.config.sql:
-INSERT INTO config.bib_source (id, quality, source, transcendant) VALUES 
-    (1, 90, oils_i18n_gettext(1, 'oclc', 'cbs', 'source'), FALSE);
-INSERT INTO config.bib_source (id, quality, source, transcendant) VALUES 
-    (2, 10, oils_i18n_gettext(2, 'System Local', 'cbs', 'source'), FALSE);
-INSERT INTO config.bib_source (id, quality, source, transcendant) VALUES 
-    (3, 1, oils_i18n_gettext(3, 'Project Gutenberg', 'cbs', 'source'), TRUE);
+INSERT INTO config.bib_source (id, quality, source, transcendant, can_have_copies) VALUES 
+    (1, 90, oils_i18n_gettext(1, 'oclc', 'cbs', 'source'), FALSE, TRUE);
+INSERT INTO config.bib_source (id, quality, source, transcendant, can_have_copies) VALUES 
+    (2, 10, oils_i18n_gettext(2, 'System Local', 'cbs', 'source'), FALSE, TRUE);
+INSERT INTO config.bib_source (id, quality, source, transcendant, can_have_copies) VALUES 
+    (3, 1, oils_i18n_gettext(3, 'Project Gutenberg', 'cbs', 'source'), TRUE, TRUE);
 SELECT SETVAL('config.bib_source_id_seq'::TEXT, 100);
 
 INSERT INTO biblio.peer_type (id,name) VALUES