Project

General

Profile

« Previous | Next » 

Revision 3177

schemas/vegbien.sql: specimenreplicate: Renamed museum_id to institution_id to correspond with DwC's institutionCode, so that it would be more obvious where to map institutionCode fields to

View differences:

vegbien.sql
2582 2582
    collectioncode_dwc text,
2583 2583
    catalognumber_dwc text,
2584 2584
    collectiondate timestamp with time zone,
2585
    museum_id integer,
2585
    institution_id integer,
2586 2586
    sourceaccessioncode text,
2587 2587
    taxonoccurrence_id integer NOT NULL,
2588 2588
    collectionnumber text,
......
2607 2607

  
2608 2608

  
2609 2609
--
2610
-- Name: COLUMN specimenreplicate.institution_id; Type: COMMENT; Schema: public; Owner: -
2611
--
2612

  
2613
COMMENT ON COLUMN specimenreplicate.institution_id IS 'The the institution (such as a museum) that the specimenreplicate is from.';
2614

  
2615

  
2616
--
2610 2617
-- Name: COLUMN specimenreplicate.collectionnumber; Type: COMMENT; Schema: public; Owner: -
2611 2618
--
2612 2619

  
......
4584 4591

  
4585 4592

  
4586 4593
--
4587
-- Name: fki_specimenreplicate_museum_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4594
-- Name: fki_specimenreplicate_institution_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4588 4595
--
4589 4596

  
4590
CREATE INDEX fki_specimenreplicate_museum_id ON specimenreplicate USING btree (museum_id);
4597
CREATE INDEX fki_specimenreplicate_institution_id ON specimenreplicate USING btree (institution_id);
4591 4598

  
4592 4599

  
4593 4600
--
......
6138 6145

  
6139 6146

  
6140 6147
--
6141
-- Name: specimenreplicate_museum_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6148
-- Name: specimenreplicate_institution_id; Type: FK CONSTRAINT; Schema: public; Owner: -
6142 6149
--
6143 6150

  
6144 6151
ALTER TABLE ONLY specimenreplicate
6145
    ADD CONSTRAINT specimenreplicate_museum_id FOREIGN KEY (museum_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
6152
    ADD CONSTRAINT specimenreplicate_institution_id FOREIGN KEY (institution_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
6146 6153

  
6147 6154

  
6148 6155
--

Also available in: Unified diff