4195 |
4195 |
|
4196 |
4196 |
|
4197 |
4197 |
--
|
4198 |
|
-- Name: locationevent_unique_parent_authorcode; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
|
4198 |
-- Name: locationevent_unique_within_datasource; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
4199 |
4199 |
--
|
4200 |
4200 |
|
4201 |
|
CREATE UNIQUE INDEX locationevent_unique_parent_authorcode ON locationevent USING btree ((COALESCE(parent_id, 2147483647)), (COALESCE(authorlocationcode, '\\N'::text))) WHERE ((parent_id IS NOT NULL) AND (authorlocationcode IS NOT NULL));
|
|
4201 |
CREATE UNIQUE INDEX locationevent_unique_within_datasource ON locationevent USING btree (datasource_id, (COALESCE(sourceaccessioncode, '\\N'::text))) WHERE (sourceaccessioncode IS NOT NULL);
|
4202 |
4202 |
|
4203 |
4203 |
|
4204 |
4204 |
--
|
4205 |
|
-- Name: locationevent_unique_parent_location; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
|
4205 |
-- Name: locationevent_unique_within_location; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
4206 |
4206 |
--
|
4207 |
4207 |
|
4208 |
|
CREATE UNIQUE INDEX locationevent_unique_parent_location ON locationevent USING btree ((COALESCE(parent_id, 2147483647)), location_id) WHERE (parent_id IS NOT NULL);
|
|
4208 |
CREATE UNIQUE INDEX locationevent_unique_within_location ON locationevent USING btree (location_id, (COALESCE(sourceaccessioncode, '\\N'::text)), (COALESCE(obsstartdate, 'infinity'::timestamp with time zone))) WHERE (parent_id IS NULL);
|
4209 |
4209 |
|
4210 |
4210 |
|
4211 |
4211 |
--
|
4212 |
|
-- Name: locationevent_unique_project_authorcode; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
|
4212 |
-- Name: locationevent_unique_within_parent_by_authorlocationcode; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
4213 |
4213 |
--
|
4214 |
4214 |
|
4215 |
|
CREATE UNIQUE INDEX locationevent_unique_project_authorcode ON locationevent USING btree ((COALESCE(project_id, 2147483647)), (COALESCE(authorlocationcode, '\\N'::text)), (COALESCE(obsstartdate, 'infinity'::timestamp with time zone))) WHERE ((((parent_id IS NULL) AND (project_id IS NOT NULL)) AND (authorlocationcode IS NOT NULL)) AND (obsstartdate IS NOT NULL));
|
|
4215 |
CREATE UNIQUE INDEX locationevent_unique_within_parent_by_authorlocationcode ON locationevent USING btree ((COALESCE(parent_id, 2147483647)), (COALESCE(authorlocationcode, '\\N'::text))) WHERE ((parent_id IS NOT NULL) AND (authorlocationcode IS NOT NULL));
|
4216 |
4216 |
|
4217 |
4217 |
|
4218 |
4218 |
--
|
4219 |
|
-- Name: locationevent_unique_within_datasource; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
|
4219 |
-- Name: locationevent_unique_within_parent_by_location; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
4220 |
4220 |
--
|
4221 |
4221 |
|
4222 |
|
CREATE UNIQUE INDEX locationevent_unique_within_datasource ON locationevent USING btree (datasource_id, (COALESCE(sourceaccessioncode, '\\N'::text))) WHERE (sourceaccessioncode IS NOT NULL);
|
|
4222 |
CREATE UNIQUE INDEX locationevent_unique_within_parent_by_location ON locationevent USING btree ((COALESCE(parent_id, 2147483647)), location_id) WHERE (parent_id IS NOT NULL);
|
4223 |
4223 |
|
4224 |
4224 |
|
4225 |
4225 |
--
|
4226 |
|
-- Name: locationevent_unique_within_location; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
|
4226 |
-- Name: locationevent_unique_within_project; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
4227 |
4227 |
--
|
4228 |
4228 |
|
4229 |
|
CREATE UNIQUE INDEX locationevent_unique_within_location ON locationevent USING btree (location_id, (COALESCE(sourceaccessioncode, '\\N'::text)), (COALESCE(obsstartdate, 'infinity'::timestamp with time zone))) WHERE (parent_id IS NULL);
|
|
4229 |
CREATE UNIQUE INDEX locationevent_unique_within_project ON locationevent USING btree ((COALESCE(project_id, 2147483647)), (COALESCE(authorlocationcode, '\\N'::text)), (COALESCE(obsstartdate, 'infinity'::timestamp with time zone))) WHERE ((((parent_id IS NULL) AND (project_id IS NOT NULL)) AND (authorlocationcode IS NOT NULL)) AND (obsstartdate IS NOT NULL));
|
4230 |
4230 |
|
4231 |
4231 |
|
4232 |
4232 |
--
|
schemas/vegbien.sql: locationevent unique indexes: Renamed to unique_within to better reflect what they do