Project

General

Profile

« Previous | Next » 

Revision 909

vegbien.sql: Added plantconceptscope.namedplace_id

View differences:

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