From 10d176b9ae18e5218c5ee74c8514e4f5be86c3f4 Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 14 Sep 2010 15:39:58 +0000 Subject: [PATCH] For some reason I already had cat.default_classification_scheme (my db started at upgrade version 0366), so adding some defense here git-svn-id: svn://svn.open-ils.org/ILS/trunk@17652 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../0394.data.org-setting-cat.default_classification_scheme.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/sql/Pg/upgrade/0394.data.org-setting-cat.default_classification_scheme.sql b/Open-ILS/src/sql/Pg/upgrade/0394.data.org-setting-cat.default_classification_scheme.sql index 178b2ffb1..db995bfaf 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0394.data.org-setting-cat.default_classification_scheme.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0394.data.org-setting-cat.default_classification_scheme.sql @@ -3,7 +3,7 @@ BEGIN; INSERT INTO config.upgrade_log (version) VALUES ('0394'); -- gmc INSERT INTO config.org_unit_setting_type ( name, label, description, datatype, fm_class ) -VALUES ( +SELECT DISTINCT 'cat.default_classification_scheme', oils_i18n_gettext( 'cat.default_classification_scheme', @@ -19,6 +19,7 @@ VALUES ( ), 'link', 'acnc' -); +FROM config.org_unit_setting_type +WHERE NOT EXISTS (SELECT 1 FROM config.org_unit_setting_type WHERE name = 'cat.default_classification_scheme'); COMMIT; -- 2.11.0