Project

General

Profile

« Previous | Next » 

Revision 7187

schemas/vegbien.sql: taxonlabel: Removed no longer used matched_label_fit_fraction. Use taxondetermination.taxonfit instead.

View differences:

vegbien.sql
1111 1111

  
1112 1112

  
1113 1113
--
1114
-- Name: taxonlabel_1_matched_label_min_fit(); Type: FUNCTION; Schema: public; Owner: -
1115
--
1116

  
1117
CREATE FUNCTION taxonlabel_1_matched_label_min_fit() RETURNS trigger
1118
    LANGUAGE plpgsql
1119
    AS $$
1120
BEGIN
1121
    IF new.matched_label_id IS NOT NULL
1122
        AND new.matched_label_fit_fraction < 0.8 THEN -- insufficient match
1123
        new.matched_label_id = NULL;
1124
        new.matched_label_fit_fraction = NULL;
1125
    END IF;
1126
    RETURN new;
1127
END;
1128
$$;
1129

  
1130

  
1131
--
1132 1114
-- Name: taxonlabel_2_set_canon_label_id_on_insert(); Type: FUNCTION; Schema: public; Owner: -
1133 1115
--
1134 1116

  
......
1184 1166
    taxonstatus taxonomic_status,
1185 1167
    canon_label_id integer,
1186 1168
    matched_label_id integer,
1187
    matched_label_fit_fraction double precision,
1188 1169
    parent_id integer,
1189 1170
    taxonepithet text,
1190 1171
    rank taxonrank,
1191 1172
    taxonomicname text,
1192 1173
    accessioncode text,
1193
    CONSTRAINT taxonlabel_matched_label_fit_fraction_range CHECK (((matched_label_fit_fraction >= (0)::double precision) AND (matched_label_fit_fraction <= (1)::double precision))),
1194 1174
    CONSTRAINT taxonlabel_required_key CHECK ((((sourceaccessioncode IS NOT NULL) OR (taxonepithet IS NOT NULL)) OR (taxonomicname IS NOT NULL)))
1195 1175
);
1196 1176

  
......
1248 1228

  
1249 1229

  
1250 1230
--
1251
-- Name: COLUMN taxonlabel.matched_label_fit_fraction; Type: COMMENT; Schema: public; Owner: -
1252
--
1253

  
1254
COMMENT ON COLUMN taxonlabel.matched_label_fit_fraction IS 'The closeness of fit of the matched label.';
1255

  
1256

  
1257
--
1258 1231
-- Name: COLUMN taxonlabel.parent_id; Type: COMMENT; Schema: public; Owner: -
1259 1232
--
1260 1233

  
......
7421 7394

  
7422 7395

  
7423 7396
--
7424
-- Name: taxonlabel_1_matched_label_min_fit; Type: TRIGGER; Schema: public; Owner: -
7425
--
7426

  
7427
CREATE TRIGGER taxonlabel_1_matched_label_min_fit BEFORE INSERT OR UPDATE ON taxonlabel FOR EACH ROW EXECUTE PROCEDURE taxonlabel_1_matched_label_min_fit();
7428

  
7429

  
7430
--
7431 7397
-- Name: taxonlabel_2_set_canon_label_id_on_insert; Type: TRIGGER; Schema: public; Owner: -
7432 7398
--
7433 7399

  

Also available in: Unified diff