Initial version

This commit is contained in:
Jani Pulkkinen
2025-04-16 15:03:30 +03:00
commit 27a51916a3
24 changed files with 2551 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
-- This file should undo anything in `up.sql`
delete from loota_customer;

View File

@@ -0,0 +1,17 @@
-- Test data
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');