Revision 1319
Added by Aaron Marcuse-Kubitza almost 13 years ago
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
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)