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:

schemas/vegbien.my.sql
2110 2110
    collectioncode_dwc text,
2111 2111
    catalognumber_dwc text,
2112 2112
    collectiondate timestamp NULL,
2113
    museum_id int(11),
2113
    institution_id int(11),
2114 2114
    sourceaccessioncode text,
2115 2115
    taxonoccurrence_id int(11) NOT NULL,
2116 2116
    collectionnumber text,
......
2135 2135

  
2136 2136

  
2137 2137
--
2138
-- Name: COLUMN specimenreplicate.institution_id; Type: COMMENT; Schema: public; Owner: -
2139
--
2140

  
2141

  
2142

  
2143

  
2144
--
2138 2145
-- Name: COLUMN specimenreplicate.collectionnumber; Type: COMMENT; Schema: public; Owner: -
2139 2146
--
2140 2147

  
......
4057 4064

  
4058 4065

  
4059 4066
--
4060
-- Name: fki_specimenreplicate_museum_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4067
-- Name: fki_specimenreplicate_institution_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4061 4068
--
4062 4069

  
4063
CREATE INDEX fki_specimenreplicate_museum_id ON specimenreplicate  (museum_id);
4070
CREATE INDEX fki_specimenreplicate_institution_id ON specimenreplicate  (institution_id);
4064 4071

  
4065 4072

  
4066 4073
--
......
5590 5597

  
5591 5598

  
5592 5599
--
5593
-- Name: specimenreplicate_museum_id; Type: FK CONSTRAINT; Schema: public; Owner: -
5600
-- Name: specimenreplicate_institution_id; Type: FK CONSTRAINT; Schema: public; Owner: -
5594 5601
--
5595 5602

  
5596 5603

  
schemas/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