Revision 1079
Added by Aaron Marcuse-Kubitza almost 13 years ago
schemas/vegbien.my.sql | ||
---|---|---|
3013 | 3013 |
|
3014 | 3014 |
|
3015 | 3015 |
-- |
3016 |
-- Name: locationevent_keys_datasource_authorcode; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3017 |
-- |
|
3018 |
|
|
3019 |
ALTER TABLE locationevent |
|
3020 |
ADD CONSTRAINT locationevent_keys_datasource_authorcode UNIQUE (project_id, authorlocationcode, obsstartdate); |
|
3021 |
|
|
3022 |
|
|
3023 |
-- |
|
3024 |
-- Name: locationevent_keys_parent_accessioncode; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3025 |
-- |
|
3026 |
|
|
3027 |
ALTER TABLE locationevent |
|
3028 |
ADD CONSTRAINT locationevent_keys_parent_accessioncode UNIQUE (parent_id, sourceaccessioncode); |
|
3029 |
|
|
3030 |
|
|
3031 |
-- |
|
3032 | 3016 |
-- Name: locationevent_keys_parent_authorcode; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
3033 | 3017 |
-- |
3034 | 3018 |
|
... | ... | |
4029 | 4013 |
|
4030 | 4014 |
|
4031 | 4015 |
-- |
4016 |
-- Name: locationevent_keys_project_authorcode; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4017 |
-- |
|
4018 |
|
|
4019 |
|
|
4020 |
|
|
4021 |
|
|
4022 |
-- |
|
4032 | 4023 |
-- Name: locationevent_location_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4033 | 4024 |
-- |
4034 | 4025 |
|
schemas/vegbien.sql | ||
---|---|---|
3374 | 3374 |
|
3375 | 3375 |
|
3376 | 3376 |
-- |
3377 |
-- Name: locationevent_keys_datasource_authorcode; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3378 |
-- |
|
3379 |
|
|
3380 |
ALTER TABLE ONLY locationevent |
|
3381 |
ADD CONSTRAINT locationevent_keys_datasource_authorcode UNIQUE (project_id, authorlocationcode, obsstartdate); |
|
3382 |
|
|
3383 |
|
|
3384 |
-- |
|
3385 |
-- Name: locationevent_keys_parent_accessioncode; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
|
3386 |
-- |
|
3387 |
|
|
3388 |
ALTER TABLE ONLY locationevent |
|
3389 |
ADD CONSTRAINT locationevent_keys_parent_accessioncode UNIQUE (parent_id, sourceaccessioncode); |
|
3390 |
|
|
3391 |
|
|
3392 |
-- |
|
3393 | 3377 |
-- Name: locationevent_keys_parent_authorcode; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
3394 | 3378 |
-- |
3395 | 3379 |
|
... | ... | |
4390 | 4374 |
|
4391 | 4375 |
|
4392 | 4376 |
-- |
4377 |
-- Name: locationevent_keys_project_authorcode; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4378 |
-- |
|
4379 |
|
|
4380 |
CREATE UNIQUE INDEX locationevent_keys_project_authorcode ON locationevent USING btree (project_id, authorlocationcode, obsstartdate) WHERE (parent_id IS NULL); |
|
4381 |
|
|
4382 |
|
|
4383 |
-- |
|
4393 | 4384 |
-- Name: locationevent_location_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4394 | 4385 |
-- |
4395 | 4386 |
|
Also available in: Unified diff
vegbien.sql: locationevent: Redid unique constraints to avoid applying authorlocationcode-only duplicate elimination to subplots