Skip to content

Commit

Permalink
Add reason to aggregated_events
Browse files Browse the repository at this point in the history
Signed-off-by: Niels Thykier <[email protected]>
  • Loading branch information
Niels Thykier committed Jul 16, 2021
1 parent 5c31bf2 commit 470e071
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions datamodel/initdb.d/05_reference_implementation_support.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ CREATE VIEW dcsa_im_v3_0.aggregated_events AS
transport_event.change_remark,
NULL::text AS equipment_reference,
NULL::text AS empty_indicator_code,
NULL::text AS document_id
NULL::text AS document_id,
NULL::text AS reason
FROM dcsa_im_v3_0.transport_event
UNION
SELECT shipment_event.event_id,
Expand All @@ -36,7 +37,8 @@ UNION
NULL::text AS change_remark,
NULL::text AS equipment_reference,
NULL::text AS empty_indicator_code,
shipment_event.document_id AS document_id
shipment_event.document_id AS document_id,
shipment_event.reason AS reason
FROM dcsa_im_v3_0.shipment_event
UNION
SELECT equipment_event.event_id,
Expand All @@ -52,7 +54,8 @@ UNION
NULL::text AS change_remark,
equipment_event.equipment_reference,
equipment_event.empty_indicator_code,
NULL::text AS document_id
NULL::text AS document_id,
NULL::text AS reason
FROM dcsa_im_v3_0.equipment_event;


Expand Down

0 comments on commit 470e071

Please sign in to comment.