Migration to add actual production data of 2025 season
This commit is contained in:
19
migrations/2025-06-27-152623_orders_2025_1/down.sql
Normal file
19
migrations/2025-06-27-152623_orders_2025_1/down.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
DELETE FROM loota_customer;
|
||||
DELETE FROM loota_order;
|
||||
DELETE FROM loota_box;
|
||||
|
||||
insert into loota_customer (identifier) values ( 'customer1');
|
||||
insert into loota_customer (identifier) values ( 'customer2');
|
||||
|
||||
insert into loota_order (customer_id, location) values ( (select id from loota_customer where identifier = 'customer1'), 'location1');
|
||||
insert into loota_order (customer_id, location) values ( (select id from loota_customer where identifier = 'customer2'), 'location1');
|
||||
|
||||
insert into loota_box (order_id, delivery_date) values ( (select id from loota_order where customer_id = (select id from loota_customer where identifier = 'customer1')), '2025-04-15 10:00:00+00');
|
||||
insert into loota_box (order_id, delivery_date) values ( (select id from loota_order where customer_id = (select id from loota_customer where identifier = 'customer1')), '2025-04-16 10:00:00+00');
|
||||
insert into loota_box (order_id, delivery_date) values ( (select id from loota_order where customer_id = (select id from loota_customer where identifier = 'customer1')), '2025-04-17 10:00:00+00');
|
||||
insert into loota_box (order_id, delivery_date) values ( (select id from loota_order where customer_id = (select id from loota_customer where identifier = 'customer1')), '2025-04-18 10:00:00+00');
|
||||
|
||||
insert into loota_box (order_id, delivery_date) values ( (select id from loota_order where customer_id = (select id from loota_customer where identifier = 'customer2')), '2025-04-15 10:00:00+00');
|
||||
insert into loota_box (order_id, delivery_date) values ( (select id from loota_order where customer_id = (select id from loota_customer where identifier = 'customer2')), '2025-05-16 10:00:00+00');
|
||||
insert into loota_box (order_id, delivery_date) values ( (select id from loota_order where customer_id = (select id from loota_customer where identifier = 'customer2')), '2025-06-17 10:00:00+00');
|
||||
insert into loota_box (order_id, delivery_date) values ( (select id from loota_order where customer_id = (select id from loota_customer where identifier = 'customer2')), '2025-07-18 10:00:00+00');
|
||||
1172
migrations/2025-06-27-152623_orders_2025_1/up.sql
Normal file
1172
migrations/2025-06-27-152623_orders_2025_1/up.sql
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user