Advertisement
fedorm

fedorm

Aug 9th, 2018
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 1.24 KB | None | 0 0
  1. INSERT INTO service_type (id, name) SELECT NEXTVAL('hibernate_sequence'), 'bonuses' WHERE NOT EXISTS (SELECT 1 FROM service_type WHERE name = 'bonuses');
  2. INSERT INTO service_provider (id, DELETED, name, registered_name, service_type)
  3. VALUES (NEXTVAL('hibernate_sequence'), FALSE, 'CFTBonuses', 'Бонусные карты ЦФТ', (SELECT id FROM service_type WHERE name LIKE 'bonuses'));
  4. INSERT INTO service_provider_settings(id, name, VALUE, provider, shop)
  5. VALUES (NEXTVAL('hibernate_sequence'), 'cardPrefixes', '998877', (SELECT id FROM service_provider WHERE name='CFTBonuses' AND deleted=FALSE), 0);
  6. INSERT INTO service_provider_settings(id, name, VALUE, provider, shop)
  7. VALUES (NEXTVAL('hibernate_sequence'), 'maxPercentDiscount', '90', (SELECT id FROM service_provider WHERE name='CFTBonuses' AND deleted=FALSE), 0);
  8. INSERT INTO service_provider_settings(id, name, VALUE, provider, shop)
  9. VALUES (NEXTVAL('hibernate_sequence'), 'actionCardsPrefixes', '998878', (SELECT id FROM service_provider WHERE name='CFTBonuses' AND deleted=FALSE), 0);
  10. INSERT INTO service_provider_settings(id, name, VALUE, provider, shop)
  11. VALUES (NEXTVAL('hibernate_sequence'), 'actionMaxPercentDiscount', '90', (SELECT id FROM service_provider WHERE name='CFTBonuses' AND deleted=FALSE), 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement