From 478bf0f95eadf447736004e1026c02c35e409b72 Mon Sep 17 00:00:00 2001 From: dbs Date: Wed, 10 Nov 2010 22:26:42 +0000 Subject: [PATCH] Enable "maintain control numbers" and "record ID as TCN" behavior by default Per http://ur1.ca/2bgc4, this behavior hews more closely to the MARC21 specification. Note, however, that duplicate bib detection in the "Import via Z39.50" interface will be somewhat affected; a more trustworthy workaround is to include the "Local catalog" in Z39.50 searches to determine if a matching record already exists in the database. git-svn-id: svn://svn.open-ils.org/ILS/trunk@18693 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql | 10 ++++++---- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 10 ++++++---- .../src/sql/Pg/upgrade/0463.config.enable_id_global_flags.sql | 10 ++++++++++ 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0463.config.enable_id_global_flags.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index c96ee73a1e..a0d90bf9ed 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -70,7 +70,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0462'); -- gmc +INSERT INTO config.upgrade_log (version) VALUES ('0463'); -- dbs CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql index c2c5fadca9..ae220625af 100644 --- a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql @@ -15476,7 +15476,7 @@ CREATE TABLE config.global_flag ( ) INHERITS (config.internal_flag); ALTER TABLE config.global_flag ADD PRIMARY KEY (name); -INSERT INTO config.global_flag (name, label) -- defaults to enabled=FALSE +INSERT INTO config.global_flag (name, label, enabled) VALUES ( 'cat.bib.use_id_for_tcn', oils_i18n_gettext( @@ -15484,7 +15484,8 @@ INSERT INTO config.global_flag (name, label) -- defaults to enabled=FALSE 'Cat: Use Internal ID for TCN Value', 'cgf', 'label' - ) + ), + TRUE ); -- resolves performance issue noted by EG Indiana @@ -16884,7 +16885,7 @@ ALTER TABLE asset.stat_cat_entry_copy_map DROP CONSTRAINT a_sc_oc_fkey; ALTER TABLE authority.record_entry ADD COLUMN owner INT; ALTER TABLE serial.record_entry ADD COLUMN owner INT; -INSERT INTO config.global_flag (name, label) -- defaults to enabled=FALSE +INSERT INTO config.global_flag (name, label, enabled) VALUES ( 'cat.maintain_control_numbers', oils_i18n_gettext( @@ -16892,7 +16893,8 @@ INSERT INTO config.global_flag (name, label) -- defaults to enabled=FALSE 'Cat: Maintain 001/003/035 according to the MARC21 specification', 'cgf', 'label' - ) + ), + TRUE ); INSERT INTO config.global_flag (name, label, enabled) diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index f6d40906ce..7fa5a015d3 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -6363,7 +6363,7 @@ INSERT INTO config.global_flag (name, label) -- defaults to enabled=FALSE ) ); -INSERT INTO config.global_flag (name, label) -- defaults to enabled=FALSE +INSERT INTO config.global_flag (name, label, enabled) VALUES ( 'cat.bib.use_id_for_tcn', oils_i18n_gettext( @@ -6371,7 +6371,8 @@ INSERT INTO config.global_flag (name, label) -- defaults to enabled=FALSE 'Cat: Use Internal ID for TCN Value', 'cgf', 'label' - ) + ), + TRUE ); INSERT INTO config.global_flag (name,label,enabled) @@ -6385,7 +6386,7 @@ INSERT INTO config.global_flag (name,label,enabled) TRUE ); -INSERT INTO config.global_flag (name, label) -- defaults to enabled=FALSE +INSERT INTO config.global_flag (name, label, enabled) VALUES ( 'cat.maintain_control_numbers', oils_i18n_gettext( @@ -6393,7 +6394,8 @@ INSERT INTO config.global_flag (name, label) -- defaults to enabled=FALSE 'Cat: Maintain 001/003/035 according to the MARC21 specification', 'cgf', 'label' - ) + ), + TRUE ); INSERT INTO config.usr_setting_type (name,opac_visible,label,description,datatype) diff --git a/Open-ILS/src/sql/Pg/upgrade/0463.config.enable_id_global_flags.sql b/Open-ILS/src/sql/Pg/upgrade/0463.config.enable_id_global_flags.sql new file mode 100644 index 0000000000..2097734bd7 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0463.config.enable_id_global_flags.sql @@ -0,0 +1,10 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0463'); -- dbs + +UPDATE config.global_flag + SET enabled = TRUE + WHERE name IN ('cat.bib.use_id_for_tcn', 'cat.maintain_control_numbers') +; + +COMMIT; -- 2.11.0