Project

General

Profile

« Previous | Next » 

Revision 482

vegbien.sql: Added UNIQUE constraint for specimen table. Made catalognumber required so that all specimens can be uniquely identified.

View differences:

schemas/vegbien.sql
2225 2225
    individualplant_id integer,
2226 2226
    reference_id integer NOT NULL,
2227 2227
    collectioncode character varying(255) NOT NULL,
2228
    catalognumber character varying(255)
2228
    catalognumber character varying(255) NOT NULL
2229 2229
);
2230 2230

  
2231 2231

  
......
4214 4214

  
4215 4215

  
4216 4216
--
4217
-- Name: specimen_keys; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4218
--
4219

  
4220
ALTER TABLE ONLY specimen
4221
    ADD CONSTRAINT specimen_keys UNIQUE (reference_id, collectioncode, catalognumber);
4222

  
4223

  
4224
--
4217 4225
-- Name: specimen_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4218 4226
--
4219 4227

  

Also available in: Unified diff