Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions database/03-seed-hometest-data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,18 @@ VALUES (
)
ON CONFLICT (order_uid) DO NOTHING;

INSERT INTO order_status (status_id, order_uid, order_reference, status_code)
INSERT INTO order_status (status_id, order_uid, status_code)
VALUES (
'abc2d3e4-1234-4def-8abc-12abcdefabcd',
'e9c0d1e2-9012-4bcd-8efa-90abcdefabcd',
NULL,
'CONFIRMED'
)
ON CONFLICT (status_id) DO NOTHING;

INSERT INTO order_status (status_id, order_uid, order_reference, status_code)
INSERT INTO order_status (status_id, order_uid, status_code)
VALUES (
'bcd3e4f5-2345-4abc-8def-23abcdefabcd',
'fab1c2d3-0123-4cde-8fab-01abcdefabcd',
NULL,
'CONFIRMED'
)
ON CONFLICT (status_id) DO NOTHING;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- +goose Up
ALTER TABLE order_status
DROP COLUMN IF EXISTS order_reference;

Comment thread
cptiv2020 marked this conversation as resolved.

-- +goose Down
ALTER TABLE order_status
ADD COLUMN IF NOT EXISTS order_reference bigint;
5 changes: 2 additions & 3 deletions database/schema_diagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ entity "status_type" as status_type {
entity "order_status" as order_status {
**status_id : uuid**
*order_uid : uuid*
order_reference : bigint
*status_code : varchar(50)*
created_at : timestamp
Comment thread
cptiv2020 marked this conversation as resolved.
correlation_id : uuid
}

entity "result_type" as result_type {
Expand All @@ -60,9 +60,8 @@ entity "result_type" as result_type {
}

entity "result_status" as result_status {
**result_id : uuid**
**result_id : bigint**
*order_uid : uuid*
order_reference : bigint
*status : varchar(50)*
created_at : timestamp
correlation_id : uuid
Expand Down
9 changes: 0 additions & 9 deletions lambdas/src/lib/db/order-status-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ export const OrderStatusCodes = {

export type OrderStatusCode = (typeof OrderStatusCodes)[keyof typeof OrderStatusCodes];

export interface OrderStatusRow {
status_id: string;
order_uid: string;
order_reference: number;
status_code: OrderStatusCode;
created_at: string;
correlation_id: string;
}

export interface OrderRow {
order_uid: string;
patient_uid: string;
Expand Down
Loading