Revision 8170
Added by Aaron Marcuse-Kubitza almost 12 years ago
import | ||
---|---|---|
6 | 6 |
map_table |
7 | 7 |
psql <<'EOF' |
8 | 8 |
SELECT functions.set_col_types('"COUNTY"', ARRAY[ |
9 |
('.STATECD' , 'integer')
|
|
10 |
, ('.UNITCD' , 'integer')
|
|
11 |
, ('.COUNTYCD', 'integer')
|
|
9 |
('STATECD' , 'integer') |
|
10 |
, ('UNITCD' , 'integer') |
|
11 |
, ('COUNTYCD', 'integer') |
|
12 | 12 |
]::functions.col_cast[]); |
13 | 13 |
|
14 |
SELECT functions.create_if_not_exists($$ALTER TABLE "COUNTY" ADD CONSTRAINT "COUNTY.ID" UNIQUE ("COUNTY.CN") $$);
|
|
14 |
SELECT functions.create_if_not_exists($$ALTER TABLE "COUNTY" ADD CONSTRAINT "COUNTY.ID" UNIQUE ("*COUNTY.CN") $$);
|
|
15 | 15 |
SELECT functions.create_if_not_exists($$ALTER TABLE "COUNTY" ADD CONSTRAINT "COUNTY.unique" UNIQUE ("STATECD", "UNITCD", "COUNTYCD")$$); |
Also available in: Unified diff
inputs/FIA/*/import: Updated column names to match map.csv