Skip to content

Commit f2295de

Browse files
authored
Merge pull request #10 from virtuelabs-io/feature/item-name-addition
Item name addition
2 parents cad3983 + 5c2636e commit f2295de

File tree

7 files changed

+211
-204
lines changed

7 files changed

+211
-204
lines changed

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ variables:
1212
fargate: true
1313
imageName: 'rapido-db-migrations'
1414
major: 0
15-
minor: 0
16-
patch: 1
15+
minor: 1
16+
patch: 0
1717

1818
pr:
1919
branches:

src/migrations/customer/00003_orders_ddl.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ CREATE TABLE IF NOT EXISTS orders.delivery_cost (
2828

2929
CREATE TABLE IF NOT EXISTS orders.products (
3030
id MEDIUMINT,
31+
item_name VARCHAR(100),
3132
unit_price DECIMAL(11,2),
32-
quantity_in_stock DECIMAL(9,2),
3333
active BOOLEAN DEFAULT TRUE,
3434
created_on DATETIME DEFAULT CURRENT_TIMESTAMP,
3535
updated_on DATETIME ON UPDATE CURRENT_TIMESTAMP,

src/migrations/customer/00005_guests_ddl.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ CREATE TABLE IF NOT EXISTS guests.address_type (
3434

3535
CREATE TABLE IF NOT EXISTS guests.products (
3636
id MEDIUMINT,
37+
item_name VARCHAR(100),
3738
unit_price DECIMAL(11,2),
38-
quantity_in_stock DECIMAL(9,2),
3939
active BOOLEAN DEFAULT TRUE,
4040
created_on DATETIME DEFAULT CURRENT_TIMESTAMP,
4141
updated_on DATETIME ON UPDATE CURRENT_TIMESTAMP,

src/migrations/customer/00102_orders_seed.sql

Lines changed: 100 additions & 100 deletions
Large diffs are not rendered by default.

src/migrations/customer/00103_guests_seed.sql

Lines changed: 101 additions & 100 deletions
Large diffs are not rendered by default.

src/migrations/procedures/guests/get_order.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ BEGIN
1010
i.product_id,
1111
i.quantity,
1212
i.unit_price,
13+
i.item_name,
1314
i.total_price,
1415
i.item_vat,
1516
h.order_price,
@@ -32,6 +33,8 @@ BEGIN
3233
ON h.id = i.order_id
3334
LEFT JOIN guests.address AS a
3435
on h.session_id = a.session_id
36+
LEFT JOIN guests.products AS p
37+
on i.product_id = p.id
3538
WHERE h.id = in_order_id
3639
AND h.session_id = in_session_id;
3740

src/migrations/procedures/orders/get_order.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ BEGIN
1111
i.product_id,
1212
i.quantity,
1313
i.unit_price,
14+
i.item_name,
1415
i.total_price,
1516
i.item_vat,
1617
h.order_price,
@@ -31,6 +32,8 @@ BEGIN
3132
ON h.id = i.order_id
3233
LEFT JOIN customer.address AS a
3334
on h.delivery_address_id = a.id
35+
LEFT JOIN orders.products AS p
36+
on i.product_id = p.id
3437
WHERE h.id = in_order_id
3538
AND h.customer_id = in_customer_id;
3639

0 commit comments

Comments
 (0)