-- Final long-tail sections: secmarks (SELinux security marking, global-compiled)
-- and vars (global key-value substitution variables).

CREATE TABLE secmarks (
    id      BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    secmark TEXT NOT NULL,
    chain   TEXT NOT NULL,
    source  TEXT NOT NULL DEFAULT '',
    dest    TEXT NOT NULL DEFAULT '',
    proto   TEXT NOT NULL DEFAULT '',
    dport   JSONB NOT NULL DEFAULT '[]'::jsonb,
    sport   JSONB NOT NULL DEFAULT '[]'::jsonb,
    comment TEXT NOT NULL DEFAULT ''
);

CREATE TABLE vars (
    key   TEXT PRIMARY KEY,
    value TEXT NOT NULL DEFAULT ''
);
