Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAIN B-22667 #14918

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--B22667 Daniel Jordan adding re_country_prn_divisions table
CREATE TABLE IF NOT EXISTS re_country_prn_divisions (
id uuid NOT NULL PRIMARY KEY,
country_id uuid NOT NULL
CONSTRAINT fk_re_country_prn_divisions_re_countries REFERENCES re_countries (id),
country_prn_dv_id text NOT NULL,
country_prn_dv_nm text NOT NULL,
country_prn_dv_cd text NOT NULL,
command_org_cd text,
created_at timestamp NOT NULL DEFAULT NOW(),
updated_at timestamp NOT NULL DEFAULT NOW()
);

COMMENT ON TABLE re_country_prn_divisions IS 'Stores country principal division data';
COMMENT ON COLUMN re_country_prn_divisions.country_id IS 'The ID for the Country';
COMMENT ON COLUMN re_country_prn_divisions.country_prn_dv_id IS 'The FIPS ID for the country principal division';
COMMENT ON COLUMN re_country_prn_divisions.country_prn_dv_nm IS 'The name of the country principal division';
COMMENT ON COLUMN re_country_prn_divisions.country_prn_dv_cd IS 'The code that represents a country principal division';
COMMENT ON COLUMN re_country_prn_divisions.command_org_cd IS 'The code that represents the responsible command';
1 change: 1 addition & 0 deletions migrations/app/ddl_tables_manifest.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This is the tables migrations manifest.
# If a migration is not recorded here, then it will error.
# Naming convention: tbl_some_table.up.sql running <generate-ddl-migration some_table tables> will create this file.
20250227211221_tbl_re_country_prn_divisions.up.sql
2 changes: 2 additions & 0 deletions migrations/app/dml_migrations_manifest.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This is the migrations manifest.
# If a migration is not recorded here, then it will error.
# Naming convention: 202502201325_B-123456_update_some_table.up.sql running <milmove gen migration -n B-123456_update_some_table> will create this file.
20250227211521_update_re_countries.up.sql
20250227211534_update_re_country_prn_divisions.up.sql
28 changes: 28 additions & 0 deletions migrations/app/schema/20250227211521_update_re_countries.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
--B-22667 Daniel Jordan insert missing re_countries
INSERT INTO re_countries (id,country,country_name,created_at,updated_at) VALUES
('9aea5ad2-06f9-469f-a5cf-dcac445763fe'::uuid,'LU','LUXEMBOURG', now(), now()),
('f6c592fb-cbb1-4972-99a5-df278d05b0f8'::uuid,'EH','WESTERN SAHARA', now(), now()),
('4fa5e266-740c-428b-a004-f0035a4e41fe'::uuid,'MC','MONACO', now(), now()),
('ca5d0fb9-6b02-4d54-9e03-224e7f953be5'::uuid,'ZW','ZIMBABWE',now(), now()),
('c186278a-9765-44c3-a217-644576612d42'::uuid,'VE','VENEZUELA, BOLIVARIAN REPUBLIC OF',now(), now()),
('de1ada23-bbfb-4ffe-8bf5-b0ef5199c638'::uuid,'WF','WALLIS AND FUTUNA',now(), now()),
('97c29b47-10d7-4272-a776-e57897c56e38'::uuid,'XT','TROMELIN ISLAND',now(), now()),
('121535fd-8a9d-4371-9675-5cd38ecda618'::uuid,'MR','MAURITANIA',now(), now()),
('4a513d92-5683-4e78-8a0f-7ee6daa3be05'::uuid,'MX','MEXICO',now(), now()),
('7826089e-8793-4836-859a-f6611c42b53c'::uuid,'NF','NORFOLK ISLAND',now(), now()),
('133e7ecf-b7d5-4e94-8c56-95aa2ab5d0d0'::uuid,'NI','NICARAGUA',now(), now()),
('0d09232b-3de3-41c8-9d65-983dc33fc380'::uuid,'NR','NAURU',now(), now()),
('fdab246f-ca09-471a-9b68-860913505d36'::uuid,'PE','PERU',now(), now());
INSERT INTO re_countries (id,country,country_name,created_at,updated_at) VALUES
('1527d7fb-6f20-4b62-adce-d852a8c3878c'::uuid,'PK','PAKISTAN',now(), now()),
('16cbce26-ecb2-4d6a-812f-c33c885acbb0'::uuid,'PT','PORTUGAL',now(), now()),
('294ed04a-7a6b-4dcc-af07-ba3df5f65e24'::uuid,'RE','REUNION',now(), now()),
('3aa8a7bd-b9e2-4d05-b320-96a2d0241f18'::uuid,'RU','RUSSIA',now(), now()),
('923bfc7c-8c89-4f13-915a-7b2d4bdb8518'::uuid,'SL','SIERRA LEONE',now(), now()),
('02e6d9ac-6b49-4581-90c7-3fe65d7ec7dc'::uuid,'SY','SYRIA',now(), now()),
('236648cf-cc72-403b-991a-3057fe29db31'::uuid,'TG','TOGO',now(), now()),
('bf965b0e-b044-4b3e-9cdb-054344a5170e'::uuid,'TL','EAST TIMOR',now(), now()),
('0f3ff01c-ce82-43ef-9960-808a93d9c694'::uuid,'TM','TURKMENISTAN',now(), now()),
('333a1c23-a106-4d9c-bbd8-1dbacb8e2ddb'::uuid,'TZ','TANZANIA',now(), now());
INSERT INTO re_countries (id,country,country_name,created_at,updated_at) VALUES
('8aea6730-6738-450c-985e-1964a514a355'::uuid,'UZ','UZBEKISTAN',now(), now());
Loading
Loading