Revision 8125
Added by Aaron Marcuse-Kubitza almost 12 years ago
inputs/FIA/REF_RESEARCH_STATION/postprocess.sql | ||
---|---|---|
1 |
-- contains the research station *and state name* for each state |
|
2 |
|
|
3 |
SELECT functions.to_global_col_names(:table_str); |
|
4 |
|
|
5 |
SELECT functions.rename_if_exists($$ALTER TABLE "REF_RESEARCH_STATION" RENAME "REF_RESEARCH_STATION.STATECD" TO ".STATECD"$$); |
|
6 |
|
|
7 |
SELECT functions.set_col_types(:table_str, ARRAY[ |
|
8 |
('.STATECD' , 'integer') |
|
9 |
]::functions.col_cast[]); |
|
10 |
|
|
11 |
SELECT functions.create_if_not_exists($$ALTER TABLE "REF_RESEARCH_STATION" ADD CONSTRAINT "REF_RESEARCH_STATION.unique" UNIQUE (".STATECD")$$); |
Also available in: Unified diff
Added inputs/FIA/REF_RESEARCH_STATION/postprocess.sql