Revision 872
Added by Aaron Marcuse-Kubitza almost 13 years ago
schemas/vegbien.my.sql | ||
---|---|---|
1208 | 1208 |
|
1209 | 1209 |
|
1210 | 1210 |
|
1211 |
|
|
1212 |
|
|
1211 | 1213 |
-- |
1214 |
-- Name: morphospecies; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1215 |
-- |
|
1216 |
|
|
1217 |
CREATE TABLE morphospecies ( |
|
1218 |
morphospecies_id int(11) NOT NULL, |
|
1219 |
locationevent_id int(11) NOT NULL, |
|
1220 |
name text NOT NULL |
|
1221 |
); |
|
1222 |
|
|
1223 |
|
|
1224 |
-- |
|
1225 |
-- Name: morphospecies_morphospecies_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
1226 |
-- |
|
1227 |
|
|
1228 |
|
|
1229 |
|
|
1230 |
|
|
1231 |
-- |
|
1232 |
-- Name: morphospecies_morphospecies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
1233 |
-- |
|
1234 |
|
|
1235 |
|
|
1236 |
|
|
1237 |
|
|
1238 |
|
|
1239 |
|
|
1240 |
-- |
|
1212 | 1241 |
-- Name: namedplace; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1213 | 1242 |
-- |
1214 | 1243 |
|
... | ... | |
2318 | 2347 |
revisions int(1), |
2319 | 2348 |
determinationdate timestamp NULL, |
2320 | 2349 |
emb_taxondetermination int(11), |
2321 |
accessioncode text |
|
2350 |
accessioncode text, |
|
2351 |
morphospecies_id int(11) |
|
2322 | 2352 |
); |
2323 | 2353 |
|
2324 | 2354 |
|
... | ... | |
3107 | 3137 |
|
3108 | 3138 |
|
3109 | 3139 |
-- |
3140 |
-- Name: morphospecies_id; Type: DEFAULT; Schema: public; Owner: - |
|
3141 |
-- |
|
3142 |
|
|
3143 |
|
|
3144 |
|
|
3145 |
|
|
3146 |
-- |
|
3110 | 3147 |
-- Name: namedplace_id; Type: DEFAULT; Schema: public; Owner: - |
3111 | 3148 |
-- |
3112 | 3149 |
|
... | ... | |
3831 | 3868 |
|
3832 | 3869 |
|
3833 | 3870 |
-- |
3871 |
-- Name: morphospecies_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3872 |
-- |
|
3873 |
|
|
3874 |
ALTER TABLE morphospecies |
|
3875 |
ADD CONSTRAINT morphospecies_keys UNIQUE (locationevent_id, name); |
|
3876 |
|
|
3877 |
|
|
3878 |
-- |
|
3879 |
-- Name: morphospecies_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3880 |
-- |
|
3881 |
|
|
3882 |
ALTER TABLE morphospecies |
|
3883 |
ADD CONSTRAINT morphospecies_pkey PRIMARY KEY (morphospecies_id); |
|
3884 |
|
|
3885 |
|
|
3886 |
-- |
|
3834 | 3887 |
-- Name: namedplace_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
3835 | 3888 |
-- |
3836 | 3889 |
|
... | ... | |
4770 | 4823 |
|
4771 | 4824 |
|
4772 | 4825 |
-- |
4826 |
-- Name: fki_taxondetermination_morphospecies_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4827 |
-- |
|
4828 |
|
|
4829 |
CREATE INDEX fki_taxondetermination_morphospecies_id ON taxondetermination (morphospecies_id); |
|
4830 |
|
|
4831 |
|
|
4832 |
-- |
|
4773 | 4833 |
-- Name: graphic_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4774 | 4834 |
-- |
4775 | 4835 |
|
... | ... | |
5964 | 6024 |
|
5965 | 6025 |
|
5966 | 6026 |
-- |
6027 |
-- Name: morphospecies_locationevent_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6028 |
-- |
|
6029 |
|
|
6030 |
ALTER TABLE morphospecies |
|
6031 |
ADD CONSTRAINT morphospecies_locationevent_id FOREIGN KEY (locationevent_id) REFERENCES locationevent(locationevent_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6032 |
|
|
6033 |
|
|
6034 |
-- |
|
5967 | 6035 |
-- Name: namedplace_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
5968 | 6036 |
-- |
5969 | 6037 |
|
... | ... | |
6352 | 6420 |
|
6353 | 6421 |
|
6354 | 6422 |
-- |
6423 |
-- Name: taxondetermination_morphospecies_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6424 |
-- |
|
6425 |
|
|
6426 |
ALTER TABLE taxondetermination |
|
6427 |
ADD CONSTRAINT taxondetermination_morphospecies_id FOREIGN KEY (morphospecies_id) REFERENCES morphospecies(morphospecies_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6428 |
|
|
6429 |
|
|
6430 |
-- |
|
6355 | 6431 |
-- Name: taxondetermination_party_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
6356 | 6432 |
-- |
6357 | 6433 |
|
schemas/vegbien_empty.sql | ||
---|---|---|
34 | 34 |
TRUNCATE locationeventcontributor CASCADE; |
35 | 35 |
TRUNCATE locationeventsynonym CASCADE; |
36 | 36 |
TRUNCATE locationplace CASCADE; |
37 |
TRUNCATE morphospecies CASCADE; |
|
37 | 38 |
TRUNCATE namedplace CASCADE; |
38 | 39 |
TRUNCATE namedplacecorrelation CASCADE; |
39 | 40 |
TRUNCATE note CASCADE; |
schemas/vegbien.sql | ||
---|---|---|
1394 | 1394 |
ALTER SEQUENCE locationplace_locationplace_id_seq OWNED BY locationplace.locationplace_id; |
1395 | 1395 |
|
1396 | 1396 |
|
1397 |
SET default_with_oids = false; |
|
1398 |
|
|
1397 | 1399 |
-- |
1400 |
-- Name: morphospecies; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1401 |
-- |
|
1402 |
|
|
1403 |
CREATE TABLE morphospecies ( |
|
1404 |
morphospecies_id integer NOT NULL, |
|
1405 |
locationevent_id integer NOT NULL, |
|
1406 |
name text NOT NULL |
|
1407 |
); |
|
1408 |
|
|
1409 |
|
|
1410 |
-- |
|
1411 |
-- Name: morphospecies_morphospecies_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
1412 |
-- |
|
1413 |
|
|
1414 |
CREATE SEQUENCE morphospecies_morphospecies_id_seq |
|
1415 |
START WITH 1 |
|
1416 |
INCREMENT BY 1 |
|
1417 |
NO MINVALUE |
|
1418 |
NO MAXVALUE |
|
1419 |
CACHE 1; |
|
1420 |
|
|
1421 |
|
|
1422 |
-- |
|
1423 |
-- Name: morphospecies_morphospecies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
1424 |
-- |
|
1425 |
|
|
1426 |
ALTER SEQUENCE morphospecies_morphospecies_id_seq OWNED BY morphospecies.morphospecies_id; |
|
1427 |
|
|
1428 |
|
|
1429 |
SET default_with_oids = true; |
|
1430 |
|
|
1431 |
-- |
|
1398 | 1432 |
-- Name: namedplace; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1399 | 1433 |
-- |
1400 | 1434 |
|
... | ... | |
2674 | 2708 |
revisions boolean, |
2675 | 2709 |
determinationdate timestamp with time zone, |
2676 | 2710 |
emb_taxondetermination integer, |
2677 |
accessioncode text |
|
2711 |
accessioncode text, |
|
2712 |
morphospecies_id integer |
|
2678 | 2713 |
); |
2679 | 2714 |
|
2680 | 2715 |
|
... | ... | |
3553 | 3588 |
|
3554 | 3589 |
|
3555 | 3590 |
-- |
3591 |
-- Name: morphospecies_id; Type: DEFAULT; Schema: public; Owner: - |
|
3592 |
-- |
|
3593 |
|
|
3594 |
ALTER TABLE morphospecies ALTER COLUMN morphospecies_id SET DEFAULT nextval('morphospecies_morphospecies_id_seq'::regclass); |
|
3595 |
|
|
3596 |
|
|
3597 |
-- |
|
3556 | 3598 |
-- Name: namedplace_id; Type: DEFAULT; Schema: public; Owner: - |
3557 | 3599 |
-- |
3558 | 3600 |
|
... | ... | |
4277 | 4319 |
|
4278 | 4320 |
|
4279 | 4321 |
-- |
4322 |
-- Name: morphospecies_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4323 |
-- |
|
4324 |
|
|
4325 |
ALTER TABLE ONLY morphospecies |
|
4326 |
ADD CONSTRAINT morphospecies_keys UNIQUE (locationevent_id, name); |
|
4327 |
|
|
4328 |
|
|
4329 |
-- |
|
4330 |
-- Name: morphospecies_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4331 |
-- |
|
4332 |
|
|
4333 |
ALTER TABLE ONLY morphospecies |
|
4334 |
ADD CONSTRAINT morphospecies_pkey PRIMARY KEY (morphospecies_id); |
|
4335 |
|
|
4336 |
|
|
4337 |
-- |
|
4280 | 4338 |
-- Name: namedplace_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
4281 | 4339 |
-- |
4282 | 4340 |
|
... | ... | |
5216 | 5274 |
|
5217 | 5275 |
|
5218 | 5276 |
-- |
5277 |
-- Name: fki_taxondetermination_morphospecies_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
5278 |
-- |
|
5279 |
|
|
5280 |
CREATE INDEX fki_taxondetermination_morphospecies_id ON taxondetermination USING btree (morphospecies_id); |
|
5281 |
|
|
5282 |
|
|
5283 |
-- |
|
5219 | 5284 |
-- Name: graphic_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
5220 | 5285 |
-- |
5221 | 5286 |
|
... | ... | |
6422 | 6487 |
|
6423 | 6488 |
|
6424 | 6489 |
-- |
6490 |
-- Name: morphospecies_locationevent_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6491 |
-- |
|
6492 |
|
|
6493 |
ALTER TABLE ONLY morphospecies |
|
6494 |
ADD CONSTRAINT morphospecies_locationevent_id FOREIGN KEY (locationevent_id) REFERENCES locationevent(locationevent_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6495 |
|
|
6496 |
|
|
6497 |
-- |
|
6425 | 6498 |
-- Name: namedplace_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
6426 | 6499 |
-- |
6427 | 6500 |
|
... | ... | |
6822 | 6895 |
|
6823 | 6896 |
|
6824 | 6897 |
-- |
6898 |
-- Name: taxondetermination_morphospecies_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6899 |
-- |
|
6900 |
|
|
6901 |
ALTER TABLE ONLY taxondetermination |
|
6902 |
ADD CONSTRAINT taxondetermination_morphospecies_id FOREIGN KEY (morphospecies_id) REFERENCES morphospecies(morphospecies_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6903 |
|
|
6904 |
|
|
6905 |
-- |
|
6825 | 6906 |
-- Name: taxondetermination_party_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
6826 | 6907 |
-- |
6827 | 6908 |
|
Also available in: Unified diff
vegbien.sql: Added morphospecies table