Project

General

Profile

« Previous | Next » 

Revision 3733

schemas/vegbien.sql: locationevent unique indexes: Renamed to unique_within to better reflect what they do

View differences:

schemas/vegbien.my.sql
3649 3649

  
3650 3650

  
3651 3651
--
3652
-- Name: locationevent_unique_parent_authorcode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3652
-- Name: locationevent_unique_within_datasource; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3653 3653
--
3654 3654

  
3655 3655

  
3656 3656

  
3657 3657

  
3658 3658
--
3659
-- Name: locationevent_unique_parent_location; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3659
-- Name: locationevent_unique_within_location; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3660 3660
--
3661 3661

  
3662 3662

  
3663 3663

  
3664 3664

  
3665 3665
--
3666
-- Name: locationevent_unique_project_authorcode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3666
-- Name: locationevent_unique_within_parent_by_authorlocationcode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3667 3667
--
3668 3668

  
3669 3669

  
3670 3670

  
3671 3671

  
3672 3672
--
3673
-- Name: locationevent_unique_within_datasource; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3673
-- Name: locationevent_unique_within_parent_by_location; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3674 3674
--
3675 3675

  
3676 3676

  
3677 3677

  
3678 3678

  
3679 3679
--
3680
-- Name: locationevent_unique_within_location; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3680
-- Name: locationevent_unique_within_project; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3681 3681
--
3682 3682

  
3683 3683

  
schemas/vegbien.sql
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
--

Also available in: Unified diff