Revision 570
Added by Aaron Marcuse-Kubitza almost 13 years ago
vegbien.sql | ||
---|---|---|
1064 | 1064 |
overallheight double precision, |
1065 | 1065 |
overallheightaccuracy double precision, |
1066 | 1066 |
emb_individualplant integer, |
1067 |
sourceid character varying(20),
|
|
1067 |
authorplantcode character varying(20),
|
|
1068 | 1068 |
accessioncode character varying(255), |
1069 | 1069 |
stemcount integer |
1070 | 1070 |
); |
... | ... | |
1124 | 1124 |
|
1125 | 1125 |
CREATE TABLE location ( |
1126 | 1126 |
location_id integer NOT NULL, |
1127 |
sourceid character varying(30),
|
|
1127 |
authorlocationcode character varying(30),
|
|
1128 | 1128 |
reference_id integer, |
1129 | 1129 |
parent_id integer, |
1130 | 1130 |
reallatitude double precision, |
... | ... | |
1207 | 1207 |
previous_id integer, |
1208 | 1208 |
location_id integer NOT NULL, |
1209 | 1209 |
project_id integer, |
1210 |
sourceid character varying(30),
|
|
1210 |
authoreventcode character varying(30),
|
|
1211 | 1211 |
dateaccuracy character varying(30), |
1212 | 1212 |
covermethod_id integer, |
1213 | 1213 |
coverdispersion character varying(30), |
... | ... | |
2309 | 2309 |
CREATE TABLE stem ( |
2310 | 2310 |
stem_id integer NOT NULL, |
2311 | 2311 |
individualplant_id integer NOT NULL, |
2312 |
sourceid character varying(20),
|
|
2312 |
authorstemcode character varying(20),
|
|
2313 | 2313 |
xposition double precision, |
2314 | 2314 |
yposition double precision, |
2315 | 2315 |
health character varying(50), |
... | ... | |
4038 | 4038 |
-- |
4039 | 4039 |
|
4040 | 4040 |
ALTER TABLE ONLY individualplant |
4041 |
ADD CONSTRAINT individualplant_keys UNIQUE (aggregateoccurrence_id, sourceid);
|
|
4041 |
ADD CONSTRAINT individualplant_keys UNIQUE (aggregateoccurrence_id, authorplantcode);
|
|
4042 | 4042 |
|
4043 | 4043 |
|
4044 | 4044 |
-- |
... | ... | |
4054 | 4054 |
-- |
4055 | 4055 |
|
4056 | 4056 |
ALTER TABLE ONLY location |
4057 |
ADD CONSTRAINT location_keys UNIQUE (reference_id, parent_id, sourceid);
|
|
4057 |
ADD CONSTRAINT location_keys UNIQUE (reference_id, parent_id, authorlocationcode);
|
|
4058 | 4058 |
|
4059 | 4059 |
|
4060 | 4060 |
-- |
... | ... | |
4070 | 4070 |
-- |
4071 | 4071 |
|
4072 | 4072 |
ALTER TABLE ONLY locationevent |
4073 |
ADD CONSTRAINT locationevent_keys UNIQUE (location_id, project_id, sourceid);
|
|
4073 |
ADD CONSTRAINT locationevent_keys UNIQUE (location_id, project_id, authoreventcode);
|
|
4074 | 4074 |
|
4075 | 4075 |
|
4076 | 4076 |
-- |
... | ... | |
4350 | 4350 |
-- |
4351 | 4351 |
|
4352 | 4352 |
ALTER TABLE ONLY stem |
4353 |
ADD CONSTRAINT stem_keys UNIQUE (individualplant_id, sourceid);
|
|
4353 |
ADD CONSTRAINT stem_keys UNIQUE (individualplant_id, authorstemcode);
|
|
4354 | 4354 |
|
4355 | 4355 |
|
4356 | 4356 |
-- |
Also available in: Unified diff
VegBIEN: Renamed sourceid to author*code