Revision 8172
Added by Aaron Marcuse-Kubitza over 11 years ago
import | ||
---|---|---|
6 | 6 |
map_table |
7 | 7 |
psql <<'EOF' |
8 | 8 |
SELECT functions.set_col_types('"COND"', ARRAY[ |
9 |
('STATECD' , 'integer')
|
|
10 |
, ('UNITCD' , 'integer')
|
|
9 |
('STATECD', 'integer') |
|
10 |
, ('UNITCD', 'integer') |
|
11 | 11 |
, ('COUNTYCD', 'integer') |
12 |
, ('PLOT' , 'integer')
|
|
13 |
, ('INVYR' , 'integer')
|
|
14 |
, ('CONDID' , 'integer')
|
|
12 |
, ('locationName', 'integer')
|
|
13 |
, ('INVYR', 'integer') |
|
14 |
, ('authorEventCode', 'integer')
|
|
15 | 15 |
]::functions.col_cast[]); |
16 | 16 |
|
17 | 17 |
SELECT functions.create_if_not_exists($$ |
... | ... | |
30 | 30 |
; |
31 | 31 |
$$); |
32 | 32 |
|
33 |
SELECT functions.create_if_not_exists($$ALTER TABLE "COND" ADD CONSTRAINT "COND.ID" UNIQUE ("*COND.CN") $$);
|
|
34 |
SELECT functions.create_if_not_exists($$ALTER TABLE "COND" ADD CONSTRAINT "COND.unique" UNIQUE ("STATECD", "UNITCD", "COUNTYCD", "PLOT", "INVYR", "CONDID")$$);
|
|
33 |
SELECT functions.create_if_not_exists($$ALTER TABLE "COND" ADD CONSTRAINT "COND.ID" UNIQUE ("*COND.CN")$$); |
|
34 |
SELECT functions.create_if_not_exists($$ALTER TABLE "COND" ADD CONSTRAINT "COND.unique" UNIQUE ("STATECD", "UNITCD", "COUNTYCD", "locationName", "INVYR", "authorEventCode")$$);
|
|
35 | 35 |
SELECT functions.cluster_once('"COND"', '"COND.unique"'); |
Also available in: Unified diff
inputs/FIA/*/map.csv: Mapped terms to VegCore