logic error; only want to change the sequence if we are insert this billing type
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 28 Sep 2009 20:45:54 +0000 (20:45 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 28 Sep 2009 20:45:54 +0000 (20:45 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14183 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql

index 317ab44..ef886fa 100644 (file)
@@ -4,6 +4,6 @@ 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 (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);
+SELECT SETVAL('config.billing_type_id_seq'::TEXT, 101) FROM config.billing_type_id_seq WHERE last_value < 101;
 
 COMMIT;