Project

General

Profile

« Previous | Next » 

Revision 1312

vegbien.sql: namedplace: Removed VegBank internal fields and datasource scoping fields (namedplaces are globally unique). Added parent_id to point to containing namedplace.

View differences:

vegbien.my.sql
1128 1128
    placename text NOT NULL,
1129 1129
    placedescription text,
1130 1130
    placecode text,
1131
    owner text,
1132
    reference_id int(11),
1133
    d_obscount int(11),
1134
    accessioncode text
1131
    accessioncode text,
1132
    parent_id int(11)
1135 1133
);
1136 1134

  
1137 1135

  
......
3914 3912

  
3915 3913

  
3916 3914
--
3915
-- Name: fki_namedplace_parent_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3916
--
3917

  
3918
CREATE INDEX fki_namedplace_parent_id ON namedplace  (parent_id);
3919

  
3920

  
3921
--
3917 3922
-- Name: fki_plantconcept_scope_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3918 3923
--
3919 3924

  
......
4173 4178

  
4174 4179

  
4175 4180
--
4176
-- Name: namedplace_reference_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4177
--
4178

  
4179
CREATE INDEX namedplace_reference_id_x ON namedplace  (reference_id);
4180

  
4181

  
4182
--
4183 4181
-- Name: note_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4184 4182
--
4185 4183

  
......
5146 5144

  
5147 5145

  
5148 5146
--
5149
-- Name: namedplace_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
5147
-- Name: namedplace_parent_id; Type: FK CONSTRAINT; Schema: public; Owner: -
5150 5148
--
5151 5149

  
5150
ALTER TABLE namedplace
5151
    ADD CONSTRAINT namedplace_parent_id FOREIGN KEY (parent_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
5152 5152

  
5153 5153

  
5154

  
5155 5154
--
5156 5155
-- Name: namedplacecorrelation_childplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
5157 5156
--

Also available in: Unified diff