Project

General

Profile

« Previous | Next » 

Revision 3998

schemas/vegbien.sql: locationevent: locationevent_unique_within_location: Added authoreventcode to index. It was already in the locationevent_unique_within_*parent*_by_authoreventcode index, but also needed to be in the no-parent (non-subplot) index. This fixes locationevent duplicate elimination when a locationevent sourceaccessioncode is not specified.

View differences:

inputs/CVS/test/import.organisms.xml.ref
85 85
        </locationevent>
86 86
    </location>
87 87
</VegBIEN>
88
Inserted 17 new rows into database
88
Inserted 16 new rows into database
inputs/SALVIAS/test/import.organisms.xml.ref
266 266
        </parent_id>
267 267
    </location>
268 268
</VegBIEN>
269
Inserted 47 new rows into database
269
Inserted 46 new rows into database
schemas/vegbien.sql
4197 4197
-- Name: locationevent_unique_within_location; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4198 4198
--
4199 4199

  
4200
CREATE UNIQUE INDEX locationevent_unique_within_location ON locationevent USING btree (location_id, (COALESCE(obsstartdate, 'infinity'::timestamp with time zone))) WHERE (((parent_id IS NULL) AND (sourceaccessioncode IS NULL)) AND (authoreventcode IS NULL));
4200
CREATE UNIQUE INDEX locationevent_unique_within_location ON locationevent USING btree (location_id, (COALESCE(authoreventcode, '\\N'::text)), (COALESCE(obsstartdate, 'infinity'::timestamp with time zone))) WHERE ((parent_id IS NULL) AND (sourceaccessioncode IS NULL));
4201 4201

  
4202 4202

  
4203 4203
--

Also available in: Unified diff