Project

General

Profile

« Previous | Next » 

Revision 1319

vegbien.sql: namedplace: Removed parent_id from unique constraint because some data might be missing intervening links (e.g. state for a county, country), but the place (e.g. county) should still be attached to the existing place of the same name and rank (which will hopefully already have the correct parent_id link)

View differences:

schemas/vegbien.my.sql
3191 3191

  
3192 3192

  
3193 3193
--
3194
-- Name: namedplace_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3195
--
3196

  
3197
ALTER TABLE namedplace
3198
    ADD CONSTRAINT namedplace_unique UNIQUE (rank, placename);
3199

  
3200

  
3201
--
3194 3202
-- Name: namedplacecorrelation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3195 3203
--
3196 3204

  
......
4184 4192

  
4185 4193

  
4186 4194
--
4187
-- Name: namedplace_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4188
--
4189

  
4190

  
4191

  
4192

  
4193
--
4194 4195
-- Name: note_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4195 4196
--
4196 4197

  
schemas/vegbien.sql
3602 3602

  
3603 3603

  
3604 3604
--
3605
-- Name: namedplace_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3606
--
3607

  
3608
ALTER TABLE ONLY namedplace
3609
    ADD CONSTRAINT namedplace_unique UNIQUE (rank, placename);
3610

  
3611

  
3612
--
3605 3613
-- Name: namedplacecorrelation_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3606 3614
--
3607 3615

  
......
4595 4603

  
4596 4604

  
4597 4605
--
4598
-- Name: namedplace_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4599
--
4600

  
4601
CREATE UNIQUE INDEX namedplace_unique ON namedplace USING btree ((COALESCE(parent_id, 0)), rank, placename);
4602

  
4603

  
4604
--
4605 4606
-- Name: note_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4606 4607
--
4607 4608

  

Also available in: Unified diff