From b0bc08c3c77ab1ae60ed04e9e7a987267139c3ef Mon Sep 17 00:00:00 2001 From: Martin Carlsson Date: Wed, 14 Apr 2021 11:08:48 +0200 Subject: [PATCH] P5-7080 add framed prints discount codes (#214) --- migrations/000.329.sql | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 migrations/000.329.sql diff --git a/migrations/000.329.sql b/migrations/000.329.sql new file mode 100644 index 0000000..2bd8bcc --- /dev/null +++ b/migrations/000.329.sql @@ -0,0 +1,30 @@ +-- P5-7080: add framed prints discount codes + +insert into discount_codes (name, value, type, start, "end", code) values + -- belgium + ('Framed prints -10%', 10, '%', '2020-01-01 08:00:00', '2030-12-30 23:00:00', 'framedprintsbuy2-be'), + ('Framed prints -15%', 15, '%', '2020-01-01 08:00:00', '2030-12-30 23:00:00', 'framedprintsbuy3-be'), + ('Framed prints -20%', 20, '%', '2020-01-01 08:00:00', '2030-12-30 23:00:00', 'framedprintsbuy4-be'), + -- canada + ('Framed prints -10%', 10, '%', '2020-01-01 08:00:00', '2030-12-30 23:00:00', 'framedprintsbuy2-ca'), + ('Framed prints -15%', 15, '%', '2020-01-01 08:00:00', '2030-12-30 23:00:00', 'framedprintsbuy3-ca'), + ('Framed prints -20%', 20, '%', '2020-01-01 08:00:00', '2030-12-30 23:00:00', 'framedprintsbuy4-ca'), + -- italy + ('Stampe Incorniciate -10%', 10, '%', '2020-01-01 08:00:00', '2030-12-30 23:00:00', 'framedprintsbuy2-it'), + ('Stampe Incorniciate -15%', 15, '%', '2020-01-01 08:00:00', '2030-12-30 23:00:00', 'framedprintsbuy3-it'), + ('Stampe Incorniciate -20%', 20, '%', '2020-01-01 08:00:00', '2030-12-30 23:00:00', 'framedprintsbuy4-it'); + + +insert into discount_code_filters (filter_name, filter_value, discount_code_id) values + --belgium + ('group', 'framed-print', (select discountid from discount_codes where code = 'framedprintsbuy2-be')), + ('group', 'framed-print', (select discountid from discount_codes where code = 'framedprintsbuy3-be')), + ('group', 'framed-print', (select discountid from discount_codes where code = 'framedprintsbuy4-be')), + --canada + ('group', 'framed-print', (select discountid from discount_codes where code = 'framedprintsbuy2-ca')), + ('group', 'framed-print', (select discountid from discount_codes where code = 'framedprintsbuy3-ca')), + ('group', 'framed-print', (select discountid from discount_codes where code = 'framedprintsbuy4-ca')), + --italy + ('group', 'framed-print', (select discountid from discount_codes where code = 'framedprintsbuy2-it')), + ('group', 'framed-print', (select discountid from discount_codes where code = 'framedprintsbuy3-it')), + ('group', 'framed-print', (select discountid from discount_codes where code = 'framedprintsbuy4-it'));