Project

General

Profile

« Previous | Next » 

Revision 11079

schemas/vegbien.sql: stratum: added unique constraint on source_id/stratumname, and require stratumname, so that strata are identified by name within their datasource

View differences:

schemas/vegbien.my.sql
3050 3050
CREATE TABLE stratum (
3051 3051
    stratum_id int(11) NOT NULL,
3052 3052
    source_id int(11) NOT NULL,
3053
    stratumname varchar(255),
3053
    stratumname varchar(255) NOT NULL,
3054 3054
    stratumheight double precision,
3055 3055
    stratumbase double precision,
3056 3056
    stratumcover double precision,
......
4882 4882

  
4883 4883

  
4884 4884
--
4885
-- Name: stratum_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4886
--
4887

  
4888
ALTER TABLE stratum
4889
    ADD CONSTRAINT stratum_unique UNIQUE (source_id, stratumname);
4890

  
4891

  
4892
--
4885 4893
-- Name: taxonalt_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4886 4894
--
4887 4895

  
schemas/vegbien.sql
4249 4249
CREATE TABLE stratum (
4250 4250
    stratum_id integer NOT NULL,
4251 4251
    source_id integer NOT NULL,
4252
    stratumname text,
4252
    stratumname text NOT NULL,
4253 4253
    stratumheight double precision,
4254 4254
    stratumbase double precision,
4255 4255
    stratumcover double precision,
......
6157 6157

  
6158 6158

  
6159 6159
--
6160
-- Name: stratum_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
6161
--
6162

  
6163
ALTER TABLE ONLY stratum
6164
    ADD CONSTRAINT stratum_unique UNIQUE (source_id, stratumname);
6165

  
6166

  
6167
--
6160 6168
-- Name: taxonalt_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
6161 6169
--
6162 6170

  

Also available in: Unified diff