-- add them here. It's okay if they fail, so this should probably be
-- run outside a transaction if added to the version-upgrade scripts.
-INSERT INTO config.billing_type (id, name, owner) VALUES
- ( 7, oils_i18n_gettext(7, 'Damaged Item', 'cbt', 'name'), 1);
-INSERT INTO config.billing_type (id, name, owner) VALUES
- ( 8, oils_i18n_gettext(8, 'Damaged Item Processing Fee', 'cbt', 'name'), 1);
-INSERT INTO config.billing_type (id, name, owner) VALUES
- ( 9, oils_i18n_gettext(9, 'Notification Fee', 'cbt', 'name'), 1);
+INSERT INTO config.billing_type (id, name, owner)
+ SELECT 7, 'Damaged Item', 1
+ WHERE NOT EXISTS (SELECT 1 FROM config.billing_type WHERE name = 'Damaged Item');
+
+INSERT INTO config.billing_type (id, name, owner)
+ SELECT 8, 'Damaged Item Processing Fee', 1
+ WHERE NOT EXISTS (SELECT 1 FROM config.billing_type WHERE name = 'Damaged Item Processing Fee');
+
+INSERT INTO config.billing_type (id, name, owner)
+ SELECT 9, 'Notification Fee', 1
+ WHERE NOT EXISTS (SELECT 1 FROM config.billing_type WHERE name = 'Notification Fee');
COMMIT;