Revision 1027
Added by Aaron Marcuse-Kubitza almost 13 years ago
vegbien.my.sql | ||
---|---|---|
1261 | 1261 |
reference_id int(11), |
1262 | 1262 |
name text NOT NULL, |
1263 | 1263 |
description text, |
1264 |
accessioncode text |
|
1264 |
accessioncode text, |
|
1265 |
mindiameter double precision, |
|
1266 |
minheight double precision, |
|
1267 |
maxdiameter double precision, |
|
1268 |
maxheight double precision, |
|
1269 |
observationtype text, |
|
1270 |
observationmeasure text, |
|
1271 |
observationmeasureunits text, |
|
1272 |
taxonclassincluded text, |
|
1273 |
taxonclassexcluded text |
|
1265 | 1274 |
); |
1266 | 1275 |
|
1267 | 1276 |
|
... | ... | |
1279 | 1288 |
|
1280 | 1289 |
|
1281 | 1290 |
|
1282 |
|
|
1283 |
|
|
1284 | 1291 |
-- |
1285 |
-- Name: methodtrait; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1286 |
-- |
|
1287 |
|
|
1288 |
CREATE TABLE methodtrait ( |
|
1289 |
methodtrait_id int(11) NOT NULL, |
|
1290 |
method_id int(11) NOT NULL, |
|
1291 |
methodtraitname_id int(11) NOT NULL, |
|
1292 |
value text NOT NULL |
|
1293 |
); |
|
1294 |
|
|
1295 |
|
|
1296 |
-- |
|
1297 |
-- Name: methodtrait_methodtrait_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
1298 |
-- |
|
1299 |
|
|
1300 |
|
|
1301 |
|
|
1302 |
|
|
1303 |
-- |
|
1304 |
-- Name: methodtrait_methodtrait_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
1305 |
-- |
|
1306 |
|
|
1307 |
|
|
1308 |
|
|
1309 |
|
|
1310 |
-- |
|
1311 |
-- Name: methodtraitname; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1312 |
-- |
|
1313 |
|
|
1314 |
CREATE TABLE methodtraitname ( |
|
1315 |
methodtraitname_id int(11) NOT NULL, |
|
1316 |
name text NOT NULL, |
|
1317 |
appliesto text NOT NULL |
|
1318 |
); |
|
1319 |
|
|
1320 |
|
|
1321 |
-- |
|
1322 |
-- Name: methodtraitname_methodtraitname_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
1323 |
-- |
|
1324 |
|
|
1325 |
|
|
1326 |
|
|
1327 |
|
|
1328 |
-- |
|
1329 |
-- Name: methodtraitname_methodtraitname_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
1330 |
-- |
|
1331 |
|
|
1332 |
|
|
1333 |
|
|
1334 |
|
|
1335 |
|
|
1336 |
|
|
1337 |
-- |
|
1338 | 1292 |
-- Name: namedplace; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1339 | 1293 |
-- |
1340 | 1294 |
|
... | ... | |
3272 | 3226 |
|
3273 | 3227 |
|
3274 | 3228 |
-- |
3275 |
-- Name: methodtrait_id; Type: DEFAULT; Schema: public; Owner: - |
|
3276 |
-- |
|
3277 |
|
|
3278 |
|
|
3279 |
|
|
3280 |
|
|
3281 |
-- |
|
3282 |
-- Name: methodtraitname_id; Type: DEFAULT; Schema: public; Owner: - |
|
3283 |
-- |
|
3284 |
|
|
3285 |
|
|
3286 |
|
|
3287 |
|
|
3288 |
-- |
|
3289 | 3229 |
-- Name: namedplace_id; Type: DEFAULT; Schema: public; Owner: - |
3290 | 3230 |
-- |
3291 | 3231 |
|
... | ... | |
4009 | 3949 |
|
4010 | 3950 |
|
4011 | 3951 |
-- |
4012 |
-- Name: methodtrait_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4013 |
-- |
|
4014 |
|
|
4015 |
ALTER TABLE methodtrait |
|
4016 |
ADD CONSTRAINT methodtrait_keys UNIQUE (method_id, methodtraitname_id); |
|
4017 |
|
|
4018 |
|
|
4019 |
-- |
|
4020 |
-- Name: methodtrait_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4021 |
-- |
|
4022 |
|
|
4023 |
ALTER TABLE methodtrait |
|
4024 |
ADD CONSTRAINT methodtrait_pkey PRIMARY KEY (methodtrait_id); |
|
4025 |
|
|
4026 |
|
|
4027 |
-- |
|
4028 |
-- Name: methodtraitname_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4029 |
-- |
|
4030 |
|
|
4031 |
ALTER TABLE methodtraitname |
|
4032 |
ADD CONSTRAINT methodtraitname_keys UNIQUE (name); |
|
4033 |
|
|
4034 |
|
|
4035 |
-- |
|
4036 |
-- Name: methodtraitname_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4037 |
-- |
|
4038 |
|
|
4039 |
ALTER TABLE methodtraitname |
|
4040 |
ADD CONSTRAINT methodtraitname_pkey PRIMARY KEY (methodtraitname_id); |
|
4041 |
|
|
4042 |
|
|
4043 |
-- |
|
4044 | 3952 |
-- Name: namedplace_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
4045 | 3953 |
-- |
4046 | 3954 |
|
... | ... | |
4974 | 4882 |
|
4975 | 4883 |
|
4976 | 4884 |
-- |
4977 |
-- Name: fki_methodtrait_method_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4978 |
-- |
|
4979 |
|
|
4980 |
CREATE INDEX fki_methodtrait_method_id ON methodtrait (method_id); |
|
4981 |
|
|
4982 |
|
|
4983 |
-- |
|
4984 |
-- Name: fki_methodtrait_methodtraitname_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4985 |
-- |
|
4986 |
|
|
4987 |
CREATE INDEX fki_methodtrait_methodtraitname_id ON methodtrait (methodtraitname_id); |
|
4988 |
|
|
4989 |
|
|
4990 |
-- |
|
4991 | 4885 |
-- Name: fki_plantconcept_scope_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4992 | 4886 |
-- |
4993 | 4887 |
|
... | ... | |
6317 | 6211 |
|
6318 | 6212 |
|
6319 | 6213 |
-- |
6320 |
-- Name: methodtrait_method_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6321 |
-- |
|
6322 |
|
|
6323 |
ALTER TABLE methodtrait |
|
6324 |
ADD CONSTRAINT methodtrait_method_id FOREIGN KEY (method_id) REFERENCES method(method_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6325 |
|
|
6326 |
|
|
6327 |
-- |
|
6328 |
-- Name: methodtrait_methodtraitname_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6329 |
-- |
|
6330 |
|
|
6331 |
ALTER TABLE methodtrait |
|
6332 |
ADD CONSTRAINT methodtrait_methodtraitname_id FOREIGN KEY (methodtraitname_id) REFERENCES methodtraitname(methodtraitname_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6333 |
|
|
6334 |
|
|
6335 |
-- |
|
6336 | 6214 |
-- Name: namedplace_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
6337 | 6215 |
-- |
6338 | 6216 |
|
Also available in: Unified diff
vegbien.sql: Removed methodtrait* tables and added first-class method attributes as first-class fields of method. Removed *method tables from the ERD that will be replaced by method.