-
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.
- Loading branch information
Showing
285 changed files
with
5,902 additions
and
1,804 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
19 changes: 19 additions & 0 deletions
19
migrations/app/schema/20240506214039_add_submitted_columns_to_ppm_document_tables.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,19 @@ | ||
ALTER TABLE weight_tickets | ||
ADD COLUMN IF NOT EXISTS submitted_empty_weight INT4 DEFAULT NULL, | ||
ADD COLUMN IF NOT EXISTS submitted_full_weight INT4 DEFAULT NULL; | ||
|
||
COMMENT ON COLUMN weight_tickets.submitted_empty_weight IS 'Stores the customer submitted empty_weight.'; | ||
COMMENT ON COLUMN weight_tickets.submitted_full_weight IS 'Stores the customer submitted full_weight.'; | ||
|
||
ALTER TABLE progear_weight_tickets ADD COLUMN IF NOT EXISTS submitted_weight INT4 DEFAULT NULL; | ||
|
||
COMMENT ON COLUMN progear_weight_tickets.submitted_weight IS 'Stores the customer submitted weight.'; | ||
|
||
ALTER TABLE moving_expenses | ||
ADD COLUMN IF NOT EXISTS submitted_amount INT4 DEFAULT NULL, | ||
ADD COLUMN IF NOT EXISTS submitted_sit_start_date DATE DEFAULT NULL, | ||
ADD COLUMN IF NOT EXISTS submitted_sit_end_date DATE DEFAULT NULL; | ||
|
||
COMMENT ON COLUMN moving_expenses.submitted_amount IS 'Stores the customer submitted amount.'; | ||
COMMENT ON COLUMN moving_expenses.submitted_sit_start_date IS 'Stores the customer submitted sit_start_date.'; | ||
COMMENT ON COLUMN moving_expenses.submitted_sit_end_date IS 'Stores the customer submitted sit_end_date.'; |
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,9 @@ | ||
-- Insert CSR as a separate role as part of the feature to split QAE/CSR into two separate roles | ||
INSERT INTO roles (id, role_type, created_at, updated_at, role_name) | ||
VALUES ( | ||
'72432922-BF2E-45DE-8837-1A458F5D1011', | ||
'customer_service_representative', | ||
now(), | ||
now(), | ||
'Customer Service Representative' | ||
); |
2 changes: 2 additions & 0 deletions
2
migrations/app/schema/20240524214247_add_sit_location_moving_expenses.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,2 @@ | ||
ALTER TABLE moving_expenses ADD COLUMN IF NOT EXISTS sit_location sit_location_type NULL; | ||
COMMENT ON COLUMN moving_expenses.sit_location IS 'The location where PPM SIT was stored'; |
11 changes: 11 additions & 0 deletions
11
migrations/app/schema/20240530020648_adding_standalone_crate_service_param.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,11 @@ | ||
INSERT INTO service_item_param_keys | ||
(id,key,description,type,origin,created_at,updated_at) | ||
VALUES | ||
('4313f804-f6c7-496a-88a0-089d6c588b75','StandaloneCrate', 'Boolean representing standalone or not', 'BOOLEAN', 'PRIME', now(), now()), | ||
('ca1d6588-880e-45b6-9761-aa2ce914e2f6','StandaloneCrateCap', 'Standalone Cap value used for this service', 'INTEGER', 'PRIME', now(), now()); | ||
|
||
INSERT INTO service_params | ||
(id,service_id,service_item_param_key_id,created_at,updated_at,is_optional) | ||
VALUES | ||
('3a051dbf-f8b1-4c09-9ed8-74e155c69a5d',(SELECT id FROM re_services WHERE code='DCRT'),(SELECT id FROM service_item_param_keys where key='StandaloneCrate'), now(), now(), 'true'), | ||
('b1de3b51-9cd8-43ab-b186-ca4c7796be03',(SELECT id FROM re_services WHERE code='DCRT'),(SELECT id FROM service_item_param_keys where key='StandaloneCrateCap'), now(), now(), 'true'); |
6 changes: 6 additions & 0 deletions
6
migrations/app/schema/20240530084720_rename_qae_csr_to_just_qae.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,6 @@ | ||
-- Rename QAE/CSR to just QAE per E-05337 | ||
UPDATE roles | ||
SET role_name = 'Quality Assurance Evaluator', | ||
role_type = 'qae', | ||
updated_at = now() | ||
WHERE id = 'a2af3cc0-d0cd-4a29-8092-70ad45723090'; |
4 changes: 4 additions & 0 deletions
4
migrations/app/schema/20240531050324_adding_standalone_crate_cap.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,4 @@ | ||
INSERT into application_parameters | ||
(id, parameter_name, parameter_value) | ||
VALUES | ||
('61a6c498-42d3-4b49-b368-b6165cd1ce18', 'standaloneCrateCap', '100000'); |
17 changes: 17 additions & 0 deletions
17
migrations/app/schema/20240531152430_migrate_data_to_new_ppm_statuses.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,17 @@ | ||
--- rename existing enum | ||
ALTER TYPE ppm_shipment_status RENAME TO ppm_shipment_status_temp; | ||
|
||
-- create a new enum with both old and new statuses | ||
-- why? because both old and new statuses must exist in the enum to do the update setting old to new | ||
CREATE TYPE ppm_shipment_status AS ENUM('DRAFT', 'SUBMITTED', 'WAITING_ON_CUSTOMER', 'NEEDS_ADVANCE_APPROVAL', 'NEEDS_PAYMENT_APPROVAL', 'PAYMENT_APPROVED', 'NEEDS_CLOSEOUT', 'CLOSEOUT_COMPLETE'); | ||
|
||
-- alter the ppm shipments status column to use the new enum | ||
ALTER TABLE ppm_shipments ALTER COLUMN status TYPE ppm_shipment_status USING status::text::ppm_shipment_status; | ||
|
||
-- get rid of the temp type | ||
DROP TYPE ppm_shipment_status_temp; | ||
|
||
-- Remove references to the old value from the ppm_shipments table (there probably aren't any, but this is for safety) | ||
UPDATE ppm_shipments set status = 'NEEDS_CLOSEOUT' WHERE status = 'NEEDS_PAYMENT_APPROVAL'; | ||
UPDATE ppm_shipments set status = 'CLOSEOUT_COMPLETE' WHERE status = 'PAYMENT_APPROVED'; | ||
|
12 changes: 12 additions & 0 deletions
12
migrations/app/schema/20240531152526_remove_ppm_statuses_no_longer_used.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,12 @@ | ||
--- rename existing enum | ||
ALTER TYPE ppm_shipment_status RENAME TO ppm_shipment_status_temp; | ||
|
||
-- create a new enum with both old and new statuses | ||
-- why? because both old and new statuses must exist in the enum to do the update setting old to new | ||
CREATE TYPE ppm_shipment_status AS ENUM('DRAFT', 'SUBMITTED', 'WAITING_ON_CUSTOMER', 'NEEDS_ADVANCE_APPROVAL', 'NEEDS_CLOSEOUT', 'CLOSEOUT_COMPLETE'); | ||
|
||
-- alter the ppm shipments status column to use the new enum | ||
ALTER TABLE ppm_shipments ALTER COLUMN status TYPE ppm_shipment_status USING status::text::ppm_shipment_status; | ||
|
||
-- get rid of the temp type | ||
DROP TYPE ppm_shipment_status_temp; |
13 changes: 13 additions & 0 deletions
13
...ations/app/schema/20240531154303_add_more_submitted_columns_to_ppm_document_tables.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,13 @@ | ||
ALTER TABLE weight_tickets | ||
ADD COLUMN IF NOT EXISTS submitted_owns_trailer boolean DEFAULT NULL, | ||
ADD COLUMN IF NOT EXISTS submitted_trailer_meets_criteria boolean DEFAULT NULL; | ||
|
||
COMMENT ON COLUMN weight_tickets.submitted_owns_trailer IS 'Stores the customer submitted owns_trailer.'; | ||
COMMENT ON COLUMN weight_tickets.submitted_trailer_meets_criteria IS 'Stores the customer submitted trailer_meets_criteria.'; | ||
|
||
ALTER TABLE progear_weight_tickets | ||
ADD COLUMN IF NOT EXISTS submitted_belongs_to_self boolean DEFAULT NULL, | ||
ADD COLUMN IF NOT EXISTS submitted_has_weight_tickets boolean DEFAULT NULL; | ||
|
||
COMMENT ON COLUMN progear_weight_tickets.submitted_belongs_to_self IS 'Stores the customer belongs_to_self.'; | ||
COMMENT ON COLUMN progear_weight_tickets.submitted_has_weight_tickets IS 'Stores the customer submitted has_weight_tickets.'; |
Oops, something went wrong.