-
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
1 parent
15a943a
commit aaaf0ff
Showing
18 changed files
with
203 additions
and
83 deletions.
There are no files selected for viewing
17 changes: 9 additions & 8 deletions
17
migrations/app/schema/20241004203140_update_addresses_is_oconus.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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
DO $$ | ||
BEGIN | ||
UPDATE addresses | ||
SET is_oconus = CASE | ||
WHEN country IN ('US', 'United States') THEN false | ||
ELSE true | ||
END; | ||
END $$; | ||
-- Set temp timeout due to potentially large modification | ||
-- Time is 5 minutes in milliseconds | ||
SET statement_timeout = 300000; | ||
SET lock_timeout = 300000; | ||
SET idle_in_transaction_session_timeout = 300000; | ||
|
||
-- Update is_oconus value on the addresses table based on the addresses country and the state | ||
UPDATE addresses | ||
SET is_oconus = CASE |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
COPY public.addresses (id, street_address_1, street_address_2, city, state, postal_code, created_at, updated_at, street_address_3, country) FROM stdin; | ||
82b2ee8a-ee1c-48ef-a066-14ba1129330d 123 Any St \N Ellsworth DO AFB SD 57706 2018-05-28 14:27:38.959754 2018-05-28 14:27:38.959755 \N United States | ||
\. | ||
COPY public.addresses (id, street_address_1, street_address_2, city, state, postal_code, created_at, updated_at, street_address_3, is_oconus, country_id) FROM stdin; | ||
82b2ee8a-ee1c-48ef-a066-14ba1129330d 123 Any St \N Ellsworth DO AFB SD 57706 2018-05-28 14:27:38.959754 2018-05-28 14:27:38.959755 \N f 791899e6-cd77-46f2-981b-176ecb8d7098 | ||
\. |
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
Oops, something went wrong.