-- Create "migrations" table
CREATE TABLE "migrations"
(
    "id"               bigint            NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "create_time"      timestamptz       NOT NULL,
    "update_time"      timestamptz       NOT NULL,
    "version"          character varying NOT NULL UNIQUE,
    "description"      character varying NULL,
    "type"             bigint            NOT NULL DEFAULT 0,
    "applied"          bigint            NULL,
    "total"            bigint            NULL,
    "executed_at"      timestamptz       NOT NULL,
    "execution_time"   bigint            NOT NULL,
    "error"            character varying NULL,
    "error_stmt"       character varying NULL,
    "hash"             character varying NOT NULL,
    "partial_hashes"   jsonb             NOT NULL,
    "operator_version" character varying NOT NULL,
    PRIMARY KEY ("id")
);