Project

General

Profile

« Previous | Next » 

Revision 7044

schemas/vegbien.sql: taxondetermination: Added scoping source_id field to allow other datasources (e.g. TNRS) to make taxondeterminations. (Repurposed existing non-scoping source_id.)

View differences:

schemas/vegbien.my.sql
1412 1412
CREATE TABLE taxondetermination (
1413 1413
    taxondetermination_id int(11) NOT NULL,
1414 1414
    taxonoccurrence_id int(11) NOT NULL,
1415
    source_id int(11) NOT NULL,
1415 1416
    taxonverbatim_id int(11) NOT NULL,
1416 1417
    party_id int(11),
1417 1418
    role varchar(255) DEFAULT 'unknown' NOT NULL,
1418 1419
    determinationtype varchar(255),
1419
    source_id int(11),
1420 1420
    isoriginal int(1) DEFAULT false NOT NULL,
1421 1421
    iscurrent int(1) DEFAULT false NOT NULL,
1422 1422
    taxonfit varchar(255),
schemas/vegbien.sql
2224 2224
CREATE TABLE taxondetermination (
2225 2225
    taxondetermination_id integer NOT NULL,
2226 2226
    taxonoccurrence_id integer NOT NULL,
2227
    source_id integer NOT NULL,
2227 2228
    taxonverbatim_id integer NOT NULL,
2228 2229
    party_id integer,
2229 2230
    role role DEFAULT 'unknown'::role NOT NULL,
2230 2231
    determinationtype text,
2231
    source_id integer,
2232 2232
    isoriginal boolean DEFAULT false NOT NULL,
2233 2233
    iscurrent boolean DEFAULT false NOT NULL,
2234 2234
    taxonfit text,
......
6503 6503
-- Name: taxondetermination_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6504 6504
--
6505 6505

  
6506
CREATE UNIQUE INDEX taxondetermination_unique ON taxondetermination USING btree (taxonoccurrence_id, isoriginal, role, (COALESCE(party_id, 2147483647)), taxonverbatim_id);
6506
CREATE UNIQUE INDEX taxondetermination_unique ON taxondetermination USING btree (taxonoccurrence_id, source_id, isoriginal, role, (COALESCE(party_id, 2147483647)), taxonverbatim_id);
6507 6507

  
6508 6508

  
6509 6509
--

Also available in: Unified diff