Revision 682
Added by Aaron Marcuse-Kubitza almost 13 years ago
schemas/vegbien.for_ERD.my.sql | ||
---|---|---|
264 | 264 |
CREATE TABLE plantobservation -- VegBank's stemcount table. |
265 | 265 |
( |
266 | 266 |
plantobservation_id int(11) NOT NULL AUTO_INCREMENT, |
267 |
aggregateoccurrence_id int(11), |
|
268 | 267 |
overallheight double precision, |
269 | 268 |
overallheightaccuracy double precision, |
270 | 269 |
emb_plantobservation int(11), |
... | ... | |
274 | 273 |
sourceaccessioncode character varying(100), |
275 | 274 |
plant_id int(11), |
276 | 275 |
CONSTRAINT plantobservation_pkey PRIMARY KEY (plantobservation_id ), |
277 |
CONSTRAINT plantobservation_aggregateoccurrence_id FOREIGN KEY (aggregateoccurrence_id) |
|
278 |
REFERENCES aggregateoccurrence (aggregateoccurrence_id) MATCH SIMPLE |
|
279 |
ON UPDATE CASCADE ON DELETE CASCADE, |
|
280 | 276 |
CONSTRAINT plantobservation_plant_id FOREIGN KEY (plant_id) |
281 | 277 |
REFERENCES plant (plant_id) MATCH SIMPLE |
282 |
ON UPDATE CASCADE ON DELETE CASCADE, |
|
283 |
CONSTRAINT plantobservation_aggregateoccurrence_id_1_to_1 UNIQUE (aggregateoccurrence_id ) |
|
278 |
ON UPDATE CASCADE ON DELETE CASCADE |
|
284 | 279 |
); |
285 | 280 |
|
286 | 281 |
CREATE TABLE stemobservation -- VegBank's stemlocation table. |
schemas/vegbien.for_wiki.sql | ||
---|---|---|
78 | 78 |
CREATE TABLE plantobservation -- VegBank's stemcount table. |
79 | 79 |
( |
80 | 80 |
plantobservation_id serial NOT NULL, |
81 |
aggregateoccurrence_id integer, |
|
82 | 81 |
overallheight double precision, |
83 | 82 |
overallheightaccuracy double precision, |
84 | 83 |
emb_plantobservation integer, |
schemas/vegbien.for_ERD.sql | ||
---|---|---|
264 | 264 |
CREATE TABLE plantobservation -- VegBank's stemcount table. |
265 | 265 |
( |
266 | 266 |
plantobservation_id serial NOT NULL, |
267 |
aggregateoccurrence_id integer, |
|
268 | 267 |
overallheight double precision, |
269 | 268 |
overallheightaccuracy double precision, |
270 | 269 |
emb_plantobservation integer, |
... | ... | |
274 | 273 |
sourceaccessioncode character varying(100), |
275 | 274 |
plant_id integer, |
276 | 275 |
CONSTRAINT plantobservation_pkey PRIMARY KEY (plantobservation_id ), |
277 |
CONSTRAINT plantobservation_aggregateoccurrence_id FOREIGN KEY (aggregateoccurrence_id) |
|
278 |
REFERENCES aggregateoccurrence (aggregateoccurrence_id) MATCH SIMPLE |
|
279 |
ON UPDATE CASCADE ON DELETE CASCADE, |
|
280 | 276 |
CONSTRAINT plantobservation_plant_id FOREIGN KEY (plant_id) |
281 | 277 |
REFERENCES plant (plant_id) MATCH SIMPLE |
282 |
ON UPDATE CASCADE ON DELETE CASCADE, |
|
283 |
CONSTRAINT plantobservation_aggregateoccurrence_id_1_to_1 UNIQUE (aggregateoccurrence_id ) |
|
278 |
ON UPDATE CASCADE ON DELETE CASCADE |
|
284 | 279 |
); |
285 | 280 |
|
286 | 281 |
CREATE TABLE stemobservation -- VegBank's stemlocation table. |
schemas/vegbien.sql | ||
---|---|---|
1737 | 1737 |
|
1738 | 1738 |
CREATE TABLE plantobservation ( |
1739 | 1739 |
plantobservation_id integer NOT NULL, |
1740 |
aggregateoccurrence_id integer, |
|
1741 | 1740 |
overallheight double precision, |
1742 | 1741 |
overallheightaccuracy double precision, |
1743 | 1742 |
emb_plantobservation integer, |
... | ... | |
4354 | 4353 |
|
4355 | 4354 |
|
4356 | 4355 |
-- |
4357 |
-- Name: plantobservation_aggregateoccurrence_id_1_to_1; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4358 |
-- |
|
4359 |
|
|
4360 |
ALTER TABLE ONLY plantobservation |
|
4361 |
ADD CONSTRAINT plantobservation_aggregateoccurrence_id_1_to_1 UNIQUE (aggregateoccurrence_id); |
|
4362 |
|
|
4363 |
|
|
4364 |
-- |
|
4365 | 4356 |
-- Name: plantobservation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
4366 | 4357 |
-- |
4367 | 4358 |
|
... | ... | |
5512 | 5503 |
|
5513 | 5504 |
|
5514 | 5505 |
-- |
5515 |
-- Name: plantobservation_aggregateoccurrence_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
5516 |
-- |
|
5517 |
|
|
5518 |
CREATE INDEX plantobservation_aggregateoccurrence_id_x ON plantobservation USING btree (aggregateoccurrence_id); |
|
5519 |
|
|
5520 |
|
|
5521 |
-- |
|
5522 | 5506 |
-- Name: plantstatus_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
5523 | 5507 |
-- |
5524 | 5508 |
|
... | ... | |
6541 | 6525 |
|
6542 | 6526 |
|
6543 | 6527 |
-- |
6544 |
-- Name: plantobservation_aggregateoccurrence_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6545 |
-- |
|
6546 |
|
|
6547 |
ALTER TABLE ONLY plantobservation |
|
6548 |
ADD CONSTRAINT plantobservation_aggregateoccurrence_id FOREIGN KEY (aggregateoccurrence_id) REFERENCES aggregateoccurrence(aggregateoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6549 |
|
|
6550 |
|
|
6551 |
-- |
|
6552 | 6528 |
-- Name: plantobservation_plant_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
6553 | 6529 |
-- |
6554 | 6530 |
|
Also available in: Unified diff
vegbien.sql: Removed no longer used plantobservation.aggregateoccurrence_id