Project

General

Profile

« Previous | Next » 

Revision 6139

schemas/vegbien.sql: method: Made name optional when description or observationmeasure is specified

View differences:

vegbien.sql
1574 1574
CREATE TABLE method (
1575 1575
    method_id integer NOT NULL,
1576 1576
    reference_id integer NOT NULL,
1577
    name text NOT NULL,
1577
    name text,
1578 1578
    description text,
1579 1579
    diameterheight_m double precision,
1580 1580
    mindiameter_m double precision,
......
1596 1596
    subplotspacing_m double precision,
1597 1597
    subplotmethod_id integer,
1598 1598
    pointsperline integer,
1599
    accessioncode text
1599
    accessioncode text,
1600
    CONSTRAINT method_required_key CHECK ((((name IS NOT NULL) OR (description IS NOT NULL)) OR (observationmeasure IS NOT NULL)))
1600 1601
);
1601 1602

  
1602 1603

  
......
5919 5920
-- Name: method_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5920 5921
--
5921 5922

  
5922
CREATE UNIQUE INDEX method_unique ON method USING btree (reference_id, name, (COALESCE(description, '\\N'::text)), (COALESCE(observationmeasure, '\\N'::text)));
5923
CREATE UNIQUE INDEX method_unique ON method USING btree (reference_id, (COALESCE(name, '\\N'::text)), (COALESCE(description, '\\N'::text)), (COALESCE(observationmeasure, '\\N'::text)));
5923 5924

  
5924 5925

  
5925 5926
--

Also available in: Unified diff