Revision 1160
Added by Aaron Marcuse-Kubitza almost 13 years ago
schemas/vegbien.my.sql | ||
---|---|---|
1089 | 1089 |
CREATE TABLE methodtaxonclass ( |
1090 | 1090 |
methodtaxonclass_id int(11) NOT NULL, |
1091 | 1091 |
method_id int(11) NOT NULL, |
1092 |
plantconcept_id int(11) NOT NULL,
|
|
1092 |
plantconcept_id int(11), |
|
1093 | 1093 |
included int(1) NOT NULL, |
1094 |
submethod_id int(11) |
|
1094 |
submethod_id int(11), |
|
1095 |
description text |
|
1095 | 1096 |
); |
1096 | 1097 |
|
1097 | 1098 |
|
... | ... | |
3066 | 3067 |
|
3067 | 3068 |
|
3068 | 3069 |
-- |
3070 |
-- Name: methodtaxonclass_unique_description; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3071 |
-- |
|
3072 |
|
|
3073 |
ALTER TABLE methodtaxonclass |
|
3074 |
ADD CONSTRAINT methodtaxonclass_unique_description UNIQUE (method_id, description); |
|
3075 |
|
|
3076 |
|
|
3077 |
-- |
|
3078 |
-- Name: methodtaxonclass_unique_plantconcept_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3079 |
-- |
|
3080 |
|
|
3081 |
ALTER TABLE methodtaxonclass |
|
3082 |
ADD CONSTRAINT methodtaxonclass_unique_plantconcept_id UNIQUE (method_id, plantconcept_id); |
|
3083 |
|
|
3084 |
|
|
3085 |
-- |
|
3069 | 3086 |
-- Name: namedplace_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
3070 | 3087 |
-- |
3071 | 3088 |
|
schemas/vegbien.sql | ||
---|---|---|
1276 | 1276 |
CREATE TABLE methodtaxonclass ( |
1277 | 1277 |
methodtaxonclass_id integer NOT NULL, |
1278 | 1278 |
method_id integer NOT NULL, |
1279 |
plantconcept_id integer NOT NULL,
|
|
1279 |
plantconcept_id integer, |
|
1280 | 1280 |
included boolean NOT NULL, |
1281 |
submethod_id integer |
|
1281 |
submethod_id integer, |
|
1282 |
description text, |
|
1283 |
CONSTRAINT methodtaxonclass_key_required CHECK (((plantconcept_id IS NOT NULL) OR (description IS NOT NULL))) |
|
1282 | 1284 |
); |
1283 | 1285 |
|
1284 | 1286 |
|
... | ... | |
3448 | 3450 |
|
3449 | 3451 |
|
3450 | 3452 |
-- |
3453 |
-- Name: methodtaxonclass_unique_description; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3454 |
-- |
|
3455 |
|
|
3456 |
ALTER TABLE ONLY methodtaxonclass |
|
3457 |
ADD CONSTRAINT methodtaxonclass_unique_description UNIQUE (method_id, description); |
|
3458 |
|
|
3459 |
|
|
3460 |
-- |
|
3461 |
-- Name: methodtaxonclass_unique_plantconcept_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3462 |
-- |
|
3463 |
|
|
3464 |
ALTER TABLE ONLY methodtaxonclass |
|
3465 |
ADD CONSTRAINT methodtaxonclass_unique_plantconcept_id UNIQUE (method_id, plantconcept_id); |
|
3466 |
|
|
3467 |
|
|
3468 |
-- |
|
3451 | 3469 |
-- Name: namedplace_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
3452 | 3470 |
-- |
3453 | 3471 |
|
Also available in: Unified diff
vegbien.sql: methodtaxonclass: Added description field for taxon classes that don't fit well into a plantconcept. Made at least one of plantconcept_id or description required. Added unique constraint.