From 2cef386cf84b13d1693fc9bd3a7411cea00cca5d Mon Sep 17 00:00:00 2001
From: phasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Thu, 29 Apr 2010 20:34:02 +0000
Subject: [PATCH] org unit setting for "Delete bib if all copies are deleted
 via Acquisitions lineitem cancellation."

git-svn-id: svn://svn.open-ils.org/ILS/trunk@16354 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 Open-ILS/src/sql/Pg/002.schema.config.sql            |  2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql         | 16 ++++++++++++++++
 ...bib.delete_on_no_copy_via_acq_lineitem_cancel.sql | 20 ++++++++++++++++++++
 3 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0247.data.org-setting-cat.bib.delete_on_no_copy_via_acq_lineitem_cancel.sql

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index af5c930f81..e83e992036 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -60,7 +60,7 @@ CREATE TABLE config.upgrade_log (
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0246'); -- atz
+INSERT INTO config.upgrade_log (version) VALUES ('0247'); -- phasefx
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
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 61f2025420..e20a41bb5e 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -2001,6 +2001,22 @@ INSERT INTO config.org_unit_setting_type ( name, label, description, datatype )
         'string'
 );
 
+-- 0247.data.org-setting-cat.bib.delete_on_no_copy_via_acq_lineitem_cancel.sql
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
+        'cat.bib.delete_on_no_copy_via_acq_lineitem_cancel',
+        oils_i18n_gettext(
+            'cat.bib.delete_on_no_copy_via_acq_lineitem_cancel',
+            'CAT: Delete bib if all copies are deleted via Acquisitions lineitem cancellation.', 
+            'coust', 
+            'label'),
+        oils_i18n_gettext(
+            'cat.bib.delete_on_no_copy_via_acq_lineitem_cancel',
+            'CAT: Delete bib if all copies are deleted via Acquisitions lineitem cancellation.', 
+            'coust', 
+            'description'),
+        'bool'
+);
+
 -- Org_unit_setting_type(s) that need an fm_class:
 INSERT into config.org_unit_setting_type
 ( name, label, description, datatype, fm_class ) VALUES
diff --git a/Open-ILS/src/sql/Pg/upgrade/0247.data.org-setting-cat.bib.delete_on_no_copy_via_acq_lineitem_cancel.sql b/Open-ILS/src/sql/Pg/upgrade/0247.data.org-setting-cat.bib.delete_on_no_copy_via_acq_lineitem_cancel.sql
new file mode 100644
index 0000000000..457565b766
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/0247.data.org-setting-cat.bib.delete_on_no_copy_via_acq_lineitem_cancel.sql
@@ -0,0 +1,20 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0247'); -- phasefx
+
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
+        'cat.bib.delete_on_no_copy_via_acq_lineitem_cancel',
+        oils_i18n_gettext(
+            'cat.bib.delete_on_no_copy_via_acq_lineitem_cancel',
+            'CAT: Delete bib if all copies are deleted via Acquisitions lineitem cancellation.', 
+            'coust', 
+            'label'),
+        oils_i18n_gettext(
+            'cat.bib.delete_on_no_copy_via_acq_lineitem_cancel',
+            'CAT: Delete bib if all copies are deleted via Acquisitions lineitem cancellation.', 
+            'coust', 
+            'description'),
+        'bool'
+);
+
+COMMIT;
-- 
2.11.0