Project

General

Profile

« Previous | Next » 

Revision 2869

schemas/vegbien.sql: namedplace: Fixed bug where parent_id needed to be included in UNIQUE CONSTRAINT (now UNIQUE INDEX), since there can be more than one e.g. city of the same name if they are in different states

View differences:

schemas/vegbien.my.sql
3247 3247

  
3248 3248

  
3249 3249
--
3250
-- Name: namedplace_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3251
--
3252

  
3253
ALTER TABLE namedplace
3254
    ADD CONSTRAINT namedplace_unique UNIQUE (rank, placename);
3255

  
3256

  
3257
--
3258 3250
-- Name: namedplacecorrelation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3259 3251
--
3260 3252

  
......
4283 4275

  
4284 4276

  
4285 4277
--
4278
-- Name: namedplace_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4279
--
4280

  
4281

  
4282

  
4283

  
4284
--
4286 4285
-- Name: note_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4287 4286
--
4288 4287

  
schemas/vegbien.sql
3774 3774

  
3775 3775

  
3776 3776
--
3777
-- Name: namedplace_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3778
--
3779

  
3780
ALTER TABLE ONLY namedplace
3781
    ADD CONSTRAINT namedplace_unique UNIQUE (rank, placename);
3782

  
3783

  
3784
--
3785 3777
-- Name: namedplacecorrelation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3786 3778
--
3787 3779

  
......
4810 4802

  
4811 4803

  
4812 4804
--
4805
-- Name: namedplace_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4806
--
4807

  
4808
CREATE UNIQUE INDEX namedplace_unique ON namedplace USING btree ((COALESCE(parent_id, 2147483647)), rank, placename);
4809

  
4810

  
4811
--
4813 4812
-- Name: note_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4814 4813
--
4815 4814

  

Also available in: Unified diff