Revision 11480
Added by Aaron Marcuse-Kubitza about 11 years ago
schemas/vegbien.my.sql | ||
---|---|---|
833 | 833 |
`aggregateOrganismObservationID` varchar(255), |
834 | 834 |
`individualObservationID` varchar(255), |
835 | 835 |
`individualCode` varchar(255), |
836 |
`authorStemCode` varchar(255) |
|
836 |
`authorStemCode` varchar(255), |
|
837 |
row_num int(11) NOT NULL |
|
837 | 838 |
); |
838 | 839 |
|
839 | 840 |
|
... | ... | |
965 | 966 |
|
966 | 967 |
|
967 | 968 |
-- |
969 |
-- Name: analytical_stem_row_num_seq; Type: SEQUENCE; Schema: public; Owner: - |
|
970 |
-- |
|
971 |
|
|
972 |
|
|
973 |
|
|
974 |
|
|
975 |
-- |
|
976 |
-- Name: analytical_stem_row_num_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - |
|
977 |
-- |
|
978 |
|
|
979 |
|
|
980 |
|
|
981 |
|
|
982 |
-- |
|
983 |
-- Name: analytical_stem_row_num_seq; Type: SEQUENCE SET; Schema: public; Owner: - |
|
984 |
-- |
|
985 |
|
|
986 |
|
|
987 |
|
|
988 |
-- |
|
968 | 989 |
-- Name: coordinates; Type: TABLE; Schema: public; Owner: -; Tablespace: |
969 | 990 |
-- |
970 | 991 |
|
... | ... | |
3617 | 3638 |
|
3618 | 3639 |
|
3619 | 3640 |
-- |
3641 |
-- Name: row_num; Type: DEFAULT; Schema: public; Owner: - |
|
3642 |
-- |
|
3643 |
|
|
3644 |
|
|
3645 |
|
|
3646 |
|
|
3647 |
-- |
|
3620 | 3648 |
-- Name: classcontributor_id; Type: DEFAULT; Schema: public; Owner: - |
3621 | 3649 |
-- |
3622 | 3650 |
|
... | ... | |
4503 | 4531 |
|
4504 | 4532 |
|
4505 | 4533 |
-- |
4534 |
-- Name: analytical_stem_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
4535 |
-- |
|
4536 |
|
|
4537 |
ALTER TABLE analytical_stem |
|
4538 |
ADD CONSTRAINT analytical_stem_pkey PRIMARY KEY (row_num); |
|
4539 |
|
|
4540 |
|
|
4541 |
-- |
|
4506 | 4542 |
-- Name: classcontributor_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
4507 | 4543 |
-- |
4508 | 4544 |
|
schemas/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)