Revision 3201
Added by Aaron Marcuse-Kubitza over 12 years ago
vegbien.my.sql | ||
---|---|---|
638 | 638 |
CREATE TABLE location ( |
639 | 639 |
location_id int(11) NOT NULL, |
640 | 640 |
parent_id int(11), |
641 |
datasource_id int(11), |
|
642 |
sourceaccessioncode text, |
|
641 | 643 |
centerlatitude double precision, |
642 | 644 |
centerlongitude double precision, |
643 | 645 |
locationaccuracy double precision, |
... | ... | |
3114 | 3116 |
|
3115 | 3117 |
|
3116 | 3118 |
-- |
3119 |
-- Name: location_unique_sourceaccessioncode; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3120 |
-- |
|
3121 |
|
|
3122 |
ALTER TABLE location |
|
3123 |
ADD CONSTRAINT location_unique_sourceaccessioncode UNIQUE (datasource_id, sourceaccessioncode); |
|
3124 |
|
|
3125 |
|
|
3126 |
-- |
|
3117 | 3127 |
-- Name: location_unique_subplot_coords; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
3118 | 3128 |
-- |
3119 | 3129 |
|
... | ... | |
5088 | 5098 |
|
5089 | 5099 |
|
5090 | 5100 |
-- |
5101 |
-- Name: location_datasource_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
5102 |
-- |
|
5103 |
|
|
5104 |
|
|
5105 |
|
|
5106 |
|
|
5107 |
-- |
|
5091 | 5108 |
-- Name: location_parent_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
5092 | 5109 |
-- |
5093 | 5110 |
|
Also available in: Unified diff
schemas/vegbien.sql: location: Added datasource_id and sourceaccessioncode so locations can be uniquely specified by the input datasource, rather than being created automatically for each locationevent