Skip to content

Add additional validity states to the dictionary.nomenclatural_statuses table #49

Description

@aazaff
-- Sources taxa.nomenclatural_status_id. These are the legacy `opinions.status` values
-- that are neither an assignment nor a name change (12,806 legacy rows). The composite
-- UNIQUE (id, targeted) lets validity_opinions FK-pin (status_id, targeted) and enforce
-- "target_permid required iff targeted" as a plain CHECK (Way 2 / A1 / §10.6 D9).
CREATE TABLE dictionaries.nomenclatural_statuses (
    id integer GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
    status text NOT NULL,
    targeted boolean NOT NULL,  -- whether target_permid is required
    CONSTRAINT nomenclatural_statuses_id_targeted_key UNIQUE (id, targeted)
);
INSERT INTO dictionaries.nomenclatural_statuses (status, targeted) VALUES
    ('nomen dubium',        false),   -- legacy: 8,208
    ('nomen nudum',         false),   -- legacy: 2,533
    ('nomen vanum',         false),   -- legacy:   569
    ('nomen oblitum',       false),   -- legacy:    76
    ('informal',             false),   -- legacy: 18
    ('operational',          false),   -- legacy:  0
    ('invalid subgroup of', true);    -- legacy: 1,420

This is related to #46 and #26

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions