-- Single source of truth for E2E Postgres DDL (non-partitioned mirror of production sientia_data.laborious_data).

DROP TABLE IF EXISTS sientia_data.laborious_data;
DROP SCHEMA IF EXISTS sientia_data CASCADE;

CREATE SCHEMA sientia_data;

CREATE TABLE sientia_data.laborious_data (
    id SERIAL NOT NULL,
    model_id int4 NOT NULL,
    variable text NOT NULL,
    value numeric NULL,
    "timestamp" timestamptz NOT NULL,
    created_at timestamptz DEFAULT CURRENT_TIMESTAMP NOT NULL,
    PRIMARY KEY (id, created_at)
);
