Project

General

Profile

« Previous | Next » 

Revision 909

vegbien.sql: Added plantconceptscope.namedplace_id

View differences:

schemas/vegbien.my.sql
1487 1487
CREATE TABLE plantconceptscope (
1488 1488
    plantconceptscope_id int(11) NOT NULL,
1489 1489
    locationevent_id int(11),
1490
    project_id int(11)
1490
    project_id int(11),
1491
    namedplace_id int(11)
1491 1492
);
1492 1493

  
1493 1494

  
......
4852 4853

  
4853 4854

  
4854 4855
--
4856
-- Name: fki_plantconceptscope_namedplace_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4857
--
4858

  
4859
CREATE INDEX fki_plantconceptscope_namedplace_id ON plantconceptscope  (namedplace_id);
4860

  
4861

  
4862
--
4855 4863
-- Name: fki_plantconceptscope_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4856 4864
--
4857 4865

  
......
6247 6255

  
6248 6256

  
6249 6257
--
6258
-- Name: plantconceptscope_namedplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6259
--
6260

  
6261
ALTER TABLE plantconceptscope
6262
    ADD CONSTRAINT plantconceptscope_namedplace_id FOREIGN KEY (namedplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
6263

  
6264

  
6265
--
6250 6266
-- Name: plantconceptscope_project_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6251 6267
--
6252 6268

  
schemas/vegbien.sql
1718 1718
CREATE TABLE plantconceptscope (
1719 1719
    plantconceptscope_id integer NOT NULL,
1720 1720
    locationevent_id integer,
1721
    project_id integer
1721
    project_id integer,
1722
    namedplace_id integer
1722 1723
);
1723 1724

  
1724 1725

  
......
5308 5309

  
5309 5310

  
5310 5311
--
5312
-- Name: fki_plantconceptscope_namedplace_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5313
--
5314

  
5315
CREATE INDEX fki_plantconceptscope_namedplace_id ON plantconceptscope USING btree (namedplace_id);
5316

  
5317

  
5318
--
5311 5319
-- Name: fki_plantconceptscope_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5312 5320
--
5313 5321

  
......
5675 5683
-- Name: plantconceptscope_keys; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5676 5684
--
5677 5685

  
5678
CREATE UNIQUE INDEX plantconceptscope_keys ON plantconceptscope USING btree ((COALESCE(locationevent_id, 0)), (COALESCE(project_id, 0)));
5686
CREATE UNIQUE INDEX plantconceptscope_keys ON plantconceptscope USING btree ((COALESCE(locationevent_id, 0)), (COALESCE(project_id, 0)), (COALESCE(namedplace_id, 0)));
5679 5687

  
5680 5688

  
5681 5689
--
......
6720 6728

  
6721 6729

  
6722 6730
--
6731
-- Name: plantconceptscope_namedplace_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6732
--
6733

  
6734
ALTER TABLE ONLY plantconceptscope
6735
    ADD CONSTRAINT plantconceptscope_namedplace_id FOREIGN KEY (namedplace_id) REFERENCES namedplace(namedplace_id) ON UPDATE CASCADE ON DELETE CASCADE;
6736

  
6737

  
6738
--
6723 6739
-- Name: plantconceptscope_project_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6724 6740
--
6725 6741

  

Also available in: Unified diff