| 12345678910111213141516171819202122232425262728 |
- CREATE TABLE IF NOT EXISTS "LegacyDirectRun" (
- company text NOT NULL, "businessDate" text NOT NULL, "runId" text NOT NULL UNIQUE,
- owner text NOT NULL, "leaseUntil" timestamptz NOT NULL, status text NOT NULL DEFAULT 'running',
- "startedAt" timestamptz NOT NULL DEFAULT now(), "finishedAt" timestamptz, summary jsonb,
- PRIMARY KEY(company,"businessDate")
- );
- CREATE TABLE IF NOT EXISTS "LegacyDirectBaseline" (
- company text NOT NULL, model numeric NOT NULL, gid numeric NOT NULL, fingerprint text NOT NULL,
- "updatedAt" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY(company,model,gid)
- );
- CREATE TABLE IF NOT EXISTS "LegacyDirectBatch" (
- company text NOT NULL, "runId" text NOT NULL, key text NOT NULL, fingerprint text NOT NULL,
- result jsonb NOT NULL, "createdAt" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY(company,"runId",key)
- );
- CREATE TABLE IF NOT EXISTS "LegacyDirectEvidence" (
- company text NOT NULL, "runId" text NOT NULL, model numeric NOT NULL,
- ids jsonb NOT NULL, "sourceCount" numeric NOT NULL, "sourceChecksum" text NOT NULL,
- "targetChecksum" text NOT NULL, conflicts numeric NOT NULL, "contentChecksum" text NOT NULL,
- PRIMARY KEY(company,"runId",model)
- );
- REVOKE ALL ON "LegacyDirectRun","LegacyDirectBaseline","LegacyDirectBatch","LegacyDirectEvidence" FROM PUBLIC;
- CREATE TABLE IF NOT EXISTS "LegacyDirectSourcePage" (
- company text NOT NULL, "runId" text NOT NULL, model numeric NOT NULL, page numeric NOT NULL,
- ids jsonb NOT NULL, total numeric NOT NULL, checksum text NOT NULL, "capturedAt" timestamptz NOT NULL DEFAULT now(),
- PRIMARY KEY(company,"runId",model,page)
- );
- REVOKE ALL ON "LegacyDirectSourcePage" FROM PUBLIC;
|