Revision 1327
Added by Aaron Marcuse-Kubitza almost 13 years ago
schemas/vegbien.my.sql | ||
---|---|---|
1461 | 1461 |
CREATE TABLE plantname ( |
1462 | 1462 |
plantname_id int(11) NOT NULL, |
1463 | 1463 |
plantname text NOT NULL, |
1464 |
reference_id int(11), |
|
1465 |
dateentered timestamp NULL , |
|
1466 | 1464 |
rank text NOT NULL |
1467 | 1465 |
); |
1468 | 1466 |
|
... | ... | |
4381 | 4379 |
|
4382 | 4380 |
|
4383 | 4381 |
-- |
4384 |
-- Name: plantname_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4385 |
-- |
|
4386 |
|
|
4387 |
CREATE INDEX plantname_reference_id_x ON plantname (reference_id); |
|
4388 |
|
|
4389 |
|
|
4390 |
-- |
|
4391 | 4382 |
-- Name: plantstatus_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4392 | 4383 |
-- |
4393 | 4384 |
|
... | ... | |
5316 | 5307 |
|
5317 | 5308 |
|
5318 | 5309 |
-- |
5319 |
-- Name: plantname_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
5320 |
-- |
|
5321 |
|
|
5322 |
|
|
5323 |
|
|
5324 |
|
|
5325 |
-- |
|
5326 | 5310 |
-- Name: plantobservation_plant_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
5327 | 5311 |
-- |
5328 | 5312 |
|
schemas/vegbien.sql | ||
---|---|---|
1738 | 1738 |
CREATE TABLE plantname ( |
1739 | 1739 |
plantname_id integer NOT NULL, |
1740 | 1740 |
plantname text NOT NULL, |
1741 |
reference_id integer, |
|
1742 |
dateentered timestamp with time zone DEFAULT now(), |
|
1743 | 1741 |
rank taxonrank NOT NULL |
1744 | 1742 |
); |
1745 | 1743 |
|
... | ... | |
4793 | 4791 |
|
4794 | 4792 |
|
4795 | 4793 |
-- |
4796 |
-- Name: plantname_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4797 |
-- |
|
4798 |
|
|
4799 |
CREATE INDEX plantname_reference_id_x ON plantname USING btree (reference_id); |
|
4800 |
|
|
4801 |
|
|
4802 |
-- |
|
4803 | 4794 |
-- Name: plantstatus_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4804 | 4795 |
-- |
4805 | 4796 |
|
... | ... | |
5747 | 5738 |
|
5748 | 5739 |
|
5749 | 5740 |
-- |
5750 |
-- Name: plantname_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
5751 |
-- |
|
5752 |
|
|
5753 |
ALTER TABLE ONLY plantname |
|
5754 |
ADD CONSTRAINT plantname_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
5755 |
|
|
5756 |
|
|
5757 |
-- |
|
5758 | 5741 |
-- Name: plantobservation_plant_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
5759 | 5742 |
-- |
5760 | 5743 |
|
Also available in: Unified diff
vegbien.sql: plantname: Removed datasource-specific fields to make this a globally-unique table (the datasource-specific fields belong in plantconcept)