Project

General

Profile

« Previous | Next » 

Revision 1315

vegbien.sql: namedplace: Added rank. Do duplicate elimination using rank and parent_id instead of placesystem

View differences:

vegbien.sql
1364 1364
    placedescription text,
1365 1365
    placecode text,
1366 1366
    accessioncode text,
1367
    parent_id integer
1367
    parent_id integer,
1368
    rank placerank
1368 1369
);
1369 1370

  
1370 1371

  
......
3602 3603

  
3603 3604

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

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

  
3611

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

  
......
4603 4596

  
4604 4597

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

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

  
4604

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

  

Also available in: Unified diff