From b4d13b4804d3e240a1003b312ff94ae9dd22016d Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 28 Sep 2009 20:40:08 +0000 Subject: [PATCH] The first argument (keyvalue) for oils_i18n_gettext _has_ to be match the primary key value for the row being inserted, and it has to be a consistent value from Evergreen to Evergreen for the I18N scripts to work (so we can't just let any id from a sequence get chosen and then plug that value into oils_i18n_gettext) git-svn-id: svn://svn.open-ils.org/ILS/trunk@14182 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 4 ++-- Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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 d1319b79f6..4c96083f5c 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -871,9 +871,9 @@ INSERT INTO config.billing_type (id, name, owner) VALUES INSERT INTO config.billing_type (id, name, owner) VALUES ( 9, oils_i18n_gettext(9, 'Notification Fee', 'cbt', 'name'), 1); -SELECT SETVAL('config.billing_type_id_seq'::TEXT, 100); +INSERT INTO config.billing_type (id, name, owner) VALUES ( 101, oils_i18n_gettext(101, 'Misc', 'cbt', 'name'), 1); -INSERT INTO config.billing_type (name, owner) VALUES ( oils_i18n_gettext('Misc', 'Misc', 'cbt', 'name'), 1); +SELECT SETVAL('config.billing_type_id_seq'::TEXT, 101); --006.data.permissions.sql: INSERT INTO permission.perm_list VALUES diff --git a/Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql b/Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql index f24a7a23ec..317ab44d6d 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql @@ -3,6 +3,7 @@ BEGIN; INSERT INTO config.upgrade_log (version) VALUES ('0024'); -- This only gets inserted if there are no other id > 100 billing types -INSERT INTO config.billing_type (name, owner) SELECT DISTINCT oils_i18n_gettext('Misc', 'Misc', 'cbt', 'name'), 1 FROM config.billing_type_id_seq WHERE last_value < 101; +INSERT INTO config.billing_type (id, name, owner) SELECT DISTINCT 101, oils_i18n_gettext(101, 'Misc', 'cbt', 'name'), 1 FROM config.billing_type_id_seq WHERE last_value < 101; +SELECT SETVAL('config.billing_type_id_seq'::TEXT, 101); COMMIT; -- 2.11.0