Project

General

Profile

« Previous | Next » 

Revision 1072

vegbien.sql: Renamed project.reference_id to datasource_id and pointed it to party, to match locationevent, etc.

View differences:

vegbien.sql
1842 1842
    d_obscount integer,
1843 1843
    d_lastlocationaddeddate timestamp with time zone,
1844 1844
    accessioncode text,
1845
    reference_id integer
1845
    datasource_id integer
1846 1846
);
1847 1847

  
1848 1848

  
......
3538 3538
--
3539 3539

  
3540 3540
ALTER TABLE ONLY project
3541
    ADD CONSTRAINT project_keys UNIQUE (reference_id, projectname);
3541
    ADD CONSTRAINT project_keys UNIQUE (datasource_id, projectname);
3542 3542

  
3543 3543

  
3544 3544
--
......
4253 4253

  
4254 4254

  
4255 4255
--
4256
-- Name: fki_project_datasource_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4257
--
4258

  
4259
CREATE INDEX fki_project_datasource_id ON project USING btree (datasource_id);
4260

  
4261

  
4262
--
4256 4263
-- Name: fki_specimenreplicate_datasource_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4257 4264
--
4258 4265

  
......
5684 5691

  
5685 5692

  
5686 5693
--
5687
-- Name: project_reference_id; Type: FK CONSTRAINT; Schema: public; Owner: -
5694
-- Name: project_datasource_id; Type: FK CONSTRAINT; Schema: public; Owner: -
5688 5695
--
5689 5696

  
5690 5697
ALTER TABLE ONLY project
5691
    ADD CONSTRAINT project_reference_id FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
5698
    ADD CONSTRAINT project_datasource_id FOREIGN KEY (datasource_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5692 5699

  
5693 5700

  
5694 5701
--

Also available in: Unified diff