DROP SCHEMA IF EXISTS truth CASCADE;

CREATE SCHEMA truth;

CREATE TABLE truth.statement (
    sid text PRIMARY KEY,
    stmt_text text NOT NULL
);

CREATE TABLE truth.true_at (
    sid text REFERENCES truth.statement(sid) NOT NULL,
    true_from timestamp NOT NULL,
    true_until timestamp 
);

CREATE TABLE truth.contradiction (
    sid1 text REFERENCES truth.statement(sid),
    sid2 text REFERENCES truth.statement(sid),
    PRIMARY KEY (sid1, sid2)
);
