Skip to content

Commit

Permalink
Merge pull request #4 from mitre/private_address_updates
Browse files Browse the repository at this point in the history
Add Missing Private Address Columns
  • Loading branch information
dehall authored Oct 13, 2022
2 parents 09ff2b9 + f7fa6c3 commit 0821ed8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ancillary_codi_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ CREATE TABLE CDM.PRIVATE_ADDRESS_HISTORY
ADDRESS_STATE char(2) NULL,
ADDRESS_TYPE char(2) NOT NULL,
ADDRESS_PREFERRED char(2) NOT NULL,
ADDRESS_USE char(2) NULL,
ADDRESS_ZIP9 char(9) NULL,
RAW_ADDRESS_TEXT varchar NULL,
CHECK (ADDRESS_STATE in ('AL','AK','AS','AZ','AR','CA',
'CO','CT','DE','DC','FM','FL','GA','GU','HI','ID',
'IL','IN','IA','KS','KY','LA','ME','MH','MD','MA','MI','MN','MS',
Expand All @@ -421,6 +424,7 @@ CREATE TABLE CDM.PRIVATE_ADDRESS_HISTORY
'WA','WV','WI','WY','AE','AP','AA','NI','UN','OT')),
CHECK(ADDRESS_TYPE in('PO','PH','NI','UN','OT')),
CHECK(ADDRESS_PREFERRED in('Y', 'N', 'R', 'NI', 'UN', 'OT')),
CHECK(ADDRESS_USE in ('HO', 'WO', 'TP', 'OL', 'NI', 'UN', 'OT')),
PRIMARY KEY(ADDRESSID),
FOREIGN KEY(PATID) REFERENCES CDM.DEMOGRAPHIC (PATID)
);

0 comments on commit 0821ed8

Please sign in to comment.