Revision 955
Added by Aaron Marcuse-Kubitza almost 13 years ago
vegbien.my.sql | ||
---|---|---|
18 | 18 |
|
19 | 19 |
|
20 | 20 |
-- |
21 |
-- Name: methodtraitname_appliesto; Type: TYPE; Schema: public; Owner: - |
|
22 |
-- |
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
-- |
|
21 | 28 |
-- Name: occurrencestatus_dwc; Type: TYPE; Schema: public; Owner: - |
22 | 29 |
-- |
23 | 30 |
|
... | ... | |
1238 | 1245 |
|
1239 | 1246 |
|
1240 | 1247 |
|
1248 |
|
|
1249 |
|
|
1241 | 1250 |
-- |
1251 |
-- Name: methodtrait; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1252 |
-- |
|
1253 |
|
|
1254 |
CREATE TABLE methodtrait ( |
|
1255 |
methodtrait_id int(11) NOT NULL, |
|
1256 |
method_id int(11) NOT NULL, |
|
1257 |
methodtraitname_id int(11) NOT NULL, |
|
1258 |
value text NOT NULL |
|
1259 |
); |
|
1260 |
|
|
1261 |
|
|
1262 |
-- |
|
1263 |
-- Name: methodtrait_methodtrait_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
1264 |
-- |
|
1265 |
|
|
1266 |
|
|
1267 |
|
|
1268 |
|
|
1269 |
-- |
|
1270 |
-- Name: methodtrait_methodtrait_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
1271 |
-- |
|
1272 |
|
|
1273 |
|
|
1274 |
|
|
1275 |
|
|
1276 |
-- |
|
1277 |
-- Name: methodtraitname; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1278 |
-- |
|
1279 |
|
|
1280 |
CREATE TABLE methodtraitname ( |
|
1281 |
methodtraitname_id int(11) NOT NULL, |
|
1282 |
name text NOT NULL, |
|
1283 |
appliesto text NOT NULL |
|
1284 |
); |
|
1285 |
|
|
1286 |
|
|
1287 |
-- |
|
1288 |
-- Name: methodtraitname_methodtraitname_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
1289 |
-- |
|
1290 |
|
|
1291 |
|
|
1292 |
|
|
1293 |
|
|
1294 |
-- |
|
1295 |
-- Name: methodtraitname_methodtraitname_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
1296 |
-- |
|
1297 |
|
|
1298 |
|
|
1299 |
|
|
1300 |
|
|
1301 |
|
|
1302 |
|
|
1303 |
-- |
|
1242 | 1304 |
-- Name: namedplace; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1243 | 1305 |
-- |
1244 | 1306 |
|
... | ... | |
3176 | 3238 |
|
3177 | 3239 |
|
3178 | 3240 |
-- |
3241 |
-- Name: methodtrait_id; Type: DEFAULT; Schema: public; Owner: - |
|
3242 |
-- |
|
3243 |
|
|
3244 |
|
|
3245 |
|
|
3246 |
|
|
3247 |
-- |
|
3248 |
-- Name: methodtraitname_id; Type: DEFAULT; Schema: public; Owner: - |
|
3249 |
-- |
|
3250 |
|
|
3251 |
|
|
3252 |
|
|
3253 |
|
|
3254 |
-- |
|
3179 | 3255 |
-- Name: namedplace_id; Type: DEFAULT; Schema: public; Owner: - |
3180 | 3256 |
-- |
3181 | 3257 |
|
... | ... | |
3899 | 3975 |
|
3900 | 3976 |
|
3901 | 3977 |
-- |
3978 |
-- Name: methodtrait_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3979 |
-- |
|
3980 |
|
|
3981 |
ALTER TABLE methodtrait |
|
3982 |
ADD CONSTRAINT methodtrait_keys UNIQUE (method_id, methodtraitname_id); |
|
3983 |
|
|
3984 |
|
|
3985 |
-- |
|
3986 |
-- Name: methodtrait_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3987 |
-- |
|
3988 |
|
|
3989 |
ALTER TABLE methodtrait |
|
3990 |
ADD CONSTRAINT methodtrait_pkey PRIMARY KEY (methodtrait_id); |
|
3991 |
|
|
3992 |
|
|
3993 |
-- |
|
3994 |
-- Name: methodtraitname_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3995 |
-- |
|
3996 |
|
|
3997 |
ALTER TABLE methodtraitname |
|
3998 |
ADD CONSTRAINT methodtraitname_keys UNIQUE (name); |
|
3999 |
|
|
4000 |
|
|
4001 |
-- |
|
4002 |
-- Name: methodtraitname_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4003 |
-- |
|
4004 |
|
|
4005 |
ALTER TABLE methodtraitname |
|
4006 |
ADD CONSTRAINT methodtraitname_pkey PRIMARY KEY (methodtraitname_id); |
|
4007 |
|
|
4008 |
|
|
4009 |
-- |
|
3902 | 4010 |
-- Name: namedplace_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
3903 | 4011 |
-- |
3904 | 4012 |
|
... | ... | |
4832 | 4940 |
|
4833 | 4941 |
|
4834 | 4942 |
-- |
4943 |
-- Name: fki_methodtrait_method_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4944 |
-- |
|
4945 |
|
|
4946 |
CREATE INDEX fki_methodtrait_method_id ON methodtrait (method_id); |
|
4947 |
|
|
4948 |
|
|
4949 |
-- |
|
4950 |
-- Name: fki_methodtrait_methodtraitname_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4951 |
-- |
|
4952 |
|
|
4953 |
CREATE INDEX fki_methodtrait_methodtraitname_id ON methodtrait (methodtraitname_id); |
|
4954 |
|
|
4955 |
|
|
4956 |
-- |
|
4835 | 4957 |
-- Name: fki_plantconcept_scope_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4836 | 4958 |
-- |
4837 | 4959 |
|
... | ... | |
6161 | 6283 |
|
6162 | 6284 |
|
6163 | 6285 |
-- |
6286 |
-- Name: methodtrait_method_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6287 |
-- |
|
6288 |
|
|
6289 |
ALTER TABLE methodtrait |
|
6290 |
ADD CONSTRAINT methodtrait_method_id FOREIGN KEY (method_id) REFERENCES method(method_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6291 |
|
|
6292 |
|
|
6293 |
-- |
|
6294 |
-- Name: methodtrait_methodtraitname_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6295 |
-- |
|
6296 |
|
|
6297 |
ALTER TABLE methodtrait |
|
6298 |
ADD CONSTRAINT methodtrait_methodtraitname_id FOREIGN KEY (methodtraitname_id) REFERENCES methodtraitname(methodtraitname_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6299 |
|
|
6300 |
|
|
6301 |
-- |
|
6164 | 6302 |
-- Name: namedplace_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
6165 | 6303 |
-- |
6166 | 6304 |
|
Also available in: Unified diff
vegbien.sql: Added methodtrait and methodtraitname tables