Revision 1174
Added by Aaron Marcuse-Kubitza almost 13 years ago
schemas/vegbien.my.sql | ||
---|---|---|
25 | 25 |
|
26 | 26 |
|
27 | 27 |
-- |
28 |
-- Name: taxonclass; Type: TYPE; Schema: public; Owner: - |
|
29 |
-- |
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
-- |
|
28 | 35 |
-- Name: taxonrank; Type: TYPE; Schema: public; Owner: - |
29 | 36 |
-- |
30 | 37 |
|
... | ... | |
1108 | 1115 |
plantconcept_id int(11), |
1109 | 1116 |
included int(1) NOT NULL, |
1110 | 1117 |
submethod_id int(11), |
1111 |
description text
|
|
1118 |
taxonclass text
|
|
1112 | 1119 |
); |
1113 | 1120 |
|
1114 | 1121 |
|
... | ... | |
1127 | 1134 |
|
1128 | 1135 |
|
1129 | 1136 |
-- |
1130 |
-- Name: COLUMN methodtaxonclass.description; Type: COMMENT; Schema: public; Owner: - |
|
1131 |
-- |
|
1132 |
|
|
1133 |
|
|
1134 |
|
|
1135 |
|
|
1136 |
-- |
|
1137 | 1137 |
-- Name: methodtaxonclass_methodtaxonclass_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
1138 | 1138 |
-- |
1139 | 1139 |
|
... | ... | |
3094 | 3094 |
-- |
3095 | 3095 |
|
3096 | 3096 |
ALTER TABLE methodtaxonclass |
3097 |
ADD CONSTRAINT methodtaxonclass_unique_description UNIQUE (method_id, description);
|
|
3097 |
ADD CONSTRAINT methodtaxonclass_unique_description UNIQUE (method_id, taxonclass);
|
|
3098 | 3098 |
|
3099 | 3099 |
|
3100 | 3100 |
-- |
schemas/vegbien.sql | ||
---|---|---|
32 | 32 |
|
33 | 33 |
|
34 | 34 |
-- |
35 |
-- Name: taxonclass; Type: TYPE; Schema: public; Owner: - |
|
36 |
-- |
|
37 |
|
|
38 |
CREATE TYPE taxonclass AS ENUM ( |
|
39 |
'tree', |
|
40 |
'shrub', |
|
41 |
'liana', |
|
42 |
'vine', |
|
43 |
'herb', |
|
44 |
'hemiepiphyte', |
|
45 |
'epiphyte', |
|
46 |
'grass', |
|
47 |
'forb', |
|
48 |
'woody', |
|
49 |
'cultivated', |
|
50 |
'exotic', |
|
51 |
'native', |
|
52 |
'dominant', |
|
53 |
'vascular', |
|
54 |
'nonvascular' |
|
55 |
); |
|
56 |
|
|
57 |
|
|
58 |
-- |
|
35 | 59 |
-- Name: taxonrank; Type: TYPE; Schema: public; Owner: - |
36 | 60 |
-- |
37 | 61 |
|
... | ... | |
1297 | 1321 |
plantconcept_id integer, |
1298 | 1322 |
included boolean NOT NULL, |
1299 | 1323 |
submethod_id integer, |
1300 |
description text,
|
|
1301 |
CONSTRAINT methodtaxonclass_key_required CHECK (((plantconcept_id IS NOT NULL) OR (description IS NOT NULL)))
|
|
1324 |
taxonclass taxonclass,
|
|
1325 |
CONSTRAINT methodtaxonclass_key_required CHECK (((plantconcept_id IS NOT NULL) OR (taxonclass IS NOT NULL)))
|
|
1302 | 1326 |
); |
1303 | 1327 |
|
1304 | 1328 |
|
... | ... | |
1317 | 1341 |
|
1318 | 1342 |
|
1319 | 1343 |
-- |
1320 |
-- Name: COLUMN methodtaxonclass.description; Type: COMMENT; Schema: public; Owner: - |
|
1321 |
-- |
|
1322 |
|
|
1323 |
COMMENT ON COLUMN methodtaxonclass.description IS 'e.g. tree, shrub, liana, vine, herb, hemiepiphyte, epiphyte, grass, forb, woody, non-woody, cultivated, non-cultivated (not planted), exotic, native, dominant, non-dominant, vascular, nonvascular'; |
|
1324 |
|
|
1325 |
|
|
1326 |
-- |
|
1327 | 1344 |
-- Name: methodtaxonclass_methodtaxonclass_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
1328 | 1345 |
-- |
1329 | 1346 |
|
... | ... | |
3479 | 3496 |
-- |
3480 | 3497 |
|
3481 | 3498 |
ALTER TABLE ONLY methodtaxonclass |
3482 |
ADD CONSTRAINT methodtaxonclass_unique_description UNIQUE (method_id, description);
|
|
3499 |
ADD CONSTRAINT methodtaxonclass_unique_description UNIQUE (method_id, taxonclass);
|
|
3483 | 3500 |
|
3484 | 3501 |
|
3485 | 3502 |
-- |
Also available in: Unified diff
vegbien.sql: Renamed methodtaxonclass.description to methodtaxonclass.taxonclass and changed it to a closed list (enum taxonclass). method.description can still be used for freeform taxonclass inclusions/exclusions.