Revision 1028
Added by Aaron Marcuse-Kubitza almost 13 years ago
schemas/vegbien.my.sql | ||
---|---|---|
105 | 105 |
stratum_id int(11), |
106 | 106 |
sizeclass_id int(11), |
107 | 107 |
coverindex_id int(11), |
108 |
occurrencestatus_dwc text DEFAULT 'present' |
|
108 |
occurrencestatus_dwc text DEFAULT 'present', |
|
109 |
method_id int(11) |
|
109 | 110 |
); |
110 | 111 |
|
111 | 112 |
|
... | ... | |
2464 | 2465 |
authorplantname text, |
2465 | 2466 |
reference_id int(11), |
2466 | 2467 |
emb_taxonoccurrence int(11), |
2467 |
accessioncode text, |
|
2468 |
method_id int(11) |
|
2468 |
accessioncode text |
|
2469 | 2469 |
); |
2470 | 2470 |
|
2471 | 2471 |
|
... | ... | |
4952 | 4952 |
|
4953 | 4953 |
|
4954 | 4954 |
-- |
4955 |
-- Name: fki_taxonoccurrence_method_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4956 |
-- |
|
4957 |
|
|
4958 |
CREATE INDEX fki_taxonoccurrence_method_id ON taxonoccurrence (method_id); |
|
4959 |
|
|
4960 |
|
|
4961 |
-- |
|
4962 | 4955 |
-- Name: graphic_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4963 | 4956 |
-- |
4964 | 4957 |
|
... | ... | |
5801 | 5794 |
|
5802 | 5795 |
|
5803 | 5796 |
-- |
5797 |
-- Name: aggregateoccurrence_method_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
5798 |
-- |
|
5799 |
|
|
5800 |
ALTER TABLE aggregateoccurrence |
|
5801 |
ADD CONSTRAINT aggregateoccurrence_method_id FOREIGN KEY (method_id) REFERENCES method(method_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
5802 |
|
|
5803 |
|
|
5804 |
-- |
|
5804 | 5805 |
-- Name: aggregateoccurrence_plantobservation_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
5805 | 5806 |
-- |
5806 | 5807 |
|
... | ... | |
6677 | 6678 |
|
6678 | 6679 |
|
6679 | 6680 |
-- |
6680 |
-- Name: taxonoccurrence_method_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6681 |
-- |
|
6682 |
|
|
6683 |
ALTER TABLE taxonoccurrence |
|
6684 |
ADD CONSTRAINT taxonoccurrence_method_id FOREIGN KEY (method_id) REFERENCES method(method_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6685 |
|
|
6686 |
|
|
6687 |
-- |
|
6688 | 6681 |
-- Name: taxonoccurrence_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
6689 | 6682 |
-- |
6690 | 6683 |
|
schemas/vegbien.sql | ||
---|---|---|
134 | 134 |
sizeclass_id integer, |
135 | 135 |
coverindex_id integer, |
136 | 136 |
occurrencestatus_dwc occurrencestatus_dwc DEFAULT 'present'::occurrencestatus_dwc NOT NULL, |
137 |
method_id integer, |
|
137 | 138 |
CONSTRAINT aggregateoccurrence_plantobs_count_1 CHECK (((plantobservation_id IS NULL) OR (NOT (count IS DISTINCT FROM 1)))) |
138 | 139 |
); |
139 | 140 |
|
... | ... | |
2838 | 2839 |
authorplantname text, |
2839 | 2840 |
reference_id integer, |
2840 | 2841 |
emb_taxonoccurrence integer, |
2841 |
accessioncode text, |
|
2842 |
method_id integer |
|
2842 |
accessioncode text |
|
2843 | 2843 |
); |
2844 | 2844 |
|
2845 | 2845 |
|
... | ... | |
5411 | 5411 |
|
5412 | 5412 |
|
5413 | 5413 |
-- |
5414 |
-- Name: fki_taxonoccurrence_method_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
5415 |
-- |
|
5416 |
|
|
5417 |
CREATE INDEX fki_taxonoccurrence_method_id ON taxonoccurrence USING btree (method_id); |
|
5418 |
|
|
5419 |
|
|
5420 |
-- |
|
5421 | 5414 |
-- Name: graphic_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
5422 | 5415 |
-- |
5423 | 5416 |
|
... | ... | |
6260 | 6253 |
|
6261 | 6254 |
|
6262 | 6255 |
-- |
6256 |
-- Name: aggregateoccurrence_method_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6257 |
-- |
|
6258 |
|
|
6259 |
ALTER TABLE ONLY aggregateoccurrence |
|
6260 |
ADD CONSTRAINT aggregateoccurrence_method_id FOREIGN KEY (method_id) REFERENCES method(method_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6261 |
|
|
6262 |
|
|
6263 |
-- |
|
6263 | 6264 |
-- Name: aggregateoccurrence_plantobservation_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
6264 | 6265 |
-- |
6265 | 6266 |
|
... | ... | |
7164 | 7165 |
|
7165 | 7166 |
|
7166 | 7167 |
-- |
7167 |
-- Name: taxonoccurrence_method_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
7168 |
-- |
|
7169 |
|
|
7170 |
ALTER TABLE ONLY taxonoccurrence |
|
7171 |
ADD CONSTRAINT taxonoccurrence_method_id FOREIGN KEY (method_id) REFERENCES method(method_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
7172 |
|
|
7173 |
|
|
7174 |
-- |
|
7175 | 7168 |
-- Name: taxonoccurrence_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
7176 | 7169 |
-- |
7177 | 7170 |
|
Also available in: Unified diff
vegbien.sql: Attach method to aggregateoccurrence instead of taxonoccurrence