Project

General

Profile

« Previous | Next » 

Revision 4061

schemas/vegbien.sql: location: location_unique_within_datasource_by_authorlocationcode unique index: Added `parent_id IS NULL` condition so that an authorlocationcode is not unintentionally treated as globally unique when a parent location is available (which implies that the authorlocationcode is a subplot code)

View differences:

schemas/vegbien.sql
4162 4162
-- Name: location_unique_within_datasource_by_authorlocationcode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4163 4163
--
4164 4164

  
4165
CREATE UNIQUE INDEX location_unique_within_datasource_by_authorlocationcode ON location USING btree (datasource_id, (COALESCE(authorlocationcode, '\\N'::text))) WHERE ((authorlocationcode IS NOT NULL) AND (sourceaccessioncode IS NULL));
4165
CREATE UNIQUE INDEX location_unique_within_datasource_by_authorlocationcode ON location USING btree (datasource_id, (COALESCE(authorlocationcode, '\\N'::text))) WHERE (((authorlocationcode IS NOT NULL) AND (parent_id IS NULL)) AND (sourceaccessioncode IS NULL));
4166 4166

  
4167 4167

  
4168 4168
--

Also available in: Unified diff