Revision 11480
Added by Aaron Marcuse-Kubitza about 11 years ago
vegbien.sql | ||
---|---|---|
1260 | 1260 |
|
1261 | 1261 |
DROP TABLE IF EXISTS analytical_stem; |
1262 | 1262 |
CREATE TABLE analytical_stem AS SELECT * FROM analytical_stem_view LIMIT 0; |
1263 |
ALTER TABLE analytical_stem ADD COLUMN row_num serial PRIMARY KEY; |
|
1263 | 1264 |
|
1264 | 1265 |
GRANT SELECT ON TABLE analytical_stem TO bien_read; |
1265 | 1266 |
GRANT SELECT ON TABLE analytical_stem_view TO bien_read; |
... | ... | |
1804 | 1805 |
"aggregateOrganismObservationID" text, |
1805 | 1806 |
"individualObservationID" text, |
1806 | 1807 |
"individualCode" text, |
1807 |
"authorStemCode" text |
|
1808 |
"authorStemCode" text, |
|
1809 |
row_num integer NOT NULL |
|
1808 | 1810 |
); |
1809 | 1811 |
|
1810 | 1812 |
|
... | ... | |
1950 | 1952 |
|
1951 | 1953 |
|
1952 | 1954 |
-- |
1955 |
-- Name: analytical_stem_row_num_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
1956 |
-- |
|
1957 |
|
|
1958 |
CREATE SEQUENCE analytical_stem_row_num_seq |
|
1959 |
START WITH 1 |
|
1960 |
INCREMENT BY 1 |
|
1961 |
NO MINVALUE |
|
1962 |
NO MAXVALUE |
|
1963 |
CACHE 1; |
|
1964 |
|
|
1965 |
|
|
1966 |
-- |
|
1967 |
-- Name: analytical_stem_row_num_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
1968 |
-- |
|
1969 |
|
|
1970 |
ALTER SEQUENCE analytical_stem_row_num_seq OWNED BY analytical_stem.row_num; |
|
1971 |
|
|
1972 |
|
|
1973 |
-- |
|
1974 |
-- Name: analytical_stem_row_num_seq; Type: SEQUENCE SET; Schema: public; Owner: - |
|
1975 |
-- |
|
1976 |
|
|
1977 |
|
|
1978 |
|
|
1979 |
-- |
|
1953 | 1980 |
-- Name: coordinates; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1954 | 1981 |
-- |
1955 | 1982 |
|
... | ... | |
4941 | 4968 |
|
4942 | 4969 |
|
4943 | 4970 |
-- |
4971 |
-- Name: row_num; Type: DEFAULT; Schema: public; Owner: - |
|
4972 |
-- |
|
4973 |
|
|
4974 |
ALTER TABLE ONLY analytical_stem ALTER COLUMN row_num SET DEFAULT nextval('analytical_stem_row_num_seq'::regclass); |
|
4975 |
|
|
4976 |
|
|
4977 |
-- |
|
4944 | 4978 |
-- Name: classcontributor_id; Type: DEFAULT; Schema: public; Owner: - |
4945 | 4979 |
-- |
4946 | 4980 |
|
... | ... | |
5827 | 5861 |
|
5828 | 5862 |
|
5829 | 5863 |
-- |
5864 |
-- Name: analytical_stem_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
5865 |
-- |
|
5866 |
|
|
5867 |
ALTER TABLE ONLY analytical_stem |
|
5868 |
ADD CONSTRAINT analytical_stem_pkey PRIMARY KEY (row_num); |
|
5869 |
|
|
5870 |
|
|
5871 |
-- |
|
5830 | 5872 |
-- Name: classcontributor_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
5831 | 5873 |
-- |
5832 | 5874 |
|
Also available in: Unified diff
schemas/vegbien.sql: analytical_stem: added row_num, which can serve as the taxon_observation ID (DwC occurrenceID)