Revision 6759
Added by Aaron Marcuse-Kubitza almost 12 years ago
cvs.~.clean_up.sql | ||
---|---|---|
1 |
-- Ensure column names have the same capitalization everywhere |
|
2 |
ALTER TABLE "stemCount" RENAME "TAXONIMPORTANCE_ID" TO "taxonImportance_ID"; |
|
3 |
|
|
1 | 4 |
-- Prevent "column name specified more than once" errors when tables are joined |
2 | 5 |
ALTER TABLE "soilObs" RENAME "dba_src_ID" TO "soilObs_dba_src_ID"; |
3 | 6 |
ALTER TABLE "taxonObservation" RENAME "reference_ID" TO "taxonObservation_reference_ID"; |
4 | 7 |
ALTER TABLE "taxonObservation" RENAME "accessionCode" TO "taxonObservation_accessionCode"; |
5 | 8 |
ALTER TABLE "taxonObservation" RENAME "dba_src_ID" TO "taxonObservation_dba_src_ID"; |
6 | 9 |
ALTER TABLE "taxonObservation" RENAME "entry_sppID" TO "taxonObservation_entry_sppID"; |
10 |
ALTER TABLE "taxonImportance" RENAME "dba_src_ID" TO "taxonImportance_dba_src_ID"; |
|
11 |
ALTER TABLE "taxonImportance" RENAME "entry_herbLineID" TO "taxonImportance_entry_herbLineID"; |
|
12 |
ALTER TABLE "taxonImportance" RENAME "entry_treeLineID" TO "taxonImportance_entry_treeLineID"; |
|
13 |
ALTER TABLE "stemCount" RENAME "dba_src_ID" TO "stemCount_dba_src_ID"; |
|
14 |
ALTER TABLE "stemCount" RENAME "entry_herbLineID" TO "stemCount_entry_herbLineID"; |
|
15 |
ALTER TABLE "stemCount" RENAME "entry_treeLineID" TO "stemCount_entry_treeLineID"; |
|
7 | 16 |
ALTER TABLE "taxonInterpretation" RENAME "PARTY_ID" TO "taxonInterpretation_PARTY_ID"; |
8 | 17 |
ALTER TABLE "taxonInterpretation" RENAME "PLANTNAME_ID" TO "taxonInterpretation_PLANTNAME_ID"; |
9 | 18 |
ALTER TABLE "taxonInterpretation" RENAME "dba_src_ID" TO "taxonInterpretation_dba_src_ID"; |
Also available in: Unified diff
inputs/CVS/: Joined together taxonImportance and stemCount tables to create stemCount_, because stemCount actually stores stem abundance by size, rather than grouping stems by organism (http://vegbankdev.nceas.ucsb.edu/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename), and is thus an AggregateOccurrence-related table along with taxonImportance