Revision 5859
Added by Aaron Marcuse-Kubitza about 12 years ago
schemas/vegbien.my.sql | ||
---|---|---|
1584 | 1584 |
|
1585 | 1585 |
|
1586 | 1586 |
-- |
1587 |
-- Name: coordinates; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1588 |
-- |
|
1589 |
|
|
1590 |
CREATE TABLE coordinates ( |
|
1591 |
coordinates_id int(11) NOT NULL, |
|
1592 |
creator_id int(11) NOT NULL, |
|
1593 |
latitude_deg double precision NOT NULL, |
|
1594 |
longitude_deg double precision NOT NULL, |
|
1595 |
verbatimlatitude text, |
|
1596 |
verbatimlongitude text, |
|
1597 |
verbatimcoordinates text, |
|
1598 |
footprintgeometry_dwc text, |
|
1599 |
coordsaccuracy_deg double precision |
|
1600 |
); |
|
1601 |
|
|
1602 |
|
|
1603 |
-- |
|
1604 |
-- Name: COLUMN coordinates.footprintgeometry_dwc; Type: COMMENT; Schema: public; Owner: - |
|
1605 |
-- |
|
1606 |
|
|
1607 |
|
|
1608 |
|
|
1609 |
|
|
1610 |
-- |
|
1611 |
-- Name: COLUMN coordinates.coordsaccuracy_deg; Type: COMMENT; Schema: public; Owner: - |
|
1612 |
-- |
|
1613 |
|
|
1614 |
|
|
1615 |
|
|
1616 |
|
|
1617 |
-- |
|
1618 |
-- Name: coordinates_coordinates_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
1619 |
-- |
|
1620 |
|
|
1621 |
|
|
1622 |
|
|
1623 |
|
|
1624 |
-- |
|
1625 |
-- Name: coordinates_coordinates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
1626 |
-- |
|
1627 |
|
|
1628 |
|
|
1629 |
|
|
1630 |
|
|
1631 |
-- |
|
1587 | 1632 |
-- Name: coverindex; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1588 | 1633 |
-- |
1589 | 1634 |
|
... | ... | |
2973 | 3018 |
|
2974 | 3019 |
|
2975 | 3020 |
-- |
3021 |
-- Name: coordinates_id; Type: DEFAULT; Schema: public; Owner: - |
|
3022 |
-- |
|
3023 |
|
|
3024 |
|
|
3025 |
|
|
3026 |
|
|
3027 |
-- |
|
2976 | 3028 |
-- Name: coverindex_id; Type: DEFAULT; Schema: public; Owner: - |
2977 | 3029 |
-- |
2978 | 3030 |
|
... | ... | |
3421 | 3473 |
|
3422 | 3474 |
|
3423 | 3475 |
-- |
3476 |
-- Name: coordinates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3477 |
-- |
|
3478 |
|
|
3479 |
ALTER TABLE coordinates |
|
3480 |
ADD CONSTRAINT coordinates_pkey PRIMARY KEY (coordinates_id); |
|
3481 |
|
|
3482 |
|
|
3483 |
-- |
|
3424 | 3484 |
-- Name: coverindex_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
3425 | 3485 |
-- |
3426 | 3486 |
|
... | ... | |
3950 | 4010 |
|
3951 | 4011 |
|
3952 | 4012 |
-- |
4013 |
-- Name: coordinates_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4014 |
-- |
|
4015 |
|
|
4016 |
|
|
4017 |
|
|
4018 |
|
|
4019 |
-- |
|
3953 | 4020 |
-- Name: covermethod_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
3954 | 4021 |
-- |
3955 | 4022 |
|
... | ... | |
4660 | 4727 |
|
4661 | 4728 |
|
4662 | 4729 |
-- |
4730 |
-- Name: coordinates_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
4731 |
-- |
|
4732 |
|
|
4733 |
|
|
4734 |
|
|
4735 |
|
|
4736 |
-- |
|
4663 | 4737 |
-- Name: coverindex_covermethod_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
4664 | 4738 |
-- |
4665 | 4739 |
|
schemas/vegbien.sql | ||
---|---|---|
2173 | 2173 |
|
2174 | 2174 |
|
2175 | 2175 |
-- |
2176 |
-- Name: coordinates; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
2177 |
-- |
|
2178 |
|
|
2179 |
CREATE TABLE coordinates ( |
|
2180 |
coordinates_id integer NOT NULL, |
|
2181 |
creator_id integer NOT NULL, |
|
2182 |
latitude_deg double precision NOT NULL, |
|
2183 |
longitude_deg double precision NOT NULL, |
|
2184 |
verbatimlatitude text, |
|
2185 |
verbatimlongitude text, |
|
2186 |
verbatimcoordinates text, |
|
2187 |
footprintgeometry_dwc text, |
|
2188 |
coordsaccuracy_deg double precision |
|
2189 |
); |
|
2190 |
|
|
2191 |
|
|
2192 |
-- |
|
2193 |
-- Name: COLUMN coordinates.footprintgeometry_dwc; Type: COMMENT; Schema: public; Owner: - |
|
2194 |
-- |
|
2195 |
|
|
2196 |
COMMENT ON COLUMN coordinates.footprintgeometry_dwc IS 'DwC''s footprintWKT field. "A Well-Known Text (WKT) representation of the shape (footprint, geometry) that defines the Location" (http://rs.tdwg.org/dwc/terms/#footprintWKT).'; |
|
2197 |
|
|
2198 |
|
|
2199 |
-- |
|
2200 |
-- Name: COLUMN coordinates.coordsaccuracy_deg; Type: COMMENT; Schema: public; Owner: - |
|
2201 |
-- |
|
2202 |
|
|
2203 |
COMMENT ON COLUMN coordinates.coordsaccuracy_deg IS 'Accuracy of latitude/longitude or footprint geometry, in meters. This should generally be at least 1 m, which is the accuracy of the best GPSes.'; |
|
2204 |
|
|
2205 |
|
|
2206 |
-- |
|
2207 |
-- Name: coordinates_coordinates_id_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
2208 |
-- |
|
2209 |
|
|
2210 |
CREATE SEQUENCE coordinates_coordinates_id_seq |
|
2211 |
START WITH 1 |
|
2212 |
INCREMENT BY 1 |
|
2213 |
NO MINVALUE |
|
2214 |
NO MAXVALUE |
|
2215 |
CACHE 1; |
|
2216 |
|
|
2217 |
|
|
2218 |
-- |
|
2219 |
-- Name: coordinates_coordinates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
2220 |
-- |
|
2221 |
|
|
2222 |
ALTER SEQUENCE coordinates_coordinates_id_seq OWNED BY coordinates.coordinates_id; |
|
2223 |
|
|
2224 |
|
|
2225 |
-- |
|
2176 | 2226 |
-- Name: coverindex; Type: TABLE; Schema: public; Owner: -; Tablespace: |
2177 | 2227 |
-- |
2178 | 2228 |
|
... | ... | |
3819 | 3869 |
|
3820 | 3870 |
|
3821 | 3871 |
-- |
3872 |
-- Name: coordinates_id; Type: DEFAULT; Schema: public; Owner: - |
|
3873 |
-- |
|
3874 |
|
|
3875 |
ALTER TABLE coordinates ALTER COLUMN coordinates_id SET DEFAULT nextval('coordinates_coordinates_id_seq'::regclass); |
|
3876 |
|
|
3877 |
|
|
3878 |
-- |
|
3822 | 3879 |
-- Name: coverindex_id; Type: DEFAULT; Schema: public; Owner: - |
3823 | 3880 |
-- |
3824 | 3881 |
|
... | ... | |
4267 | 4324 |
|
4268 | 4325 |
|
4269 | 4326 |
-- |
4327 |
-- Name: coordinates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4328 |
-- |
|
4329 |
|
|
4330 |
ALTER TABLE ONLY coordinates |
|
4331 |
ADD CONSTRAINT coordinates_pkey PRIMARY KEY (coordinates_id); |
|
4332 |
|
|
4333 |
|
|
4334 |
-- |
|
4270 | 4335 |
-- Name: coverindex_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
4271 | 4336 |
-- |
4272 | 4337 |
|
... | ... | |
4796 | 4861 |
|
4797 | 4862 |
|
4798 | 4863 |
-- |
4864 |
-- Name: coordinates_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4865 |
-- |
|
4866 |
|
|
4867 |
CREATE UNIQUE INDEX coordinates_unique ON coordinates USING btree (creator_id, latitude_deg, longitude_deg, (COALESCE(verbatimlatitude, '\\N'::text)), (COALESCE(verbatimlongitude, '\\N'::text)), (COALESCE(verbatimcoordinates, '\\N'::text)), (COALESCE(footprintgeometry_dwc, '\\N'::text))); |
|
4868 |
|
|
4869 |
|
|
4870 |
-- |
|
4799 | 4871 |
-- Name: covermethod_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4800 | 4872 |
-- |
4801 | 4873 |
|
... | ... | |
5518 | 5590 |
|
5519 | 5591 |
|
5520 | 5592 |
-- |
5593 |
-- Name: coordinates_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
|
5594 |
-- |
|
5595 |
|
|
5596 |
ALTER TABLE ONLY coordinates |
|
5597 |
ADD CONSTRAINT coordinates_creator_id_fkey FOREIGN KEY (creator_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
5598 |
|
|
5599 |
|
|
5600 |
-- |
|
5521 | 5601 |
-- Name: coverindex_covermethod_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - |
5522 | 5602 |
-- |
5523 | 5603 |
|
Also available in: Unified diff
schemas/vegbien.sql: Added coordinates table