Revision 583
Added by Aaron Marcuse-Kubitza almost 13 years ago
schemas/vegbien.for_ERD.my.sql | ||
---|---|---|
359 | 359 |
CREATE TABLE taxonbin -- Defines a set of aggregate measurements. Used by aggregateoccurrence to define how measurements were aggregated. |
360 | 360 |
( |
361 | 361 |
taxonbin_id int(11) NOT NULL, |
362 |
label character varying(255) NOT NULL, |
|
362 |
label character varying(255) NOT NULL DEFAULT '',
|
|
363 | 363 |
stratum_id int(11), |
364 | 364 |
sizeclass_id int(11), |
365 | 365 |
coverindex_id int(11), |
366 | 366 |
accessioncode character varying(255), |
367 |
count int(11) NOT NULL, |
|
368 | 367 |
CONSTRAINT taxonbin_pkey PRIMARY KEY (taxonbin_id ), |
369 | 368 |
CONSTRAINT taxonbin_sizeclass_id FOREIGN KEY (sizeclass_id) |
370 | 369 |
REFERENCES sizeclass (sizeclass_id) MATCH SIMPLE |
371 |
ON UPDATE CASCADE ON DELETE CASCADE |
|
370 |
ON UPDATE CASCADE ON DELETE CASCADE, |
|
371 |
CONSTRAINT taxonbin_keys UNIQUE (label , stratum_id , sizeclass_id , coverindex_id ) |
|
372 | 372 |
); |
schemas/vegbien.for_wiki.sql | ||
---|---|---|
159 | 159 |
CREATE TABLE taxonbin -- Defines a set of aggregate measurements. Used by aggregateoccurrence to define how measurements were aggregated. |
160 | 160 |
( |
161 | 161 |
taxonbin_id integer NOT NULL, |
162 |
label character varying(255) NOT NULL, |
|
162 |
label character varying(255) NOT NULL DEFAULT ''::character varying,
|
|
163 | 163 |
stratum_id integer, |
164 | 164 |
sizeclass_id integer, |
165 | 165 |
coverindex_id integer, |
166 | 166 |
accessioncode character varying(255), |
167 |
count integer NOT NULL, |
|
168 | 167 |
); |
schemas/vegbien.for_ERD.sql | ||
---|---|---|
359 | 359 |
CREATE TABLE taxonbin -- Defines a set of aggregate measurements. Used by aggregateoccurrence to define how measurements were aggregated. |
360 | 360 |
( |
361 | 361 |
taxonbin_id integer NOT NULL, |
362 |
label character varying(255) NOT NULL, |
|
362 |
label character varying(255) NOT NULL DEFAULT ''::character varying,
|
|
363 | 363 |
stratum_id integer, |
364 | 364 |
sizeclass_id integer, |
365 | 365 |
coverindex_id integer, |
366 | 366 |
accessioncode character varying(255), |
367 |
count integer NOT NULL, |
|
368 | 367 |
CONSTRAINT taxonbin_pkey PRIMARY KEY (taxonbin_id ), |
369 | 368 |
CONSTRAINT taxonbin_sizeclass_id FOREIGN KEY (sizeclass_id) |
370 | 369 |
REFERENCES sizeclass (sizeclass_id) MATCH SIMPLE |
371 |
ON UPDATE CASCADE ON DELETE CASCADE |
|
370 |
ON UPDATE CASCADE ON DELETE CASCADE, |
|
371 |
CONSTRAINT taxonbin_keys UNIQUE (label , stratum_id , sizeclass_id , coverindex_id ) |
|
372 | 372 |
); |
schemas/vegbien.sql | ||
---|---|---|
2491 | 2491 |
|
2492 | 2492 |
CREATE TABLE taxonbin ( |
2493 | 2493 |
taxonbin_id integer NOT NULL, |
2494 |
label character varying(255) NOT NULL, |
|
2494 |
label character varying(255) DEFAULT ''::character varying NOT NULL,
|
|
2495 | 2495 |
stratum_id integer, |
2496 | 2496 |
sizeclass_id integer, |
2497 | 2497 |
coverindex_id integer, |
2498 |
accessioncode character varying(255), |
|
2499 |
count integer NOT NULL |
|
2498 |
accessioncode character varying(255) |
|
2500 | 2499 |
); |
2501 | 2500 |
|
2502 | 2501 |
|
... | ... | |
4419 | 4418 |
|
4420 | 4419 |
|
4421 | 4420 |
-- |
4421 |
-- Name: taxonbin_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4422 |
-- |
|
4423 |
|
|
4424 |
ALTER TABLE ONLY taxonbin |
|
4425 |
ADD CONSTRAINT taxonbin_keys UNIQUE (label, stratum_id, sizeclass_id, coverindex_id); |
|
4426 |
|
|
4427 |
|
|
4428 |
-- |
|
4422 | 4429 |
-- Name: taxonbin_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
4423 | 4430 |
-- |
4424 | 4431 |
|
Also available in: Unified diff
vegbien.sql: Removed taxonbin.count because that belongs in aggregateoccurrence and taxonbin is more similar to a sampling method. Added taxonbin UNIQUE constraint.