Revision 898
Added by Aaron Marcuse-Kubitza almost 13 years ago
schemas/vegbien.my.sql | ||
---|---|---|
1013 | 1013 |
covermethod_id int(11), |
1014 | 1014 |
coverdispersion text, |
1015 | 1015 |
autotaxoncover int(1), |
1016 |
plotmethod_id int(11), |
|
1016 | 1017 |
methodnarrative text, |
1017 | 1018 |
taxonoccurrencearea double precision, |
1018 | 1019 |
stemsizelimit double precision, |
... | ... | |
1693 | 1694 |
|
1694 | 1695 |
|
1695 | 1696 |
-- |
1697 |
-- Name: plotmethod; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1698 |
-- |
|
1699 |
|
|
1700 |
CREATE TABLE plotmethod ( |
|
1701 |
plotmethod_id int(11) NOT NULL, |
|
1702 |
reference_id int(11), |
|
1703 |
name text NOT NULL, |
|
1704 |
description text, |
|
1705 |
accessioncode text |
|
1706 |
); |
|
1707 |
|
|
1708 |
|
|
1709 |
-- |
|
1710 |
-- Name: plotmethod_plotmethod_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
1711 |
-- |
|
1712 |
|
|
1713 |
|
|
1714 |
|
|
1715 |
|
|
1716 |
-- |
|
1717 |
-- Name: plotmethod_plotmethod_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
1718 |
-- |
|
1719 |
|
|
1720 |
|
|
1721 |
|
|
1722 |
|
|
1723 |
-- |
|
1696 | 1724 |
-- Name: project; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1697 | 1725 |
-- |
1698 | 1726 |
|
... | ... | |
3249 | 3277 |
|
3250 | 3278 |
|
3251 | 3279 |
-- |
3280 |
-- Name: plotmethod_id; Type: DEFAULT; Schema: public; Owner: - |
|
3281 |
-- |
|
3282 |
|
|
3283 |
|
|
3284 |
|
|
3285 |
|
|
3286 |
-- |
|
3252 | 3287 |
-- Name: project_id; Type: DEFAULT; Schema: public; Owner: - |
3253 | 3288 |
-- |
3254 | 3289 |
|
... | ... | |
4028 | 4063 |
|
4029 | 4064 |
|
4030 | 4065 |
-- |
4066 |
-- Name: plotmethod_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4067 |
-- |
|
4068 |
|
|
4069 |
ALTER TABLE plotmethod |
|
4070 |
ADD CONSTRAINT plotmethod_pkey PRIMARY KEY (plotmethod_id); |
|
4071 |
|
|
4072 |
|
|
4073 |
-- |
|
4031 | 4074 |
-- Name: project_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
4032 | 4075 |
-- |
4033 | 4076 |
|
... | ... | |
4781 | 4824 |
|
4782 | 4825 |
|
4783 | 4826 |
-- |
4827 |
-- Name: fki_locationevent_plotmethod_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4828 |
-- |
|
4829 |
|
|
4830 |
CREATE INDEX fki_locationevent_plotmethod_id ON locationevent (plotmethod_id); |
|
4831 |
|
|
4832 |
|
|
4833 |
-- |
|
4784 | 4834 |
-- Name: fki_plantobservation_plant_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4785 | 4835 |
-- |
4786 | 4836 |
|
... | ... | |
4802 | 4852 |
|
4803 | 4853 |
|
4804 | 4854 |
-- |
4855 |
-- Name: fki_plotmethod_reference_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4856 |
-- |
|
4857 |
|
|
4858 |
CREATE INDEX fki_plotmethod_reference_id ON plotmethod (reference_id); |
|
4859 |
|
|
4860 |
|
|
4861 |
-- |
|
4805 | 4862 |
-- Name: fki_specimenreplicate_museum_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4806 | 4863 |
-- |
4807 | 4864 |
|
... | ... | |
5257 | 5314 |
|
5258 | 5315 |
|
5259 | 5316 |
-- |
5317 |
-- Name: plotmethod_accessioncode; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
5318 |
-- |
|
5319 |
|
|
5320 |
CREATE UNIQUE INDEX plotmethod_accessioncode ON plotmethod (accessioncode); |
|
5321 |
|
|
5322 |
|
|
5323 |
-- |
|
5260 | 5324 |
-- Name: project_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
5261 | 5325 |
-- |
5262 | 5326 |
|
... | ... | |
5930 | 5994 |
|
5931 | 5995 |
|
5932 | 5996 |
-- |
5997 |
-- Name: locationevent_plotmethod_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
5998 |
-- |
|
5999 |
|
|
6000 |
ALTER TABLE locationevent |
|
6001 |
ADD CONSTRAINT locationevent_plotmethod_id FOREIGN KEY (plotmethod_id) REFERENCES plotmethod(plotmethod_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6002 |
|
|
6003 |
|
|
6004 |
-- |
|
5933 | 6005 |
-- Name: locationevent_previousobs_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
5934 | 6006 |
-- |
5935 | 6007 |
|
... | ... | |
6241 | 6313 |
|
6242 | 6314 |
|
6243 | 6315 |
-- |
6316 |
-- Name: plotmethod_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6317 |
-- |
|
6318 |
|
|
6319 |
|
|
6320 |
|
|
6321 |
|
|
6322 |
-- |
|
6244 | 6323 |
-- Name: project_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
6245 | 6324 |
-- |
6246 | 6325 |
|
schemas/vegbien_empty.sql | ||
---|---|---|
50 | 50 |
TRUNCATE plantstatus CASCADE; |
51 | 51 |
TRUNCATE planttag CASCADE; |
52 | 52 |
TRUNCATE plantusage CASCADE; |
53 |
TRUNCATE plotmethod CASCADE; |
|
53 | 54 |
TRUNCATE project CASCADE; |
54 | 55 |
TRUNCATE projectcontributor CASCADE; |
55 | 56 |
TRUNCATE reference CASCADE; |
schemas/vegbien.sql | ||
---|---|---|
1179 | 1179 |
covermethod_id integer, |
1180 | 1180 |
coverdispersion text, |
1181 | 1181 |
autotaxoncover boolean, |
1182 |
plotmethod_id integer, |
|
1182 | 1183 |
methodnarrative text, |
1183 | 1184 |
taxonoccurrencearea double precision, |
1184 | 1185 |
stemsizelimit double precision, |
... | ... | |
1959 | 1960 |
|
1960 | 1961 |
|
1961 | 1962 |
-- |
1963 |
-- Name: plotmethod; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1964 |
-- |
|
1965 |
|
|
1966 |
CREATE TABLE plotmethod ( |
|
1967 |
plotmethod_id integer NOT NULL, |
|
1968 |
reference_id integer, |
|
1969 |
name text NOT NULL, |
|
1970 |
description text, |
|
1971 |
accessioncode text |
|
1972 |
); |
|
1973 |
|
|
1974 |
|
|
1975 |
-- |
|
1976 |
-- Name: plotmethod_plotmethod_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
1977 |
-- |
|
1978 |
|
|
1979 |
CREATE SEQUENCE plotmethod_plotmethod_id_seq |
|
1980 |
START WITH 1 |
|
1981 |
INCREMENT BY 1 |
|
1982 |
NO MINVALUE |
|
1983 |
NO MAXVALUE |
|
1984 |
CACHE 1; |
|
1985 |
|
|
1986 |
|
|
1987 |
-- |
|
1988 |
-- Name: plotmethod_plotmethod_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
1989 |
-- |
|
1990 |
|
|
1991 |
ALTER SEQUENCE plotmethod_plotmethod_id_seq OWNED BY plotmethod.plotmethod_id; |
|
1992 |
|
|
1993 |
|
|
1994 |
-- |
|
1962 | 1995 |
-- Name: project; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1963 | 1996 |
-- |
1964 | 1997 |
|
... | ... | |
3700 | 3733 |
|
3701 | 3734 |
|
3702 | 3735 |
-- |
3736 |
-- Name: plotmethod_id; Type: DEFAULT; Schema: public; Owner: - |
|
3737 |
-- |
|
3738 |
|
|
3739 |
ALTER TABLE plotmethod ALTER COLUMN plotmethod_id SET DEFAULT nextval('plotmethod_plotmethod_id_seq'::regclass); |
|
3740 |
|
|
3741 |
|
|
3742 |
-- |
|
3703 | 3743 |
-- Name: project_id; Type: DEFAULT; Schema: public; Owner: - |
3704 | 3744 |
-- |
3705 | 3745 |
|
... | ... | |
4479 | 4519 |
|
4480 | 4520 |
|
4481 | 4521 |
-- |
4522 |
-- Name: plotmethod_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4523 |
-- |
|
4524 |
|
|
4525 |
ALTER TABLE ONLY plotmethod |
|
4526 |
ADD CONSTRAINT plotmethod_pkey PRIMARY KEY (plotmethod_id); |
|
4527 |
|
|
4528 |
|
|
4529 |
-- |
|
4482 | 4530 |
-- Name: project_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
4483 | 4531 |
-- |
4484 | 4532 |
|
... | ... | |
5232 | 5280 |
|
5233 | 5281 |
|
5234 | 5282 |
-- |
5283 |
-- Name: fki_locationevent_plotmethod_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
5284 |
-- |
|
5285 |
|
|
5286 |
CREATE INDEX fki_locationevent_plotmethod_id ON locationevent USING btree (plotmethod_id); |
|
5287 |
|
|
5288 |
|
|
5289 |
-- |
|
5235 | 5290 |
-- Name: fki_plantobservation_plant_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
5236 | 5291 |
-- |
5237 | 5292 |
|
... | ... | |
5253 | 5308 |
|
5254 | 5309 |
|
5255 | 5310 |
-- |
5311 |
-- Name: fki_plotmethod_reference_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
5312 |
-- |
|
5313 |
|
|
5314 |
CREATE INDEX fki_plotmethod_reference_id ON plotmethod USING btree (reference_id); |
|
5315 |
|
|
5316 |
|
|
5317 |
-- |
|
5256 | 5318 |
-- Name: fki_specimenreplicate_museum_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
5257 | 5319 |
-- |
5258 | 5320 |
|
... | ... | |
5708 | 5770 |
|
5709 | 5771 |
|
5710 | 5772 |
-- |
5773 |
-- Name: plotmethod_accessioncode; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
5774 |
-- |
|
5775 |
|
|
5776 |
CREATE UNIQUE INDEX plotmethod_accessioncode ON plotmethod USING btree (accessioncode); |
|
5777 |
|
|
5778 |
|
|
5779 |
-- |
|
5711 | 5780 |
-- Name: project_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
5712 | 5781 |
-- |
5713 | 5782 |
|
... | ... | |
6391 | 6460 |
|
6392 | 6461 |
|
6393 | 6462 |
-- |
6463 |
-- Name: locationevent_plotmethod_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6464 |
-- |
|
6465 |
|
|
6466 |
ALTER TABLE ONLY locationevent |
|
6467 |
ADD CONSTRAINT locationevent_plotmethod_id FOREIGN KEY (plotmethod_id) REFERENCES plotmethod(plotmethod_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6468 |
|
|
6469 |
|
|
6470 |
-- |
|
6394 | 6471 |
-- Name: locationevent_previousobs_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
6395 | 6472 |
-- |
6396 | 6473 |
|
... | ... | |
6711 | 6788 |
|
6712 | 6789 |
|
6713 | 6790 |
-- |
6791 |
-- Name: plotmethod_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
6792 |
-- |
|
6793 |
|
|
6794 |
ALTER TABLE ONLY plotmethod |
|
6795 |
ADD CONSTRAINT plotmethod_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
6796 |
|
|
6797 |
|
|
6798 |
-- |
|
6714 | 6799 |
-- Name: project_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: - |
6715 | 6800 |
-- |
6716 | 6801 |
|
Also available in: Unified diff
vegbien.sql: Added plotmethod table