-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into B-20235-MAIN
- Loading branch information
Showing
116 changed files
with
3,592 additions
and
421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
migrations/app/schema/20240516230021_add_third_address_shipments.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
-- Adds tertiary addresses to ppm_shipments. | ||
-- Only adds if the columns don't exist | ||
ALTER TABLE ppm_shipments | ||
ADD COLUMN IF NOT EXISTS tertiary_pickup_postal_address_id UUID NULL, | ||
ADD COLUMN IF NOT EXISTS tertiary_destination_postal_address_id UUID NULL, | ||
ADD COLUMN IF NOT EXISTS has_tertiary_pickup_address bool NULL, | ||
ADD COLUMN IF NOT EXISTS has_tertiary_destination_address bool NULL; | ||
|
||
COMMENT ON COLUMN ppm_shipments.tertiary_pickup_postal_address_id IS 'The tertiary destination address for this shipment.'; | ||
COMMENT ON COLUMN ppm_shipments.tertiary_destination_postal_address_id IS 'The tertiary destination address for this shipment.'; | ||
COMMENT ON COLUMN ppm_shipments.has_tertiary_pickup_address IS 'False if the ppm shipment does not have a tertiary pickup address. This column exists to make it possible to tell whether a shipment update should delete an address or not modify it.'; | ||
COMMENT ON COLUMN ppm_shipments.has_tertiary_destination_address IS 'False if the ppm shipment does not have a tertiary destination address. This column exists to make it possible to tell whether a shipment update should delete an address or not modify it.'; | ||
|
||
ALTER TABLE ppm_shipments ADD CONSTRAINT ppm_shipments_pickup_postal_address_id_fkey FOREIGN KEY (tertiary_pickup_postal_address_id) REFERENCES addresses(id); | ||
ALTER TABLE ppm_shipments ADD CONSTRAINT ppm_shipments_destination_postal_address_id_fkey FOREIGN KEY (tertiary_destination_postal_address_id) REFERENCES addresses(id); | ||
|
||
ALTER TABLE mto_shipments | ||
ADD COLUMN IF NOT EXISTS tertiary_pickup_address_id UUID NULL, | ||
ADD COLUMN IF NOT EXISTS tertiary_delivery_address_id UUID NULL, | ||
ADD COLUMN IF NOT EXISTS has_tertiary_pickup_address bool NULL, | ||
ADD COLUMN IF NOT EXISTS has_tertiary_delivery_address bool NULL; | ||
|
||
COMMENT ON COLUMN mto_shipments.tertiary_pickup_address_id IS 'The secondary pickup address for this shipment.'; | ||
COMMENT ON COLUMN mto_shipments.tertiary_delivery_address_id IS 'The secondary delivery address for this shipment.'; | ||
COMMENT ON COLUMN mto_shipments.has_tertiary_pickup_address IS 'False if the ppm shipment does not have a tertiary pickup address. This column exists to make it possible to tell whether a shipment update should delete an address or not modify it.'; | ||
COMMENT ON COLUMN mto_shipments.has_tertiary_delivery_address IS 'False if the ppm shipment does not have a tertiary pickup address. This column exists to make it possible to tell whether a shipment update should delete an address or not modify it.'; | ||
|
||
ALTER TABLE mto_shipments ADD CONSTRAINT mto_shipments_pickup_postal_address_id_fkey FOREIGN KEY (tertiary_pickup_address_id) REFERENCES addresses(id); | ||
ALTER TABLE mto_shipments ADD CONSTRAINT mto_shipments_destination_postal_address_id_fkey FOREIGN KEY (tertiary_delivery_address_id) REFERENCES addresses(id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.