From 4175f0997ab7226a13bfbc7701d1fd527c472b19 Mon Sep 17 00:00:00 2001 From: snowopsdev Date: Tue, 10 Nov 2026 00:21:25 -0500 Subject: [PATCH] fix: project audit fixes for crawling, review gates, workers and scoring A whole-project audit, reviewed by a three-model council over seven rounds. - Crawl with undici's own fetch: the built-in fetch rejects an undici 8 dispatcher on Node 22 and 24. - Gate `approved` and `published` to reviewed predecessors; close the `informationGain` create hole; refuse article and evidence-source deletes. - Stamp `publishedAt` and clear the used `publishAt` on every publish. - Turn off the dev schema push for all three queue workers. - Keep mock runs mock (crawler and fallback LLM client follow the run's mode); fail live research without an Ahrefs key instead of crawling demo hosts. - Fix the 015044 migration's down, the override/send-back/reset QA and audit writes, topic removal during a run, webhook error redaction, seed password resets, obsolete suggestions, and expiring demo evidence dates. - Matcher: whole-word number words, decades, and `2000` vs `2,000`. - Docs, env examples, test config (jsdom only where needed, mock pinned), and lint config corrected; superseded migration snapshots pruned. Co-Authored-By: Claude Opus 5.5 --- .env.example | 21 +- .graphifyignore | 3 + AGENTS.md | 2 +- CONTRIBUTING.md | 10 +- README.md | 18 +- cms/.env.example | 26 +- cms/README.md | 6 +- cms/eslint.config.mjs | 26 +- cms/package.json | 6 +- cms/src/app/(frontend)/page.tsx | 20 +- cms/src/collections/Articles.ts | 24 +- cms/src/collections/EvidenceSources.ts | 5 +- cms/src/collections/PipelineRuns.ts | 8 +- cms/src/components/ops/AuditTimeline.tsx | 4 +- cms/src/components/ops/BrandVoiceEditor.tsx | 22 +- cms/src/components/ops/ContentList.tsx | 2 + cms/src/components/ops/DirtyGuardUi.tsx | 20 - cms/src/components/ops/IcpEditor.tsx | 4 +- cms/src/components/ops/PositioningEditor.tsx | 4 +- .../components/ops/TemplateConfigEditor.tsx | 3 + cms/src/components/ops/TopicDiscovery.tsx | 16 +- cms/src/components/ops/actions.ts | 47 +- cms/src/components/ops/boardActions.ts | 23 +- cms/src/components/ops/boardTypes.ts | 2 + .../components/ops/positioningSections.tsx | 2 +- .../ops/review/panels/PublishedPanel.tsx | 21 +- .../ops/review/panels/RunNextStagePanel.tsx | 4 +- .../ops/review/panels/VerifiedPanel.tsx | 9 +- cms/src/components/ops/tenantActions.ts | 2 - cms/src/globals/InformationGainPolicy.ts | 19 +- cms/src/globals/LlmSettings.ts | 1 + cms/src/jobs/publishDue.ts | 6 +- cms/src/jobs/webhookDeliver.ts | 35 +- cms/src/lib/articlePublication.ts | 29 + cms/src/lib/articleReviewGate.ts | 45 + cms/src/lib/articleStatusMeta.ts | 4 +- cms/src/lib/brandVoice.ts | 4 +- cms/src/lib/cmsLlm.ts | 4 +- cms/src/lib/informationGain/exactness.ts | 46 +- cms/src/lib/informationGain/parsers.ts | 9 + cms/src/lib/informationGain/text.ts | 12 +- cms/src/lib/opsKpis.ts | 2 +- cms/src/lib/requireUser.ts | 10 +- cms/src/lib/setupSuggestions/collect.ts | 10 +- cms/src/lib/setupSuggestions/signals.ts | 2 +- cms/src/lib/tenant/fixtures.ts | 27 +- ...0260826_015044_onboarding_pipeline_runs.ts | 4 +- ..._pipeline_runs_drop_onboarding_source.json | 9343 ---------------- ...261006_205858_articles_lookup_indexes.json | 9388 ---------------- ...1007_121854_template_company_mentions.json | 9405 ---------------- .../20261007_133223_brief_angles.json | 9439 ---------------- .../20261007_133736_topic_relevance.json | 9485 ---------------- .../20261007_134746_setup_suggestions.json | 9765 ---------------- ...021_145609_article_content_updated_at.json | 9771 ----------------- cms/src/payload-types.ts | 2 +- cms/src/payload.config.ts | 8 +- cms/src/seed.ts | 32 +- cms/tests/e2e/dirtyGuard.e2e.spec.ts | 13 +- cms/tests/e2e/keyboard.e2e.spec.ts | 15 +- cms/tests/helpers/login.ts | 15 +- cms/tests/int/accessBoundaries.int.spec.ts | 66 + cms/tests/int/api.int.spec.ts | 20 - cms/tests/int/articleActions.int.spec.ts | 130 + cms/tests/int/articleReviewGate.int.spec.ts | 79 + cms/tests/int/assetStepper.int.spec.ts | 1 + cms/tests/int/boardActions.int.spec.ts | 50 +- cms/tests/int/brandVoice.int.spec.ts | 7 +- cms/tests/int/brandVoiceEditor.int.spec.ts | 1 + cms/tests/int/briefAngles.int.spec.ts | 1 + cms/tests/int/contentRunForm.int.spec.ts | 1 + cms/tests/int/dirtyGuard.int.spec.ts | 1 + cms/tests/int/evidenceBank.int.spec.ts | 23 +- cms/tests/int/evidenceSources.int.spec.ts | 10 +- cms/tests/int/graphqlSchema.int.spec.ts | 16 + cms/tests/int/icpEditor.int.spec.ts | 1 + cms/tests/int/newContentCreate.int.spec.ts | 1 + cms/tests/int/newContentGates.int.spec.ts | 1 + cms/tests/int/newContentKeyboard.int.spec.ts | 1 + cms/tests/int/opsNav.int.spec.ts | 1 + cms/tests/int/pipelineReportCli.int.spec.ts | 13 +- cms/tests/int/publishDue.int.spec.ts | 46 + cms/tests/int/qaTriage.int.spec.ts | 1 + cms/tests/int/reviewFeedback.int.spec.ts | 1 + cms/tests/int/reviewPanels.int.spec.ts | 1 + cms/tests/int/runBar.int.spec.ts | 1 + cms/tests/int/runtimeBanner.int.spec.ts | 1 + cms/tests/int/setupSuggestions.int.spec.ts | 12 + .../int/templateConfigEditor.int.spec.ts | 1 + cms/tests/int/webhookDeliver.int.spec.ts | 27 + cms/vitest.config.mts | 11 +- cms/vitest.setup.ts | 6 + docker-compose.yml | 4 +- docs/information-gain.md | 8 +- docs/operations.md | 18 +- docs/tenant-context.md | 8 +- package-lock.json | 1 + pipeline/scripts/ig-e2e.sh | 22 +- pipeline/src/ahrefs.ts | 30 +- pipeline/src/corpus/addressGuard.ts | 8 + pipeline/src/corpus/fetchPage.ts | 45 +- pipeline/src/corpus/snapshot.ts | 3 +- pipeline/src/generate.ts | 3 +- pipeline/src/index.ts | 5 +- pipeline/src/llm.ts | 15 +- pipeline/test/addressGuard.test.ts | 9 + pipeline/test/ahrefsFactory.test.ts | 10 +- pipeline/test/fetchPage.test.ts | 36 + pipeline/test/igExactness.test.ts | 86 + pipeline/test/igParsers.test.ts | 22 +- pipeline/test/igText.test.ts | 10 +- 110 files changed, 1309 insertions(+), 66876 deletions(-) create mode 100644 cms/src/lib/articlePublication.ts delete mode 100644 cms/src/migrations/20260911_152559_pipeline_runs_drop_onboarding_source.json delete mode 100644 cms/src/migrations/20261006_205858_articles_lookup_indexes.json delete mode 100644 cms/src/migrations/20261007_121854_template_company_mentions.json delete mode 100644 cms/src/migrations/20261007_133223_brief_angles.json delete mode 100644 cms/src/migrations/20261007_133736_topic_relevance.json delete mode 100644 cms/src/migrations/20261007_134746_setup_suggestions.json delete mode 100644 cms/src/migrations/20261021_145609_article_content_updated_at.json delete mode 100644 cms/tests/int/api.int.spec.ts diff --git a/.env.example b/.env.example index 8c2484a9..be7efe7c 100644 --- a/.env.example +++ b/.env.example @@ -31,6 +31,12 @@ PIPELINE_MODEL_INFORMATION_GAIN_JUDGE= PIPELINE_MODEL_EVIDENCE_VERIFICATION= # Checks first-party claims against the evidence bank during QA PIPELINE_MODEL_EVIDENCE_CHECK= +# Audience-grounded brief angles. Blank: the small model of the generate +# model's provider (claude-haiku-4-5, or gpt-5.4-mini for a gpt-* writer) +PIPELINE_MODEL_BRIEF_ANGLE= +# Admin topic-discovery fit labels only; not a content-run blocker. Same +# small-model default as the brief angles +TOPIC_RELEVANCE_MODEL= BRAND_VOICE_EXTRACT_MODEL= # Drafts onboarding steps (audiences, positioning, evidence bank); falls back to # BRAND_VOICE_EXTRACT_MODEL before the platform default @@ -55,8 +61,8 @@ COMPETITOR_DOMAINS=competitor-a.com,competitor-b.com MOCK_MODE=true # --- Information-gain policy ------------------------------------------------- -# The intended surface for these is the admin: Governance -> Information-gain -# policy (/admin/globals/information-gain-policy). Resolution is admin field -> +# The intended surface for these is the admin: Governance -> Scoring policy +# (/admin/globals/information-gain-policy). Resolution is admin field -> # env var -> platform default, so anything set here is a fallback used only # while the matching admin field is blank; it is for CI and for pinning a value # where there is no admin to click. A value that is missing, unparseable, or out @@ -88,8 +94,8 @@ MOCK_MODE=true # claim cited only to unclassified domains is blocked no matter what these say. # --- Test-only ---------------------------------------------------------------- -# Read only by the test suites, never by the running app. Set these in your -# shell, not in a committed .env file. +# For running the test suites. Set these in your shell, not in a committed +# .env file. # # Turns off Payload's dev schema push. Playwright's test:e2e script sets this # itself; set it yourself in the shell running `npm run dev` when you point @@ -99,10 +105,3 @@ MOCK_MODE=true #TEST_BASE_URL=http://127.0.0.1:3000 # Port for the dev server Playwright starts when TEST_BASE_URL is unset. #TEST_PORT=3101 - -# Audience-grounded brief angles. Unset: the small model of the generate -# model's provider (claude-haiku-4-5, or gpt-5.4-mini for a gpt-* writer) -# PIPELINE_MODEL_BRIEF_ANGLE= - -# Admin topic-discovery fit labels only; not a content-run blocker -# TOPIC_RELEVANCE_MODEL= diff --git a/.graphifyignore b/.graphifyignore index d4b76b08..b5fa96af 100644 --- a/.graphifyignore +++ b/.graphifyignore @@ -7,6 +7,9 @@ graphify-out/ .impeccable/ .omc/ +# One-off audit artefacts (96 screenshots and a capture log). +docs/audits/ + # Dependency lockfiles and generated database snapshots duplicate source data. package-lock.json cms/src/migrations/*.json diff --git a/AGENTS.md b/AGENTS.md index bf29d58d..603fc9ca 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ ## Package manager -- Use npm workspaces with Node 22+: `npm install`, `npm run dev`, `npm test`. +- Use npm workspaces with Node 22.22.2+: `npm install`, `npm run dev`, `npm test`. - `npm test --workspace cms` runs CMS integration and E2E tests; use `npm run test:int --workspace cms` for integration only. - CMS E2E starts an npm dev server by default. For an existing server, use `TEST_BASE_URL=http://127.0.0.1:3000 npm run test:e2e --workspace cms`. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 63d229c4..49a928a4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ Thanks for contributing. This guide covers local setup, checks, and how we revie ## Development setup -1. Prerequisites: Node.js 22+, Docker, npm. +1. Prerequisites: Node.js 22.22.2 or newer, Docker, npm. 2. Follow the [Quick start](README.md#quick-start) in the root README (`cp` env files, `docker compose up -d`, `npm install`, `npm run seed`). 3. Use `MOCK_MODE=true` unless you intentionally need live Anthropic/Ahrefs calls. @@ -80,7 +80,7 @@ Workspace-specific: ```bash # CMS npm run test:int --workspace cms -npm run test:e2e --workspace cms # prefer starting `npm run dev` first +npm run test:e2e --workspace cms # starts its own dev server; see below for an existing one npm run generate:types --workspace cms # Pipeline @@ -90,7 +90,7 @@ npm test --workspace pipeline npx tsx --test pipeline/test/structuralChecks.test.ts ``` -Use **npm** for scripts and CI. `npm test --workspace cms` runs both CMS suites; Playwright starts an npm dev server unless `TEST_BASE_URL` points to an existing one. +Use **npm** for scripts and CI. `npm test --workspace cms` runs both CMS suites. Playwright starts its own dev server on `TEST_PORT` (default 3101), so do not start `npm run dev` in `cms/` first: Next refuses a second dev server in the same directory. To drive a server you already have running, pass its address: `TEST_BASE_URL=http://127.0.0.1:3000 npm run test:e2e --workspace cms`. ## Schema / types @@ -104,7 +104,7 @@ Commit the updated `cms/src/payload-types.ts`. Both `cms` and `pipeline` import ## Style guide data -Banned phrases live under `## Banned phrases` in [`docs/style-guide.md`](docs/style-guide.md). The pipeline parses that section at runtime for generate prompts and structural QA — keep the heading and bullet format documented in [CLAUDE.md](CLAUDE.md). +Banned phrases live under `## Banned phrases` in [`docs/style-guide.md`](docs/style-guide.md). The pipeline parses that section at runtime for generate prompts and structural QA — keep that heading and the one-phrase-per-bullet format (see "Key conventions" in [AGENTS.md](AGENTS.md)). ## Commit messages and PR titles @@ -125,7 +125,7 @@ Keep diffs focused. Do not commit `.env`, secrets, or local media uploads. ## Architecture notes -See [CLAUDE.md](CLAUDE.md) for pipeline stages, cost logging, and rich-text conversion details. +See [AGENTS.md](AGENTS.md) for the project map and conventions, the [README](README.md) for the pipeline stages, and [docs/operations.md](docs/operations.md) for queues, modes and cost logging. ## Code of conduct diff --git a/README.md b/README.md index 116760a0..46e620cd 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Delivery settings sit apart from all of that, because no run reads them: **Webho ## Prerequisites -- Node.js 22+ +- Node.js 22.22.2 or newer (the `engines` floor; older 22.x releases fail dependency checks) - npm with workspaces for all scripts and CI. - Docker for local Postgres through Docker Compose @@ -87,7 +87,7 @@ npm run dev ### Seeded local admin -The seed creates this account for local development. Change its password before using Datum in a shared or deployed environment. +The seed creates this account for local development. Change its password before using Datum in a shared or deployed environment. Re-running the seed (which is also how templates are updated) leaves an existing account's password alone unless `SEED_ADMIN_PASSWORD` is set, and refuses to create the account with the default password when `NODE_ENV=production`. - Email: `admin@datum.local` - Password: value of `SEED_ADMIN_PASSWORD`, or `datum-dev-password` if unset @@ -111,13 +111,12 @@ Then **New content** (`/admin/ops/new`) shows the same blockers as a notice if a Local development runs all three job queues in process: `content` and `webhooks` every two seconds, `scheduled` every ten. Production intentionally disables in-process autorun, so a durable worker or scheduler has to invoke each one: ```bash -npm run jobs:run --workspace cms # one content run -npm run payload --workspace cms -- jobs:run --queue webhooks # webhook deliveries -npm run payload --workspace cms -- jobs:run --queue scheduled \ - --handle-schedules --limit 1 # publishes due articles +npm run jobs:run --workspace cms # one content run +npm run jobs:webhooks --workspace cms # webhook deliveries +npm run jobs:scheduled --workspace cms # due publishes, daily suggestion scan ``` -Each invocation of the first command processes one queued content run; schedule it repeatedly for continuous processing. Run the other two every minute or faster. [`docs/operations.md`](docs/operations.md) has the cadence, the delivery contract and the fixed limits. +Each invocation of the first command processes one queued content run; schedule it repeatedly for continuous processing. Run the other two every minute or faster. Use these scripts, not a bare `payload jobs:run`: the Payload CLI does not set `NODE_ENV`, and without `NODE_ENV=production` it runs the development schema push against your database on every invocation. The scripts turn that push off. [`docs/operations.md`](docs/operations.md) has the cadence, the delivery contract and the fixed limits. For live API calls, set `MOCK_MODE=false` and provide the key for each chosen model's provider (`ANTHROPIC_API_KEY` or `OPENAI_API_KEY`). Ahrefs also needs `AHREFS_API_KEY` plus a target domain and competitors, which come from the **Workspace** setup page (`/admin/ops/setup/workspace`); `TARGET_DOMAIN` and `COMPETITOR_DOMAINS` are its fallback. See [`.env.example`](.env.example). @@ -149,13 +148,14 @@ Copy [`.env.example`](.env.example) and [`cms/.env.example`](cms/.env.example) ### Test-only variables -Read only by the test suites, never by the running app. Set these in your shell, not in a committed `.env`. +For running the test suites. Set these in your shell, not in a committed `.env`. | Variable | Purpose | | --- | --- | -| `DISABLE_DEV_PUSH` | `true` to turn off Payload's dev schema push, which `next dev` otherwise runs on boot. Playwright's `test:e2e` script sets it automatically so its parallel workers don't race each other pushing the same schema; set it yourself in the shell that runs `npm run dev` when you point Playwright at that server via `TEST_BASE_URL` instead. | +| `DISABLE_DEV_PUSH` | `true` to turn off Payload's dev schema push, which `next dev` otherwise runs on boot. Playwright's `test:e2e` script sets it automatically, because E2E runs on a migration-built database and the processes that boot Payload for seeding must not push over it; set it yourself in the shell that runs `npm run dev` when you point Playwright at that server via `TEST_BASE_URL` instead. | | `TEST_BASE_URL` | Base URL Playwright drives instead of starting its own dev server — e.g. `http://127.0.0.1:3000` to test against a server you already started with `npm run dev`. Unset, Playwright starts its own on `TEST_PORT`. | | `TEST_PORT` | Port for the dev server Playwright starts when `TEST_BASE_URL` is unset (default `3101`). | +| `DEV_ALLOWED_ORIGINS` (cms/.env only) | Comma-separated extra hosts allowed to load `next dev` resources, for reaching a dev server by a name other than `localhost` or `127.0.0.1` (a LAN or tailnet hostname). Development only. | ## Root scripts diff --git a/cms/.env.example b/cms/.env.example index b0bf43f4..5ca7a049 100644 --- a/cms/.env.example +++ b/cms/.env.example @@ -1,6 +1,6 @@ DATABASE_URL=postgresql://datum:datum@127.0.0.1:5432/datum -# Generate with: openssl rand -hex 32 -PAYLOAD_SECRET=YOUR_SECRET_HERE +# Required. Generate with: openssl rand -hex 32 +PAYLOAD_SECRET= # Public origin used to build absolute canonical article URLs. # Required in production; without it, canonical metadata is omitted (no localhost fallback). SITE_URL=http://localhost:3000 @@ -10,10 +10,12 @@ NODE_OPTIONS="--no-deprecation --no-experimental-strip-types" # Next.js only loads cms/.env (never the root .env), so anything the admin UI # calls at request time needs to be set here too, not just in the root .env -# used by the pipeline CLI. The admin reads exactly these at request time: +# used by the pipeline CLI. The admin reads these at request time: # MOCK_MODE, ANTHROPIC_API_KEY, OPENAI_API_KEY, AHREFS_API_KEY, AHREFS_COUNTRY, -# TARGET_DOMAIN, COMPETITOR_DOMAINS, PIPELINE_MODEL_*, BRAND_VOICE_EXTRACT_MODEL, -# SETUP_ASSIST_MODEL, WEBHOOK_URL, WEBHOOK_SECRET, and SITE_URL. +# TARGET_DOMAIN, COMPETITOR_DOMAINS, PIPELINE_MODEL_*, TOPIC_RELEVANCE_MODEL, +# BRAND_VOICE_EXTRACT_MODEL, SETUP_ASSIST_MODEL, WEBHOOK_URL, WEBHOOK_SECRET, +# SITE_URL, and the INFORMATION_GAIN_* fallbacks (admin-queued runs score in +# this process; they are listed in the root .env.example). # See the root .env.example for what each does. MOCK_MODE=true ANTHROPIC_API_KEY= @@ -33,6 +35,10 @@ PIPELINE_MODEL_CLAIM_EXTRACTION= PIPELINE_MODEL_INFORMATION_GAIN_JUDGE= PIPELINE_MODEL_EVIDENCE_VERIFICATION= PIPELINE_MODEL_EVIDENCE_CHECK= +# Blank: the small model of the generate model's provider +PIPELINE_MODEL_BRIEF_ANGLE= +# Admin topic-discovery fit labels only; same small-model default +TOPIC_RELEVANCE_MODEL= BRAND_VOICE_EXTRACT_MODEL= # Falls back to BRAND_VOICE_EXTRACT_MODEL when blank SETUP_ASSIST_MODEL= @@ -46,9 +52,7 @@ PAYLOAD_AUTO_LOGIN=false # Optional: which user to auto-login as (default admin@datum.local) PAYLOAD_AUTO_LOGIN_EMAIL= -# Audience-grounded brief angles. Unset: the small model of the generate -# model's provider (claude-haiku-4-5, or gpt-5.4-mini for a gpt-* writer) -# PIPELINE_MODEL_BRIEF_ANGLE= - -# Admin topic-discovery fit labels only; not a content-run blocker -# TOPIC_RELEVANCE_MODEL= +# Dev only: extra hosts allowed to load `next dev` resources, comma-separated. +# Needed to reach the dev server by a LAN or tailnet name; localhost and +# 127.0.0.1 always work. +#DEV_ALLOWED_ORIGINS= diff --git a/cms/README.md b/cms/README.md index 560f888a..3a45ae94 100644 --- a/cms/README.md +++ b/cms/README.md @@ -1,6 +1,6 @@ # cms -Payload CMS workspace for [Datum](../README.md) — Next.js admin UI, Postgres, and collections for templates, articles, media, users, and cost logs. +Payload CMS workspace for [Datum](../README.md) — Next.js admin UI, Postgres, the collections and globals in `src/collections/` and `src/globals/`, and the job queue. For install, env setup, seeding, and day-to-day commands, use the [root README](../README.md). Contributor workflow and tests are in [CONTRIBUTING.md](../CONTRIBUTING.md). @@ -9,9 +9,9 @@ For install, env setup, seeding, and day-to-day commands, use the [root README]( | Script | Description | | --- | --- | | `npm run dev` | Next.js + Payload at http://localhost:3000 | -| `npm run seed` | Upsert content templates and local admin user | +| `npm run seed` | Upsert content templates, evidence-source rules, and the local admin user | | `npm run generate:types` | Regenerate `src/payload-types.ts` after collection changes | | `npm run lint` / `typecheck` | ESLint and TypeScript | | `npm run test:int` | Vitest integration tests | -| `npm run test:e2e` | Playwright e2e (start `npm run dev` first, or ensure Playwright’s webServer can start) | +| `npm run test:e2e` | Playwright e2e. Starts its own dev server; set `TEST_BASE_URL` to drive one that is already running | | `npm run jobs:run` | Process one queued `content` pipeline job (use from a production worker/scheduler) | diff --git a/cms/eslint.config.mjs b/cms/eslint.config.mjs index 104aa30a..fb5310f7 100644 --- a/cms/eslint.config.mjs +++ b/cms/eslint.config.mjs @@ -18,10 +18,11 @@ const eslintConfig = [ }, { // eslint-plugin-react 7.37 still calls context.getFilename() when - // version is "detect"; that method was removed in ESLint 10. + // version is "detect"; that method was removed in ESLint 10. Keep this in + // step with the `react` version in package.json. settings: { react: { - version: '19.2.8', + version: '19.3.0', }, }, }, @@ -48,7 +49,26 @@ const eslintConfig = [ }, }, { - ignores: ['.next/', 'src/payload-types.ts', 'src/payload-generated-schema.ts'], + // Payload generates every migration with `({ db, payload, req })`, used or + // not. Those 46 warnings buried anything real in the lint output. Only the + // arguments are exempt: an unused import or local in a migration still warns. + files: ['src/migrations/**/*.ts'], + rules: { + '@typescript-eslint/no-unused-vars': [ + 'warn', + { + vars: 'all', + args: 'none', + ignoreRestSiblings: false, + varsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^(_|ignore)', + }, + ], + }, + }, + { + ignores: ['.next/', 'src/payload-types.ts'], }, ] diff --git a/cms/package.json b/cms/package.json index 278bcd03..1cc4079e 100644 --- a/cms/package.json +++ b/cms/package.json @@ -1,5 +1,6 @@ { "name": "cms", + "private": true, "version": "1.0.0", "description": "Payload CMS app for Datum \u2014 templates, articles, and admin UI", "license": "MIT", @@ -20,7 +21,9 @@ "generate:importmap": "cross-env NODE_OPTIONS=--no-deprecation payload generate:importmap", "generate:types": "cross-env NODE_OPTIONS=--no-deprecation payload generate:types", "lint": "cross-env NODE_OPTIONS=--no-deprecation eslint .", - "jobs:run": "cross-env NODE_OPTIONS=--no-deprecation payload jobs:run --queue content --limit 1", + "jobs:run": "cross-env NODE_OPTIONS=--no-deprecation DISABLE_DEV_PUSH=true payload jobs:run --queue content --limit 1", + "jobs:scheduled": "cross-env NODE_OPTIONS=--no-deprecation DISABLE_DEV_PUSH=true payload jobs:run --queue scheduled --handle-schedules --limit 1", + "jobs:webhooks": "cross-env NODE_OPTIONS=--no-deprecation DISABLE_DEV_PUSH=true payload jobs:run --queue webhooks", "payload": "cross-env NODE_OPTIONS=--no-deprecation payload", "seed": "cross-env NODE_OPTIONS=--no-deprecation tsx src/seed.ts", "typecheck": "tsc --noEmit", @@ -48,6 +51,7 @@ "sharp": "0.35.5" }, "devDependencies": { + "@payloadcms/graphql": "3.91.0", "@playwright/test": "1.63.0", "@testing-library/react": "16.3.3", "@types/node": "26.6.4", diff --git a/cms/src/app/(frontend)/page.tsx b/cms/src/app/(frontend)/page.tsx index 1c8ad026..2bc70cd2 100644 --- a/cms/src/app/(frontend)/page.tsx +++ b/cms/src/app/(frontend)/page.tsx @@ -5,16 +5,13 @@ import React from 'react' import config from '@/payload.config' import { formatArticleDate } from '@/lib/articleReader' -import { modeFromEnv } from '@/lib/workspaceReadiness' -import { resolveWorkspaceProfile, type WorkspaceProfileDoc } from '@/lib/tenant/workspaceProfile' -import './styles.css' export default async function HomePage() { const headers = await getHeaders() const payloadConfig = await config const payload = await getPayload({ config: payloadConfig }) - const [{ docs: published }, profileDoc, { user }] = await Promise.all([ + const [{ docs: published }, profile, { user }] = await Promise.all([ payload.find({ collection: 'articles', select: { @@ -32,16 +29,14 @@ export default async function HomePage() { }), payload.findGlobal({ slug: 'workspace-profile', - select: { sitePages: false }, + select: { companyName: true }, depth: 0, overrideAccess: true, }), payload.auth({ headers }), ]) - const profile = resolveWorkspaceProfile(profileDoc as WorkspaceProfileDoc, process.env, { - mockDefault: modeFromEnv(process.env) === 'mock', - }) + const companyName = profile.companyName?.trim() return (
@@ -54,14 +49,13 @@ export default async function HomePage() { ) : null} -
+ {/* The layout already wraps every page in
; a second one is invalid. */} +

Published articles

{/* No lede without a company name: the fallback repeated the heading word for word, which reads as a rendering bug rather than a subtitle. An unnamed workspace gets the heading alone. */} - {profile.companyName ? ( -

Articles from {profile.companyName}

- ) : null} + {companyName ?

Articles from {companyName}

: null} {published.length === 0 ? (

No published articles yet.

) : ( @@ -86,7 +80,7 @@ export default async function HomePage() { })} )} -
+
) } diff --git a/cms/src/collections/Articles.ts b/cms/src/collections/Articles.ts index 24e5bb10..2c2fa6c1 100644 --- a/cms/src/collections/Articles.ts +++ b/cms/src/collections/Articles.ts @@ -8,9 +8,11 @@ import { gateArchivedStatus, gateReadOnlyStatus, gateReviewOverride, + gatePublicationPath, gateVerifiedStatus, invalidateStaleInformationGain, } from '../lib/articleReviewGate' +import { stampPublication } from '../lib/articlePublication' /** * Shown on every field in `SCORED_CONTENT_FIELDS` that an editor can reach in @@ -32,19 +34,30 @@ export const Articles: CollectionConfig = { // `gateVerifiedStatus` has to see that clearance rather than the PASS it // replaced. `gateReadOnlyStatus` sits after it (readOnly statuses never // carry a decision, so order is documentation) and before the review gates - // it has nothing in common with. The last two are ordered as documentation - // only — `gateVerifiedStatus` re-derives the fresh-justification test - // rather than trusting the hook before it. + // it has nothing in common with. The two after that are ordered as + // documentation only — `gateVerifiedStatus` re-derives the + // fresh-justification test rather than trusting the hook before it. + // `gatePublicationPath` closes the remaining door: a person reaching + // `approved` or `published` from a status review never led through. beforeChange: [ gateArchivedStatus, invalidateStaleInformationGain, gateReadOnlyStatus, gateReviewOverride, gateVerifiedStatus, + gatePublicationPath, + stampPublication, trackArticleContentUpdate, ], afterChange: [auditArticleChange, emitArticleStatusEvent], }, + access: { + // Read, create and update keep Payload's default (any signed-in user). + // Delete is refused outright: the database already refuses it (see + // `archived` below), and without this the admin offered a Delete button + // that could only answer with a 500. + delete: () => false, + }, admin: { group: false, useAsTitle: 'title', @@ -413,7 +426,10 @@ export const Articles: CollectionConfig = { // all pass `overrideAccess: false` — is refused. Without this an editor // could hand-set `decision: 'PASS'` and then `status: 'verified'` in // two ordinary edits and skip scoring; `gateVerifiedStatus` owns the - // other half of that, the status transition itself. + // other half of that, the status transition itself. `create` is closed + // for the same reason: with no stored document, that gate reads the + // decision the request itself supplied. + create: () => false, update: () => false, }, admin: { diff --git a/cms/src/collections/EvidenceSources.ts b/cms/src/collections/EvidenceSources.ts index 1118a9a2..62ba8fd4 100644 --- a/cms/src/collections/EvidenceSources.ts +++ b/cms/src/collections/EvidenceSources.ts @@ -22,7 +22,10 @@ export const EvidenceSources: CollectionConfig = { read: ({ req }) => Boolean(req.user), create: ({ req }) => Boolean(req.user), update: ({ req }) => Boolean(req.user), - delete: ({ req }) => Boolean(req.user), + // A rule is retired with `active: false`. Deleting one changed scoring with + // no audit row, and the cascade on `governance_audit_rels` stripped the + // subject from every audit row the rule already had. + delete: () => false, }, hooks: { beforeValidate: [ diff --git a/cms/src/collections/PipelineRuns.ts b/cms/src/collections/PipelineRuns.ts index d5ab42b8..4c11b13a 100644 --- a/cms/src/collections/PipelineRuns.ts +++ b/cms/src/collections/PipelineRuns.ts @@ -37,10 +37,10 @@ export const PipelineRuns: CollectionConfig = { }, { name: 'mode', type: 'select', required: true, options: ['mock', 'live'] }, { name: 'template', type: 'relationship', relationTo: 'templates', required: true }, - // `admin`/`onboarding` runs are capped at 5 because each one buys a fresh - // topic. A `selected` run buys nothing new — it advances articles that are - // already on the board — so the ceiling is only there to stop a runaway - // select-all, and the DB column is plain numeric either way. + // `admin` runs are capped at 5 because each one buys a fresh topic. A + // `selected` run buys nothing new — it advances articles that already + // exist — so the ceiling is only there to stop a runaway select-all, and + // the DB column is plain numeric either way. { name: 'requestedCount', type: 'number', required: true, min: 1, max: 50 }, { name: 'articles', type: 'relationship', relationTo: 'articles', hasMany: true }, { name: 'configFingerprint', type: 'text', required: true, index: true }, diff --git a/cms/src/components/ops/AuditTimeline.tsx b/cms/src/components/ops/AuditTimeline.tsx index eada5560..6cd8d5f0 100644 --- a/cms/src/components/ops/AuditTimeline.tsx +++ b/cms/src/components/ops/AuditTimeline.tsx @@ -20,7 +20,9 @@ export function AuditTimeline({ entries, title, blurb, emptyText }: Props) {

{title}

{blurb}

- {entries.length} events + + {entries.length} {entries.length === 1 ? 'event' : 'events'} + {entries.length === 0 ? (

{emptyText}

diff --git a/cms/src/components/ops/BrandVoiceEditor.tsx b/cms/src/components/ops/BrandVoiceEditor.tsx index c063fcb2..aef9b795 100644 --- a/cms/src/components/ops/BrandVoiceEditor.tsx +++ b/cms/src/components/ops/BrandVoiceEditor.tsx @@ -348,7 +348,20 @@ export function BrandVoiceEditor({ initial: contentOf(record), version: record?.updatedAt ?? null, onReset: setContent, - labels: { name: 'the name' }, + labels: { + name: 'the name', + essence: 'the essence', + coreValues: 'the core values', + audience: 'the audience', + persona: 'the persona', + voiceAdjectives: 'the voice adjectives', + voiceInOwnWords: 'the voice in your own words', + notTraits: 'what the voice is not', + tone: 'the tone', + preferredWords: 'the preferred words', + bannedWords: 'the banned words', + samples: 'the writing samples', + }, save: async () => { setError(null) setMessage(null) @@ -371,7 +384,12 @@ export function BrandVoiceEditor({ const clamped = Math.max(0, Math.min(BRAND_VOICE_STEPS.length - 1, next)) setStep(clamped) if (workingId != null && modeOf(clamped) !== modeOf(step)) { - router.replace(`${VIEW_PATH}?id=${workingId}&mode=${modeOf(clamped)}`, { scroll: false }) + // `suggestionId` rides along: without it the server re-renders with no + // suggestion and the save that satisfies it is never recorded as accepted. + const suggestionParam = suggestion ? `&suggestionId=${suggestion.id}` : '' + router.replace(`${VIEW_PATH}?id=${workingId}&mode=${modeOf(clamped)}${suggestionParam}`, { + scroll: false, + }) } } diff --git a/cms/src/components/ops/ContentList.tsx b/cms/src/components/ops/ContentList.tsx index 03074917..b4c1f157 100644 --- a/cms/src/components/ops/ContentList.tsx +++ b/cms/src/components/ops/ContentList.tsx @@ -288,6 +288,8 @@ export function ContentList({ content, latestRun, mode }: Props) { pick a topic, and Datum researches it while you wait.

+ ) : q ? ( +

No pieces match “{q}”.

) : filter === 'you' ? ( <>

Nothing needs you right now

diff --git a/cms/src/components/ops/DirtyGuardUi.tsx b/cms/src/components/ops/DirtyGuardUi.tsx index 075c37ae..877360bc 100644 --- a/cms/src/components/ops/DirtyGuardUi.tsx +++ b/cms/src/components/ops/DirtyGuardUi.tsx @@ -221,23 +221,3 @@ export function LeaveDialog({ guard, canSave = true }: { guard: AnyGuard; canSav document.body, ) } - -/** Everything the guard puts on the page besides the Save button itself. */ -export function DirtyGuardChrome({ - guard, - pending, - onSave, - blocked, -}: { - guard: AnyGuard - pending: boolean - onSave: () => void - blocked?: boolean -}) { - return ( - <> - - - - ) -} diff --git a/cms/src/components/ops/IcpEditor.tsx b/cms/src/components/ops/IcpEditor.tsx index 017e66a6..a6309e1d 100644 --- a/cms/src/components/ops/IcpEditor.tsx +++ b/cms/src/components/ops/IcpEditor.tsx @@ -35,6 +35,7 @@ const ICP_FIELD_LABELS: Record = { motivation: 'the motivation', solution: 'the solution', competition: 'the competition', + whyUs: 'why us', channels: 'the channels', churnTriggers: 'the churn triggers', notOurUser: 'who it is not', @@ -247,7 +248,8 @@ export function IcpEditor({ sitePagesFetchedAt, }} disabled={pending} - problems={current === 'review' ? problems : []} + // An active audience blocks Save on every step, so every step has to say why. + problems={current === 'review' || status === 'active' ? problems : []} problemsTitle={ status === 'active' ? 'Fix before saving — an active audience must stay complete' diff --git a/cms/src/components/ops/PositioningEditor.tsx b/cms/src/components/ops/PositioningEditor.tsx index 80ca932e..16306284 100644 --- a/cms/src/components/ops/PositioningEditor.tsx +++ b/cms/src/components/ops/PositioningEditor.tsx @@ -81,8 +81,8 @@ export function PositioningEditor({ archetype: 'the archetype', essence: 'the essence', descriptorLadder: 'the descriptor ladder', - vocabularyReachFor: 'the vocabulary', - vocabularyAvoid: 'the vocabulary', + vocabularyReachFor: 'the words to reach for', + vocabularyAvoid: 'the words to avoid', openRulings: 'the open rulings', }, save: async () => { diff --git a/cms/src/components/ops/TemplateConfigEditor.tsx b/cms/src/components/ops/TemplateConfigEditor.tsx index dd3e210d..a67a3270 100644 --- a/cms/src/components/ops/TemplateConfigEditor.tsx +++ b/cms/src/components/ops/TemplateConfigEditor.tsx @@ -281,6 +281,9 @@ export function TemplateConfigEditor({ templates, initialId }: Props) { key={t.id} type="button" className={t.id === selected.id ? 'is-active' : undefined} + // A save in flight resolves into whichever template is open, so + // switching mid-save would load one template's result into another. + disabled={pending} onClick={() => { if (t.id !== selected.id) guard.guardLeave(() => loadTemplate(t)) }} diff --git a/cms/src/components/ops/TopicDiscovery.tsx b/cms/src/components/ops/TopicDiscovery.tsx index 7e95c6da..aae3f8b1 100644 --- a/cms/src/components/ops/TopicDiscovery.tsx +++ b/cms/src/components/ops/TopicDiscovery.tsx @@ -388,18 +388,18 @@ export function TopicDiscovery({
  1. You add topics here. Everything you tick in one search becomes a - single article covering that group, sitting in Topic selected on the board. - Nothing has been written or spent yet. + single article covering that group, and research on it starts straight away.
  2. - Datum researches it and writes you a brief. Under Content, tick the - topics you want and press Start. Datum researches what already ranks, writes a draft - in your brand voice, and checks it. You choose which topics run and when. + Datum researches it and writes you a brief: the angle, the audience + and the sections. Nothing is written until you approve it. Edit the brief, approve + it, and Datum writes the draft in your brand voice and checks it.
  3. - Three checks must pass — structure, facts (verified against live web - search), and style. Anything that fails lands in Needs revision with the - reason, and you can send it back to be rewritten against that feedback. + Four checks must pass — structure, facts (verified against live web + search), style, and evidence for what the piece says about your company. Anything + that fails lands in Needs revision with the reason, and you can send it back + to be rewritten against that feedback.
  4. Then it is scored for information gain: does it say anything the diff --git a/cms/src/components/ops/actions.ts b/cms/src/components/ops/actions.ts index 55c1be23..1905b886 100644 --- a/cms/src/components/ops/actions.ts +++ b/cms/src/components/ops/actions.ts @@ -4,7 +4,7 @@ import { revalidatePath } from 'next/cache' import { requireUser } from '../../lib/requireUser' import { activeRunIncludesArticle } from '@/lib/activeRuns' -import { CLEARED_INFORMATION_GAIN } from '@/lib/articleReviewGate' +import { CLEARED_INFORMATION_GAIN, OVERRIDABLE_STATUSES } from '@/lib/articleReviewGate' import { ActivePipelineRunError } from '@/lib/createPipelineRun' import { errorMessage } from '@/lib/errorMessage' import { loadWorkspaceSetup } from '@/lib/loadWorkspaceReadiness' @@ -48,6 +48,9 @@ const NULL_QA_RESULTS = { voiceNotes: null, notTraitViolations: null, }, + // Without this the evidence verdict of the draft being thrown away stays on + // the article, and the review page shows it against text QA has not seen. + evidenceCheck: { passed: null, notes: null, claims: null }, } as const /** @@ -67,6 +70,36 @@ const NULL_QA_RESULTS = { */ const CLEARED_SCHEDULE = { publishAt: null } as const +/** + * Statuses where no brief has been approved, so there is no draft to redo. + * + * Reset writes `drafted` and regenerate writes `researched`. From either of + * these statuses (a stale page, a direct call) that would start the writing + * without the brief ever being approved, the one transition only approval may + * make. Every later status has an approved brief behind it and keeps working. + */ +const NO_APPROVED_BRIEF: readonly ArticleStatus[] = ['topic_selected', 'brief_review'] + +const noApprovedBrief = (verb: string) => + `This article has no approved brief yet, so it cannot be ${verb}. Approve the brief first.` + +async function requireApprovedBrief( + payload: Awaited>['payload'], + user: Awaited>['user'], + articleId: number, + verb: string, +): Promise { + const { status } = await payload.findByID({ + collection: 'articles', + id: articleId, + depth: 0, + select: { status: true }, + overrideAccess: false, + user, + }) + if (NO_APPROVED_BRIEF.includes(status)) throw new Error(noApprovedBrief(verb)) +} + function revalidateOps(articleId?: number | string) { // No `/admin/ops/articles` list any more — the content board replaced it, so // revalidating that path only ever refreshed a route that redirects. @@ -226,6 +259,7 @@ export async function resetToDraftedAction( options?: ReviewActionOptions, ): Promise { const { payload, user } = await requireUser('Unauthorized') + await requireApprovedBrief(payload, user, articleId, 'reset') const updated = await payload.update({ collection: 'articles', id: articleId, @@ -473,6 +507,9 @@ export async function sendBackAction( voiceNotes: null, notTraitViolations: [], }, + // An omitted group is refilled from the stored document, so the old + // draft's evidence verdict has to be cleared by name. + evidenceCheck: NULL_QA_RESULTS.evidenceCheck, }, informationGain: NULL_INFORMATION_GAIN, ...CLEARED_SCHEDULE, @@ -516,6 +553,13 @@ export async function overrideReviewAction(articleId: number, justification: str user, }) const from = article.status + // The gates only judge a move out of these two statuses. From anywhere else + // (a stale page on an article someone already overrode, say) they let the + // write through, and the audit row below would record an override that did + // not happen. + if (!OVERRIDABLE_STATUSES.includes(from as (typeof OVERRIDABLE_STATUSES)[number])) { + throw new Error('Only an article in Needs review or Blocked can be overridden.') + } const runId = (await currentInformationGainRun(payload, article, user))?.id ?? null await payload.update({ collection: 'articles', @@ -560,6 +604,7 @@ export async function regenerateArticleAction( overrideAccess: false, user, }) + if (NO_APPROVED_BRIEF.includes(article.status)) throw new Error(noApprovedBrief('regenerated')) const run = await currentInformationGainRun(payload, article, user) const revisionNotes = buildRegenerateRevisionNotes(run, article, note) const updated = await payload.update({ diff --git a/cms/src/components/ops/boardActions.ts b/cms/src/components/ops/boardActions.ts index 293357d0..e58688ac 100644 --- a/cms/src/components/ops/boardActions.ts +++ b/cms/src/components/ops/boardActions.ts @@ -1,8 +1,9 @@ 'use server' import { revalidatePath } from 'next/cache' -import { requireUser } from '../../lib/requireUser' +import { optionalUser, requireUser } from '../../lib/requireUser' +import { activeRunIdForArticles } from '../../lib/activeRuns' import { ActivePipelineRunError } from '../../lib/createPipelineRun' import { errorMessage } from '../../lib/errorMessage' import { loadWorkspaceSetup } from '../../lib/loadWorkspaceReadiness' @@ -99,6 +100,21 @@ export async function removeTopicsAction(articleIds: number[]): Promise doc.id), + ) + ) { + return { + ok: false, + error: `${docs.length === 1 ? 'This topic is' : 'One of these topics is'} in an active run. Wait for the run to finish before removing ${docs.length === 1 ? 'it' : 'them'}.`, + } + } for (const doc of docs) { await payload.update({ @@ -141,7 +157,10 @@ export async function removeTopicsAction(articleIds: number[]): Promise { try { - const { payload, user } = await requireUser('Sign in to manage the board.') + // The run bar is mounted on every admin route, the login page included, + // and polls this. Signed out there is simply no run to show. + const { payload, user } = await optionalUser() + if (!user) return null const { docs } = await payload.find({ collection: 'pipeline-runs', user, diff --git a/cms/src/components/ops/boardTypes.ts b/cms/src/components/ops/boardTypes.ts index e249a1af..01085a33 100644 --- a/cms/src/components/ops/boardTypes.ts +++ b/cms/src/components/ops/boardTypes.ts @@ -52,6 +52,8 @@ export const CALL_LABELS: Record = { qualitativeReview: 'Reviewing style and brand voice', informationGainJudge: 'Judging what is genuinely new', evidenceVerification: 'Hunting evidence for new claims', + evidenceCheck: 'Checking company claims against the evidence bank', + briefAngle: 'Proposing angles for the brief', } /** `claimExtraction` means different work depending on where the article is. */ diff --git a/cms/src/components/ops/positioningSections.tsx b/cms/src/components/ops/positioningSections.tsx index 98006d7f..5a961e6b 100644 --- a/cms/src/components/ops/positioningSections.tsx +++ b/cms/src/components/ops/positioningSections.tsx @@ -167,7 +167,7 @@ export function CoreClaimsSection({ content, onChange, disabled }: PositioningSe empty={() => ({ claim: '', evidenceRef: '' })} addLabel="Add a claim" disabled={disabled} - max={5} + max={3} emptyText="No claims yet. Three is the target." renderRow={({ row, rowId, patch }) => ( <> diff --git a/cms/src/components/ops/review/panels/PublishedPanel.tsx b/cms/src/components/ops/review/panels/PublishedPanel.tsx index d789fae4..b8d14498 100644 --- a/cms/src/components/ops/review/panels/PublishedPanel.tsx +++ b/cms/src/components/ops/review/panels/PublishedPanel.tsx @@ -17,18 +17,15 @@ export function PublishedPanel({ action, article, editHref }: PanelProps) { : 'Published; the time it went live was not recorded.'}

    - {article.slug ? ( - - /articles/{article.slug} - - ) : ( - No slug on this piece, so it has no public address. - )} + {/* A piece with no slug is still served, at its id. */} + + /articles/{article.slug || article.id} +
    diff --git a/cms/src/components/ops/review/panels/RunNextStagePanel.tsx b/cms/src/components/ops/review/panels/RunNextStagePanel.tsx index ae8e23e7..43074ddf 100644 --- a/cms/src/components/ops/review/panels/RunNextStagePanel.tsx +++ b/cms/src/components/ops/review/panels/RunNextStagePanel.tsx @@ -91,7 +91,9 @@ export function RunNextStagePanel({ const startRun = (confirmLiveCost: boolean) => { disarm() runAction(async () => { - if (status === 'topic_selected' && templateId) { + // Skipped when the piece already has this template: each call is a + // second write and a `template_assigned` audit row for no change. + if (status === 'topic_selected' && templateId && Number(templateId) !== article.templateId) { await assignTemplateAction(article.id, Number(templateId)) } const result = await runSelectedArticlesAction({ diff --git a/cms/src/components/ops/review/panels/VerifiedPanel.tsx b/cms/src/components/ops/review/panels/VerifiedPanel.tsx index 9cbd3eea..1cd3bd66 100644 --- a/cms/src/components/ops/review/panels/VerifiedPanel.tsx +++ b/cms/src/components/ops/review/panels/VerifiedPanel.tsx @@ -18,12 +18,19 @@ import { DECISION_LABEL, type PanelProps } from '../types' export function VerifiedPanel({ action, article, editHref, run, runIsCurrent }: PanelProps) { const { pending, runAction, setNotice } = action const [notes, setNotes] = useState(article.reviewNotes ?? '') + // An override moves the piece to `verified` and leaves the decision it + // overrode on the article, so anything but PASS here means a person, not the + // score, cleared it. Read from the article: the run row may not be current. + const decision = article.informationGain?.decision + const overridden = decision != null && decision !== 'PASS' return (

    Approve

    - QA and information gain both cleared this draft + {overridden + ? 'A reviewer overrode the information-gain decision on this draft' + : 'QA and information gain both cleared this draft'} {run && runIsCurrent ? ` (run #${run.id}, ${DECISION_LABEL[run.decision]})` : ''}.

    diff --git a/cms/src/components/ops/tenantActions.ts b/cms/src/components/ops/tenantActions.ts index eb0f2cde..5558ea8c 100644 --- a/cms/src/components/ops/tenantActions.ts +++ b/cms/src/components/ops/tenantActions.ts @@ -35,8 +35,6 @@ import { droppedRows, type EvidenceSaveCounts, type WorkspaceSaveCounts } from ' import type { EvidenceBankInput, WorkspaceProfileInput } from './setupTypes' export type TenantActionResult = { ok: true } | { ok: false; error: string } -/** A save that succeeded, plus what is still missing from the saved asset. */ -export type SaveResult = { ok: true; problems: string[] } | { ok: false; error: string } /** * A save of an asset the server parses before storing. `saved` is what was diff --git a/cms/src/globals/InformationGainPolicy.ts b/cms/src/globals/InformationGainPolicy.ts index c8db3fa0..ba371433 100644 --- a/cms/src/globals/InformationGainPolicy.ts +++ b/cms/src/globals/InformationGainPolicy.ts @@ -1,4 +1,5 @@ -import type { Field, GlobalConfig } from 'payload' +import type { Field, GlobalConfig, NumberFieldSingleValidation } from 'payload' +import { number as validateNumber } from 'payload/shared' import { POLICY_FIELDS, type PolicyFieldDef } from '../lib/informationGain' import { auditGlobalChange } from '../lib/governanceAudit' @@ -28,6 +29,18 @@ export const OUTCOME_COPY: Record = { HUMAN_REVIEW: 'flagged for a person to review', } +/** + * Payload's own number validation (which is what enforces `min`), plus a + * whole-number check. A custom `validate` replaces the built-in one, so the + * built-in is called explicitly. + */ +const wholeNumber = + (label: string): NumberFieldSingleValidation => + (value, options) => + value != null && !Number.isInteger(value) + ? `${label} must be a whole number.` + : validateNumber(value, options) + const policyField = (f: PolicyFieldDef): Field => { const label = humaniseKey(f.key) const admin = { @@ -54,6 +67,10 @@ const policyField = (f: PolicyFieldDef): Field => { label, min: 0, ...(f.kind === 'ratio' ? { max: 1 } : {}), + // The resolver discards a fractional count and falls through to the env + // value or the default, so refuse it here instead of saving a number that + // shows in the admin and is then ignored. + ...(f.kind === 'count' ? { validate: wholeNumber(label) } : {}), admin, } } diff --git a/cms/src/globals/LlmSettings.ts b/cms/src/globals/LlmSettings.ts index 17472ca1..1da3846d 100644 --- a/cms/src/globals/LlmSettings.ts +++ b/cms/src/globals/LlmSettings.ts @@ -110,6 +110,7 @@ export const LlmSettings: GlobalConfig = { 'Setup assistant', SETUP_ASSIST_ENV_VAR, 'Drafts and refines onboarding steps (audiences, positioning, evidence bank) from your notes and site.', + 'the brand voice extraction model above', ), ], } diff --git a/cms/src/jobs/publishDue.ts b/cms/src/jobs/publishDue.ts index 228169fb..4b1e19f9 100644 --- a/cms/src/jobs/publishDue.ts +++ b/cms/src/jobs/publishDue.ts @@ -13,8 +13,10 @@ type PublishDueTask = { * publish. * * Selection is purely by current state (`approved` + due + not archived), so - * re-running converges: a crash mid-batch republishes nothing, and an article - * someone moved off `approved` keeps its `publishAt` as inert intent. + * re-running converges: a crash mid-batch republishes nothing. Publishing uses + * the schedule up: the collection's `stampPublication` hook clears `publishAt` + * on the way into `published`, so a piece that is later approved again does + * not go out on the old date. * * Deliberately not on the `content` queue: `ContentRunTask` holds a * concurrency lock for whole pipeline runs, and publish latency must not wait diff --git a/cms/src/jobs/webhookDeliver.ts b/cms/src/jobs/webhookDeliver.ts index fad4efdc..04bcb870 100644 --- a/cms/src/jobs/webhookDeliver.ts +++ b/cms/src/jobs/webhookDeliver.ts @@ -42,6 +42,32 @@ export function verifyWebhookSignature( return expected.length === received.length && timingSafeEqual(expected, received) } +/** + * A delivery error with the destination and the secret taken out. + * + * The message is persisted on the job row. The URL may carry a token in its + * query string and `fetch` quotes it back ("Failed to parse URL from ..."), so + * the URL is removed as configured, as `URL` normalises it, and as a bare query + * string, longest first so a partial match cannot leave the rest behind. + */ +export function redactDeliveryError(message: string, url: string, secret: string): string { + const forms = new Set([url]) + try { + const parsed = new URL(url) + forms.add(parsed.href) + if (parsed.search.length > 1) forms.add(parsed.search) + } catch { + // Unparseable is the case fetch quotes verbatim; the raw string covers it. + const query = url.indexOf('?') + if (query >= 0 && query < url.length - 1) forms.add(url.slice(query)) + } + let redacted = message + for (const form of [...forms].sort((a, b) => b.length - a.length)) { + redacted = redacted.replaceAll(form, '[webhook url]') + } + return redacted.replaceAll(secret, '[redacted]').slice(0, 300) +} + export const WebhookDeliverTask: TaskConfig = { slug: 'webhook-deliver', label: 'Webhook delivery', @@ -84,14 +110,15 @@ export const WebhookDeliverTask: TaskConfig = { } return { output: { delivered: true, status: response.status } } } catch (error) { - // Throwing hands the job back to the queue for its remaining retries. The - // secret never appears in fetch errors, but the URL can (it may carry a - // token in a query string), so the persisted message names the event only. + // Throwing hands the job back to the queue for its remaining retries, and + // the message is persisted on the job row. The URL may carry a token in + // its query string and fetch quotes it back ("Failed to parse URL from + // ..."), so it is redacted along with the secret. const reason = error instanceof Error && error.name === 'AbortError' ? `timed out after ${DELIVERY_TIMEOUT_MS}ms` : error instanceof Error - ? error.message.replaceAll(settings.secret, '[redacted]').slice(0, 300) + ? redactDeliveryError(error.message, settings.url, settings.secret) : 'delivery failed' throw new Error(`webhook delivery for "${input.event}" failed: ${reason}`) } finally { diff --git a/cms/src/lib/articlePublication.ts b/cms/src/lib/articlePublication.ts new file mode 100644 index 00000000..5ea16030 --- /dev/null +++ b/cms/src/lib/articlePublication.ts @@ -0,0 +1,29 @@ +import type { CollectionBeforeChangeHook } from 'payload' + +/** + * What every transition into `published` leaves on the article, whoever made it. + * + * `publishedAt` used to be stamped by the two callers that publish (the ops + * action and the `publish-due` job), so a publish from the raw document view or + * the API left it null: no dateline, no `datePublished`, and the piece sorted + * to the top of the home page. It is stamped here when the write does not carry + * a new value of its own. + * + * `publishAt` is the schedule that has now been used up. Left in place it is + * inert only until the piece is `approved` again, at which point the + * five-minute `publish-due` tick finds a date long past and republishes it + * without anyone asking. Every action that moves an article off `approved` + * already clears it for that reason; publishing is the one that did not. + */ +export const stampPublication: CollectionBeforeChangeHook = ({ data, originalDoc }) => { + if (data.status !== 'published' || originalDoc?.status === 'published') return data + // Payload refills fields the request omitted from the stored document, so an + // unchanged value here is the previous publication's date, not a new one. A + // republish therefore always gets a fresh date unless the write supplies a + // different one, which is what the publish action has always done. + if (data.publishedAt == null || data.publishedAt === originalDoc?.publishedAt) { + data.publishedAt = new Date().toISOString() + } + data.publishAt = null + return data +} diff --git a/cms/src/lib/articleReviewGate.ts b/cms/src/lib/articleReviewGate.ts index 8be4d236..edea1484 100644 --- a/cms/src/lib/articleReviewGate.ts +++ b/cms/src/lib/articleReviewGate.ts @@ -140,6 +140,51 @@ export const gateVerifiedStatus: CollectionBeforeChangeHook = ({ data, originalD return data } +/** + * The statuses a person may move an article *from* to reach each + * publication status. + * + * `verified` is the one status scoring or a reviewed override produces, so it + * is the way in; `approved` and `published` lead to each other. The two review + * statuses are listed because `gateReviewOverride` already demands a fresh + * justification for a jump straight out of them, and that audited path is kept. + */ +export const PUBLICATION_PREDECESSORS = { + approved: ['verified', 'published', ...OVERRIDABLE_STATUSES], + published: ['verified', 'approved', ...OVERRIDABLE_STATUSES], +} as const satisfies Partial> + +/** + * `approved` and `published` are reachable by a person only from a status that + * review leads through. + * + * The other gates each watch one door: `gateVerifiedStatus` a move *to* + * `verified`, `gateReviewOverride` a move *out of* review, `gateReadOnlyStatus` + * content edits inside a machine status. None of them judged a move from + * `drafted`, `qa_passed`, `needs_revision` or a brand-new document straight to + * `approved` or `published`, so an unscored draft could be published in one + * edit from the admin, REST or GraphQL, and a stale review page could approve a + * draft whose score had just been invalidated. + * + * Only requests that carry a user are judged. A Local API call without one is + * the application's own code (the `publish-due` job, the seed, a migration + * script), which is the same line field access draws with `overrideAccess`. + */ +export const gatePublicationPath: CollectionBeforeChangeHook = ({ data, originalDoc, req }) => { + if (!req.user) return data + const to = data.status as string | undefined + if (to !== 'approved' && to !== 'published') return data + const from = originalDoc?.status as string | undefined + if (from === to) return data + if (from && (PUBLICATION_PREDECESSORS[to] as readonly string[]).includes(from)) return data + throw new APIError( + from + ? `An article cannot move from ${from} to ${to}. It has to be verified first, by scoring or a reviewed override.` + : `An article cannot be created as ${to}. It has to be verified first, by scoring or a reviewed override.`, + 400, + ) +} + /** * Moving a needs_review or blocked article anywhere other than backward — so to * qa_passed, verified, approved, or published — requires a *new* diff --git a/cms/src/lib/articleStatusMeta.ts b/cms/src/lib/articleStatusMeta.ts index afebaaf8..1ddc45d6 100644 --- a/cms/src/lib/articleStatusMeta.ts +++ b/cms/src/lib/articleStatusMeta.ts @@ -70,8 +70,8 @@ export type StatusMeta = { /** * The machine owns the article's content while it sits here: a run is about * to read or overwrite it, so human edits would be lost or would invalidate - * work already paid for. Declarative for now; the enforcing gate lives with - * its siblings in `articleReviewGate.ts` once added. + * work already paid for. Enforced by `gateReadOnlyStatus` in + * `articleReviewGate.ts`. */ readOnly: boolean /** Which pipeline stage waits on this status; null when only a person moves it. */ diff --git a/cms/src/lib/brandVoice.ts b/cms/src/lib/brandVoice.ts index 6c592392..becc224d 100644 --- a/cms/src/lib/brandVoice.ts +++ b/cms/src/lib/brandVoice.ts @@ -198,7 +198,9 @@ export function parseBrandVoiceContent(input: unknown): { samples = samples.map((sample) => { if (sample.text.length <= MAX_SAMPLE_CHARS) return sample warnings.push(`Sample "${sample.title || sample.text.slice(0, 20)}…" truncated to ${MAX_SAMPLE_CHARS} characters`) - return { ...sample, text: `${sample.text.slice(0, MAX_SAMPLE_CHARS).trimEnd()}…` } + // One short of the cap, so the ellipsis lands on it: a sample cut to the cap + // plus one is over the cap again, and every later parse re-truncated it. + return { ...sample, text: `${sample.text.slice(0, MAX_SAMPLE_CHARS - 1).trimEnd()}…` } }) const content: BrandVoiceContent = { diff --git a/cms/src/lib/cmsLlm.ts b/cms/src/lib/cmsLlm.ts index 04be8a36..f32b734e 100644 --- a/cms/src/lib/cmsLlm.ts +++ b/cms/src/lib/cmsLlm.ts @@ -91,8 +91,8 @@ function parseJsonReply(text: string): unknown { /** * One JSON-returning model call, routed by model id: `gpt-*` through OpenAI's - * Responses API and `claude-*` through Anthropic. An id belonging to neither - * is refused rather than guessed at. + * Responses API and everything else through Anthropic. Only an id containing a + * `/` (another provider's namespace) is refused; see `providerForModel`. * * Deliberately refuses to run in mock mode rather than inventing a reply: the * shape of a useful mock is the caller's business (brand-voice extraction diff --git a/cms/src/lib/informationGain/exactness.ts b/cms/src/lib/informationGain/exactness.ts index 8b8a89a2..c6be87f5 100644 --- a/cms/src/lib/informationGain/exactness.ts +++ b/cms/src/lib/informationGain/exactness.ts @@ -190,12 +190,13 @@ const NUMERIC_AMOUNT = String.raw`(?:${SIGN})?(?:${DIGIT_AMOUNT})(?:${MULTIPLIER * token as a measurement. A bare "one of the best ways" is prose, and reading a * value out of it would manufacture exactness mismatches from ordinary text. */ -const AMOUNT = String.raw`(?:${NUMERIC_AMOUNT}|${WORD_NUMBER_SRC})` +const AMOUNT = String.raw`(?:${NUMERIC_AMOUNT}|\b(?:${WORD_NUMBER_SRC})\b)` /** * One left-to-right scan; alternatives are tried in order at each position, so - * this list *is* the precedence: dates, then percent, then currency, then - * ranges and united numbers, then a bare number (re-classified as a year below). + * this list *is* the precedence: dates, then decades, then percent, then + * currency, then ranges and united numbers, then a bare number (re-classified as + * a year below). */ const VALUE_PATTERN = new RegExp( [ @@ -203,6 +204,13 @@ const VALUE_PATTERN = new RegExp( String.raw`\b(?\d{1,2})(?:st|nd|rd|th)?\s+(?${MONTH_SRC})\.?,?\s+(?\d{4})\b`, String.raw`\b(?${MONTH_SRC})\.?\s+(?\d{1,2})(?:st|nd|rd|th)?(?:,\s*|\s+)(?\d{4})\b`, String.raw`\b(?${MONTH_SRC})\.?,?\s+(?\d{4})\b`, + // `the 1990s`: a decade, which would otherwise read as 1,990 seconds. The + // cost is a duration written the same way (`a timeout of 2000s`), which now + // reads as a decade too; for 1900 to 2090 the decade is by far the commoner + // meaning. The apostrophe form is deliberately left alone: `2020's` is as + // often a possessive (`2020's lockdowns`) as a decade, and it stays the + // year 2020 it has always read as. + String.raw`\b(?(?:19|20)\d0)s\b`, String.raw`(?${AMOUNT})\s*(?:%|per\s?cent\b)`, String.raw`(?${SIGN})?(?[$€£])\s*(?${AMOUNT})`, String.raw`\b(?usd|eur|gbp)\s*(?${AMOUNT})`, @@ -263,6 +271,12 @@ function valueFromMatch(match: RegExpExecArray): ExtractedValue | ExtractedValue return { kind: 'date', value: yyyymm(Number(g.myY), monthNumber(g.myM)), unit: null, raw } } + if (g.decade !== undefined) { + // `raw` ends in `s`: that is how `sameValue` tells a decade from the single + // year of the same number. + return { kind: 'year', value: Number(g.decade), unit: null, raw } + } + if (g.pct !== undefined) { const value = parseAmount(g.pct) return value === null ? null : { kind: 'percent', value, unit: '%', raw } @@ -361,7 +375,31 @@ export function extractValues(text: string): TextValues { * so evidence reading `growth was 10%` cannot support `growth was -10%`. */ function sameValue(a: ExtractedValue, b: ExtractedValue): boolean { - if (a.kind !== b.kind) return false + // `2000 participants` is classified as a year and `2,000 participants` as a + // number; they are the same figure, so the two kinds compare by value. Every + // other pair of kinds stays distinct. + // + // Both sides are held to the one spelling difference this is for: a year + // written as four bare digits, and a count written in plain digits with or + // without thousands separators. `2k users`, `2 thousand` and `2000 ms` are + // not that, and do not match a year. The rule cuts both ways by construction: + // `founded in 2000` is also satisfied by `2,000 customers`, because nothing + // in the text says which of the two a bare `2000` is. + // + // A decade (`the 2000s`) is stored as a year as well, and it is neither the + // count `2,000` nor the single year `2000`: it only ever matches another + // decade. + // Case-insensitive, like the pattern that extracts it: `THE 1990S` is a decade. + const isDecade = (v: ExtractedValue) => v.kind === 'year' && /s$/i.test(v.raw) + if (isDecade(a) !== isDecade(b)) return false + const yearOrBareNumber = (v: ExtractedValue) => + (v.kind === 'year' && /^\d{4}$/.test(v.raw)) || + (v.kind === 'number' && + v.unit === null && + /^[1-9]\d{0,2}(?:,\d{3})+$|^[1-9]\d*$/.test(v.raw)) + const yearAgainstNumber = + a.kind !== b.kind && yearOrBareNumber(a) && yearOrBareNumber(b) + if (a.kind !== b.kind && !yearAgainstNumber) return false if (Math.abs(a.value - b.value) > 1e-9) return false if (a.unit !== null && b.unit !== null && a.unit !== b.unit) return false return true diff --git a/cms/src/lib/informationGain/parsers.ts b/cms/src/lib/informationGain/parsers.ts index 8fd55b53..bb0e45f4 100644 --- a/cms/src/lib/informationGain/parsers.ts +++ b/cms/src/lib/informationGain/parsers.ts @@ -373,6 +373,15 @@ export function parseJudgeReply( for (const claimId of expectedClaimIds) { const record = byId.get(claimId) if (record === undefined) throw new Error(`judge reply missing claim ${claimId}`) + // Novelty is `1 - duplicateProbability`, so reading a missing or quoted + // value as 0 would call the claim maximally novel and send it to the paid + // verifier. Refuse the reply instead; the stage retries on the next run. + if ( + typeof record.duplicateProbability !== 'number' || + !Number.isFinite(record.duplicateProbability) + ) { + throw new Error(`judge reply for claim ${claimId} has no numeric duplicateProbability`) + } const utility = asRecord(record.utility) ?? {} signals.set(claimId, { duplicateProbability: asProbability(record.duplicateProbability), diff --git a/cms/src/lib/informationGain/text.ts b/cms/src/lib/informationGain/text.ts index 4707dada..0eea3b84 100644 --- a/cms/src/lib/informationGain/text.ts +++ b/cms/src/lib/informationGain/text.ts @@ -61,17 +61,19 @@ export const STOPWORDS: ReadonlySet = new Set([ 'top', 'tips', 'ways', - '2024', - '2025', - '2026', ]) -/** Lower-cased alphanumeric tokens, stopwords and one/two-letter tokens dropped, deduped. */ +/** A calendar year in a keyword ("best crm 2027") says nothing about the topic. */ +const YEAR_TOKEN = /^(?:19|20)\d{2}$/ + +/** Lower-cased alphanumeric tokens; stopwords, years and one/two-letter tokens dropped; deduped. */ export function keywordTokens(s: string): string[] { const seen = new Set() const tokens: string[] = [] for (const token of s.toLowerCase().split(/[^a-z0-9]+/)) { - if (token.length < 3 || STOPWORDS.has(token) || seen.has(token)) continue + if (token.length < 3 || STOPWORDS.has(token) || YEAR_TOKEN.test(token) || seen.has(token)) { + continue + } seen.add(token) tokens.push(token) } diff --git a/cms/src/lib/opsKpis.ts b/cms/src/lib/opsKpis.ts index dcf2ca62..5e0d3484 100644 --- a/cms/src/lib/opsKpis.ts +++ b/cms/src/lib/opsKpis.ts @@ -6,7 +6,7 @@ * `stageKpis` is the reducer every in-memory caller should reach for — * `boardActions.ts`'s run-activity panel and the pipeline CLI's `report` * command both feed it their (already fetched) cost-log rows rather than - * hand-rolling the same `Map` loop. `reportQueries.ts:13-40` is + * hand-rolling the same `Map` loop. `loadReportCosts` in `reportQueries.ts` is * this function's SQL twin: the reports page's cost table is large enough * that hydrating every row to reduce it in memory would be wasteful, so that * query does the identical group-by-stage aggregation as a single Drizzle diff --git a/cms/src/lib/requireUser.ts b/cms/src/lib/requireUser.ts index f87477ef..11896d6b 100644 --- a/cms/src/lib/requireUser.ts +++ b/cms/src/lib/requireUser.ts @@ -2,11 +2,17 @@ import config from '@payload-config' import { headers as getHeaders } from 'next/headers' import { getPayload } from 'payload' -/** Authenticate a server action, preserving its operator-facing wording. */ -export async function requireUser(message: string) { +/** The caller, or `user: null` when nobody is signed in. For actions that have a signed-out answer. */ +export async function optionalUser() { const headers = await getHeaders() const payload = await getPayload({ config }) const { user } = await payload.auth({ headers }) + return { payload, user } +} + +/** Authenticate a server action, preserving its operator-facing wording. */ +export async function requireUser(message: string) { + const { payload, user } = await optionalUser() if (!user) throw new Error(message) return { payload, user } } diff --git a/cms/src/lib/setupSuggestions/collect.ts b/cms/src/lib/setupSuggestions/collect.ts index 8add3782..5c639ab2 100644 --- a/cms/src/lib/setupSuggestions/collect.ts +++ b/cms/src/lib/setupSuggestions/collect.ts @@ -179,12 +179,18 @@ export async function collectSetupSuggestions( firstSeenAt: dates[0], } if (existing) { - if (existing.count === data.count && existing.lastSeenAt === data.lastSeenAt) continue + // `signature` is unique, so a suggestion that went obsolete (its count + // dipped under the threshold once) can never be created again: it has + // to reopen here or it is gone for good. Only obsolete reopens; a + // person's accept or dismiss stands. + const reopening = existing.status === 'obsolete' + if (!reopening && existing.count === data.count && existing.lastSeenAt === data.lastSeenAt) + continue await payload.update({ collection: 'setup-suggestions', id: existing.id, overrideAccess: true, - data, + data: reopening ? { ...data, status: 'open' } : data, }) result.updated++ } else { diff --git a/cms/src/lib/setupSuggestions/signals.ts b/cms/src/lib/setupSuggestions/signals.ts index 9742ea8a..7f83a33e 100644 --- a/cms/src/lib/setupSuggestions/signals.ts +++ b/cms/src/lib/setupSuggestions/signals.ts @@ -7,7 +7,7 @@ import { type SuggestionCandidate, type Occurrence, } from './types' -export { THRESHOLDS } from './types' + const distinct = (rows: Occurrence[]): Occurrence[] => [ ...new Map(rows.map((r) => [r.articleId, r])).values(), ] diff --git a/cms/src/lib/tenant/fixtures.ts b/cms/src/lib/tenant/fixtures.ts index f8fd6619..0f482e52 100644 --- a/cms/src/lib/tenant/fixtures.ts +++ b/cms/src/lib/tenant/fixtures.ts @@ -295,7 +295,8 @@ export const positioningFixtureDoc = (): Record => ({ * golden prompt test a coin toss. * * The re-check dates sit in 2027 so the demo bank is usable rather than - * expired, and one row is deliberately rejected with a replacement, because the + * expired (`evidenceBankFixtureDoc` rolls them forward for a workspace created + * close to or after them), and one row is deliberately rejected with a replacement, because the * "never state these" half is the part an operator has to see working to * believe. */ @@ -377,18 +378,38 @@ export const EVIDENCE_BANK_FIXTURE: EvidenceBankContent = { ], } +/** How far ahead a demo claim's re-check date is kept, in days. */ +const DEMO_RECHECK_LEAD_DAYS = 180 + +/** + * A demo claim's re-check date, never closer than `DEMO_RECHECK_LEAD_DAYS`. + * + * `EVIDENCE_BANK_FIXTURE` carries fixed 2027 dates, which is right for the + * prompt tests that pin `asOf` and wrong for a workspace created later: a demo + * bank installed after those dates would arrive already expired, with nothing + * usable for the writer. The stored copy keeps the fixture's date while it is + * comfortably ahead and rolls forward once it is not. + */ +function demoRecheckAt(fixtureDate: string, now: Date): string | null { + if (!fixtureDate) return null + const floor = new Date(now.getTime() + DEMO_RECHECK_LEAD_DAYS * 86_400_000) + .toISOString() + .slice(0, 10) + return fixtureDate > floor ? fixtureDate : floor +} + /** * The evidence-bank fixture as the global stores it, with the counter that * makes the pre-assigned refs safe: the next row an operator adds gets `E8`, * not a second `E1`. */ -export const evidenceBankFixtureDoc = (): Record => ({ +export const evidenceBankFixtureDoc = (now: Date = new Date()): Record => ({ verifiedClaims: EVIDENCE_BANK_FIXTURE.verifiedClaims.map((row) => ({ ...row, clearedSurfaces: [...row.clearedSurfaces], // Payload rejects '' for a date column. sourceDate: row.sourceDate || null, - recheckAt: row.recheckAt || null, + recheckAt: demoRecheckAt(row.recheckAt, now), verificationDepth: row.verificationDepth || null, })), facts: EVIDENCE_BANK_FIXTURE.facts.map((row) => ({ diff --git a/cms/src/migrations/20260826_015044_onboarding_pipeline_runs.ts b/cms/src/migrations/20260826_015044_onboarding_pipeline_runs.ts index 13cb8ccc..e811c4c2 100644 --- a/cms/src/migrations/20260826_015044_onboarding_pipeline_runs.ts +++ b/cms/src/migrations/20260826_015044_onboarding_pipeline_runs.ts @@ -107,9 +107,9 @@ export async function down({ db }: MigrateDownArgs): Promise { DROP TABLE "pipeline_runs_rels" CASCADE; DROP TABLE "payload_jobs_log" CASCADE; DROP TABLE "payload_jobs" CASCADE; - ALTER TABLE "payload_locked_documents_rels" DROP CONSTRAINT "payload_locked_documents_rels_pipeline_runs_fk"; + ALTER TABLE "payload_locked_documents_rels" DROP CONSTRAINT IF EXISTS "payload_locked_documents_rels_pipeline_runs_fk"; - DROP INDEX "payload_locked_documents_rels_pipeline_runs_id_idx"; + DROP INDEX IF EXISTS "payload_locked_documents_rels_pipeline_runs_id_idx"; ALTER TABLE "payload_locked_documents_rels" DROP COLUMN "pipeline_runs_id"; DROP TYPE "public"."enum_pipeline_runs_source"; DROP TYPE "public"."enum_pipeline_runs_status"; diff --git a/cms/src/migrations/20260911_152559_pipeline_runs_drop_onboarding_source.json b/cms/src/migrations/20260911_152559_pipeline_runs_drop_onboarding_source.json deleted file mode 100644 index b7f7e6f0..00000000 --- a/cms/src/migrations/20260911_152559_pipeline_runs_drop_onboarding_source.json +++ /dev/null @@ -1,9343 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users_sessions": { - "name": "users_sessions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "users_sessions_order_idx": { - "name": "users_sessions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_sessions_parent_id_idx": { - "name": "users_sessions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "users_sessions_parent_id_fk": { - "name": "users_sessions_parent_id_fk", - "tableFrom": "users_sessions", - "tableTo": "users", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "email": { - "name": "email", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "reset_password_token": { - "name": "reset_password_token", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "reset_password_expiration": { - "name": "reset_password_expiration", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "salt": { - "name": "salt", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "hash": { - "name": "hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "login_attempts": { - "name": "login_attempts", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "lock_until": { - "name": "lock_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "users_updated_at_idx": { - "name": "users_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_created_at_idx": { - "name": "users_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_email_idx": { - "name": "users_email_idx", - "columns": [ - { - "expression": "email", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.media": { - "name": "media", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "media_updated_at_idx": { - "name": "media_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_created_at_idx": { - "name": "media_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_filename_idx": { - "name": "media_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_dos": { - "name": "templates_dos", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_dos_order_idx": { - "name": "templates_dos_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_dos_parent_id_idx": { - "name": "templates_dos_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_dos_parent_id_fk": { - "name": "templates_dos_parent_id_fk", - "tableFrom": "templates_dos", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_donts": { - "name": "templates_donts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_donts_order_idx": { - "name": "templates_donts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_donts_parent_id_idx": { - "name": "templates_donts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_donts_parent_id_fk": { - "name": "templates_donts_parent_id_fk", - "tableFrom": "templates_donts", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_required_sections": { - "name": "templates_required_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_required_sections_order_idx": { - "name": "templates_required_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_required_sections_parent_id_idx": { - "name": "templates_required_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_required_sections_parent_id_fk": { - "name": "templates_required_sections_parent_id_fk", - "tableFrom": "templates_required_sections", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates": { - "name": "templates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "intent": { - "name": "intent", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "outline": { - "name": "outline", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "example": { - "name": "example", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "seo_spec_title_tag_max_length": { - "name": "seo_spec_title_tag_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 60 - }, - "seo_spec_meta_description_max_length": { - "name": "seo_spec_meta_description_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 160 - }, - "seo_spec_heading_structure_rules": { - "name": "seo_spec_heading_structure_rules", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_required": { - "name": "seo_spec_faq_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_min_questions": { - "name": "seo_spec_faq_min_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_max_questions": { - "name": "seo_spec_faq_max_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_og_tags_required": { - "name": "seo_spec_og_tags_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "templates_name_idx": { - "name": "templates_name_idx", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_updated_at_idx": { - "name": "templates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_created_at_idx": { - "name": "templates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_secondary_keywords": { - "name": "articles_secondary_keywords", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_secondary_keywords_order_idx": { - "name": "articles_secondary_keywords_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_secondary_keywords_parent_id_idx": { - "name": "articles_secondary_keywords_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_secondary_keywords_parent_id_fk": { - "name": "articles_secondary_keywords_parent_id_fk", - "tableFrom": "articles_secondary_keywords", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_common_subtopics": { - "name": "articles_research_common_subtopics", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_common_subtopics_order_idx": { - "name": "articles_research_common_subtopics_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_common_subtopics_parent_id_idx": { - "name": "articles_research_common_subtopics_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_common_subtopics_parent_id_fk": { - "name": "articles_research_common_subtopics_parent_id_fk", - "tableFrom": "articles_research_common_subtopics", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_related_questions": { - "name": "articles_research_related_questions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_related_questions_order_idx": { - "name": "articles_research_related_questions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_related_questions_parent_id_idx": { - "name": "articles_research_related_questions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_related_questions_parent_id_fk": { - "name": "articles_research_related_questions_parent_id_fk", - "tableFrom": "articles_research_related_questions", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_brief_sections": { - "name": "articles_brief_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "enum_articles_brief_sections_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "articles_brief_sections_order_idx": { - "name": "articles_brief_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_brief_sections_parent_id_idx": { - "name": "articles_brief_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_brief_sections_parent_id_fk": { - "name": "articles_brief_sections_parent_id_fk", - "tableFrom": "articles_brief_sections", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_faq_items": { - "name": "articles_faq_items", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "answer": { - "name": "answer", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_faq_items_order_idx": { - "name": "articles_faq_items_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_faq_items_parent_id_idx": { - "name": "articles_faq_items_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_faq_items_parent_id_fk": { - "name": "articles_faq_items_parent_id_fk", - "tableFrom": "articles_faq_items", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "archived": { - "name": "archived", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "slug": { - "name": "slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icp_id": { - "name": "icp_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_ranking_pages_summary": { - "name": "research_ranking_pages_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "research_snapshot_id": { - "name": "research_snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_query_cluster": { - "name": "research_query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_facets": { - "name": "research_facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_gaps": { - "name": "research_gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_angle": { - "name": "brief_angle", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_audience": { - "name": "brief_audience", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_must_cover": { - "name": "brief_must_cover", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_opportunities": { - "name": "brief_opportunities", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_notes": { - "name": "brief_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_approved_at": { - "name": "brief_approved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "brief_approved_by": { - "name": "brief_approved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "body": { - "name": "body", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "title_tag": { - "name": "title_tag", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta_description": { - "name": "meta_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_title": { - "name": "og_title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_description": { - "name": "og_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_image": { - "name": "og_image", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "enum_articles_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'topic_selected'" - }, - "publish_at": { - "name": "publish_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "evidence_citations": { - "name": "evidence_citations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_passed": { - "name": "qa_results_structural_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_violations": { - "name": "qa_results_structural_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_passed": { - "name": "qa_results_fact_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_notes": { - "name": "qa_results_fact_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_sources": { - "name": "qa_results_fact_check_sources", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_passed": { - "name": "qa_results_qualitative_review_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_notes": { - "name": "qa_results_qualitative_review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_score": { - "name": "qa_results_qualitative_review_voice_score", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_notes": { - "name": "qa_results_qualitative_review_voice_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_not_trait_violations": { - "name": "qa_results_qualitative_review_not_trait_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_passed": { - "name": "qa_results_evidence_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_notes": { - "name": "qa_results_evidence_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_claims": { - "name": "qa_results_evidence_check_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "information_gain_run_id": { - "name": "information_gain_run_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_decision": { - "name": "information_gain_decision", - "type": "enum_articles_information_gain_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_policy_version": { - "name": "information_gain_policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "information_gain_consensus_coverage": { - "name": "information_gain_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_gain_units": { - "name": "information_gain_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verification_ratio": { - "name": "information_gain_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_internal_duplication_rate": { - "name": "information_gain_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_novel_claims": { - "name": "information_gain_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_scored_at": { - "name": "information_gain_scored_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "generation_model": { - "name": "generation_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_models": { - "name": "qa_models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "total_cost_usd": { - "name": "total_cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_notes": { - "name": "review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_justification": { - "name": "review_justification", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_notes": { - "name": "revision_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_count": { - "name": "revision_count", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "published_at": { - "name": "published_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "articles_archived_idx": { - "name": "articles_archived_idx", - "columns": [ - { - "expression": "archived", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_template_idx": { - "name": "articles_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_icp_idx": { - "name": "articles_icp_idx", - "columns": [ - { - "expression": "icp_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_research_snapshot_idx": { - "name": "articles_research_research_snapshot_idx", - "columns": [ - { - "expression": "research_snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_publish_at_idx": { - "name": "articles_publish_at_idx", - "columns": [ - { - "expression": "publish_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_information_gain_information_gain_run_idx": { - "name": "articles_information_gain_information_gain_run_idx", - "columns": [ - { - "expression": "information_gain_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_updated_at_idx": { - "name": "articles_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_created_at_idx": { - "name": "articles_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_template_id_templates_id_fk": { - "name": "articles_template_id_templates_id_fk", - "tableFrom": "articles", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_icp_id_icps_id_fk": { - "name": "articles_icp_id_icps_id_fk", - "tableFrom": "articles", - "tableTo": "icps", - "columnsFrom": [ - "icp_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_research_snapshot_id_corpus_snapshots_id_fk": { - "name": "articles_research_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "articles", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "research_snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_information_gain_run_id_information_gain_runs_id_fk": { - "name": "articles_information_gain_run_id_information_gain_runs_id_fk", - "tableFrom": "articles", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_run_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cost_log": { - "name": "cost_log", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "enum_cost_log_stage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "provider": { - "name": "provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "model": { - "name": "model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "input_tokens": { - "name": "input_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "output_tokens": { - "name": "output_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "web_search_requests": { - "name": "web_search_requests", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "request": { - "name": "request", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cost_log_pipeline_run_id_idx": { - "name": "cost_log_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_article_idx": { - "name": "cost_log_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_updated_at_idx": { - "name": "cost_log_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_created_at_idx": { - "name": "cost_log_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "cost_log_article_id_articles_id_fk": { - "name": "cost_log_article_id_articles_id_fk", - "tableFrom": "cost_log", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.article_audit": { - "name": "article_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_article_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "article_audit_article_idx": { - "name": "article_audit_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_event_idx": { - "name": "article_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_pipeline_run_id_idx": { - "name": "article_audit_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_updated_at_idx": { - "name": "article_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_created_at_idx": { - "name": "article_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "article_audit_article_id_articles_id_fk": { - "name": "article_audit_article_id_articles_id_fk", - "tableFrom": "article_audit", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_core_values": { - "name": "brand_voices_core_values", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "value": { - "name": "value", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_core_values_order_idx": { - "name": "brand_voices_core_values_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_core_values_parent_id_idx": { - "name": "brand_voices_core_values_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_core_values_parent_id_fk": { - "name": "brand_voices_core_values_parent_id_fk", - "tableFrom": "brand_voices_core_values", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_voice_adjectives": { - "name": "brand_voices_voice_adjectives", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "adjective": { - "name": "adjective", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "do_example": { - "name": "do_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "dont_example": { - "name": "dont_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_voice_adjectives_order_idx": { - "name": "brand_voices_voice_adjectives_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_voice_adjectives_parent_id_idx": { - "name": "brand_voices_voice_adjectives_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_voice_adjectives_parent_id_fk": { - "name": "brand_voices_voice_adjectives_parent_id_fk", - "tableFrom": "brand_voices_voice_adjectives", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_not_traits": { - "name": "brand_voices_not_traits", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "trait": { - "name": "trait", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "boundary_note": { - "name": "boundary_note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_not_traits_order_idx": { - "name": "brand_voices_not_traits_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_not_traits_parent_id_idx": { - "name": "brand_voices_not_traits_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_not_traits_parent_id_fk": { - "name": "brand_voices_not_traits_parent_id_fk", - "tableFrom": "brand_voices_not_traits", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_preferred_words": { - "name": "brand_voices_preferred_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_preferred_words_order_idx": { - "name": "brand_voices_preferred_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_preferred_words_parent_id_idx": { - "name": "brand_voices_preferred_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_preferred_words_parent_id_fk": { - "name": "brand_voices_preferred_words_parent_id_fk", - "tableFrom": "brand_voices_preferred_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_banned_words": { - "name": "brand_voices_banned_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_banned_words_order_idx": { - "name": "brand_voices_banned_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_banned_words_parent_id_idx": { - "name": "brand_voices_banned_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_banned_words_parent_id_fk": { - "name": "brand_voices_banned_words_parent_id_fk", - "tableFrom": "brand_voices_banned_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_samples": { - "name": "brand_voices_samples", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "brand_voices_samples_order_idx": { - "name": "brand_voices_samples_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_samples_parent_id_idx": { - "name": "brand_voices_samples_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_samples_parent_id_fk": { - "name": "brand_voices_samples_parent_id_fk", - "tableFrom": "brand_voices_samples", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices": { - "name": "brand_voices", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_brand_voices_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "source": { - "name": "source", - "type": "enum_brand_voices_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'onboarding'" - }, - "source_file_id": { - "name": "source_file_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "onboarding_step": { - "name": "onboarding_step", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_one_liner": { - "name": "essence_one_liner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_mission": { - "name": "essence_mission", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_description": { - "name": "audience_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_language_level": { - "name": "audience_language_level", - "type": "enum_brand_voices_audience_language_level", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "audience_interests": { - "name": "audience_interests", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_needs": { - "name": "audience_needs", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "persona": { - "name": "persona", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "voice_in_own_words": { - "name": "voice_in_own_words", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "tone_formality": { - "name": "tone_formality", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_warmth": { - "name": "tone_warmth", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_boldness": { - "name": "tone_boldness", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_energy": { - "name": "tone_energy", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "extraction_model": { - "name": "extraction_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_provider": { - "name": "extraction_provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_extracted_at": { - "name": "extraction_extracted_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "extraction_source_chars": { - "name": "extraction_source_chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "extraction_warnings": { - "name": "extraction_warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "brand_voices_status_idx": { - "name": "brand_voices_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_source_file_idx": { - "name": "brand_voices_source_file_idx", - "columns": [ - { - "expression": "source_file_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_updated_at_idx": { - "name": "brand_voices_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_created_at_idx": { - "name": "brand_voices_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_source_file_id_brand_voice_files_id_fk": { - "name": "brand_voices_source_file_id_brand_voice_files_id_fk", - "tableFrom": "brand_voices", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "source_file_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voice_files": { - "name": "brand_voice_files", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voice_files_updated_at_idx": { - "name": "brand_voice_files_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_created_at_idx": { - "name": "brand_voice_files_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_filename_idx": { - "name": "brand_voice_files_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains_evidence": { - "name": "icps_pains_evidence", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_evidence_order_idx": { - "name": "icps_pains_evidence_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_evidence_parent_id_idx": { - "name": "icps_pains_evidence_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_evidence_parent_id_fk": { - "name": "icps_pains_evidence_parent_id_fk", - "tableFrom": "icps_pains_evidence", - "tableTo": "icps_pains", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains": { - "name": "icps_pains", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_pains_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_order_idx": { - "name": "icps_pains_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_parent_id_idx": { - "name": "icps_pains_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_parent_id_fk": { - "name": "icps_pains_parent_id_fk", - "tableFrom": "icps_pains", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_solution_sample_lines": { - "name": "icps_solution_sample_lines", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_solution_sample_lines_order_idx": { - "name": "icps_solution_sample_lines_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_solution_sample_lines_parent_id_idx": { - "name": "icps_solution_sample_lines_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_solution_sample_lines_parent_id_fk": { - "name": "icps_solution_sample_lines_parent_id_fk", - "tableFrom": "icps_solution_sample_lines", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_competition": { - "name": "icps_competition", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "competitor": { - "name": "competitor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claimed_at": { - "name": "claimed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_competition_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_competition_order_idx": { - "name": "icps_competition_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_competition_parent_id_idx": { - "name": "icps_competition_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_competition_parent_id_fk": { - "name": "icps_competition_parent_id_fk", - "tableFrom": "icps_competition", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_channels": { - "name": "icps_channels", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "channel": { - "name": "channel", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_channels_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_channels_order_idx": { - "name": "icps_channels_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_channels_parent_id_idx": { - "name": "icps_channels_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_channels_parent_id_fk": { - "name": "icps_channels_parent_id_fk", - "tableFrom": "icps_channels", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_churn_triggers": { - "name": "icps_churn_triggers", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_churn_triggers_order_idx": { - "name": "icps_churn_triggers_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_churn_triggers_parent_id_idx": { - "name": "icps_churn_triggers_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_churn_triggers_parent_id_fk": { - "name": "icps_churn_triggers_parent_id_fk", - "tableFrom": "icps_churn_triggers", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_not_our_user": { - "name": "icps_not_our_user", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_not_our_user_order_idx": { - "name": "icps_not_our_user_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_not_our_user_parent_id_idx": { - "name": "icps_not_our_user_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_not_our_user_parent_id_fk": { - "name": "icps_not_our_user_parent_id_fk", - "tableFrom": "icps_not_our_user", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps": { - "name": "icps", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_icps_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "primary": { - "name": "primary", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "who": { - "name": "who", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_text": { - "name": "motivation_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_hypothesis": { - "name": "motivation_hypothesis", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "motivation_confidence": { - "name": "motivation_confidence", - "type": "enum_icps_motivation_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "solution_mechanism": { - "name": "solution_mechanism", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "solution_confidence": { - "name": "solution_confidence", - "type": "enum_icps_solution_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "why_us_text": { - "name": "why_us_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "why_us_confidence": { - "name": "why_us_confidence", - "type": "enum_icps_why_us_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "icps_status_idx": { - "name": "icps_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_primary_idx": { - "name": "icps_primary_idx", - "columns": [ - { - "expression": "primary", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_updated_at_idx": { - "name": "icps_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_created_at_idx": { - "name": "icps_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit": { - "name": "governance_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "subject_global": { - "name": "subject_global", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_governance_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "governance_audit_subject_global_idx": { - "name": "governance_audit_subject_global_idx", - "columns": [ - { - "expression": "subject_global", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_event_idx": { - "name": "governance_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_updated_at_idx": { - "name": "governance_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_created_at_idx": { - "name": "governance_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit_rels": { - "name": "governance_audit_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "governance_audit_rels_order_idx": { - "name": "governance_audit_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_parent_idx": { - "name": "governance_audit_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_path_idx": { - "name": "governance_audit_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_brand_voices_id_idx": { - "name": "governance_audit_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_evidence_sources_id_idx": { - "name": "governance_audit_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_icps_id_idx": { - "name": "governance_audit_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "governance_audit_rels_parent_fk": { - "name": "governance_audit_rels_parent_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_brand_voices_fk": { - "name": "governance_audit_rels_brand_voices_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_evidence_sources_fk": { - "name": "governance_audit_rels_evidence_sources_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_icps_fk": { - "name": "governance_audit_rels_icps_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_sources": { - "name": "evidence_sources", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "quality_class": { - "name": "quality_class", - "type": "enum_evidence_sources_quality_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active": { - "name": "active", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_sources_domain_idx": { - "name": "evidence_sources_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_updated_at_idx": { - "name": "evidence_sources_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_created_at_idx": { - "name": "evidence_sources_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_source_candidates": { - "name": "evidence_source_candidates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_source_candidates_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "suggested_class": { - "name": "suggested_class", - "type": "enum_evidence_source_candidates_suggested_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "citation_count": { - "name": "citation_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "serp_count": { - "name": "serp_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "last_seen_at": { - "name": "last_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sightings": { - "name": "sightings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "resolved_source_id": { - "name": "resolved_source_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_source_candidates_domain_idx": { - "name": "evidence_source_candidates_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_status_idx": { - "name": "evidence_source_candidates_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_last_seen_at_idx": { - "name": "evidence_source_candidates_last_seen_at_idx", - "columns": [ - { - "expression": "last_seen_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_resolved_source_idx": { - "name": "evidence_source_candidates_resolved_source_idx", - "columns": [ - { - "expression": "resolved_source_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_updated_at_idx": { - "name": "evidence_source_candidates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_created_at_idx": { - "name": "evidence_source_candidates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk": { - "name": "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk", - "tableFrom": "evidence_source_candidates", - "tableTo": "evidence_sources", - "columnsFrom": [ - "resolved_source_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_pages": { - "name": "corpus_snapshots_pages", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "position": { - "name": "position", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "fetch_status": { - "name": "fetch_status", - "type": "enum_corpus_snapshots_pages_fetch_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "failure_reason": { - "name": "failure_reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "chars": { - "name": "chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "text_hash": { - "name": "text_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "unverified_excerpt_count": { - "name": "unverified_excerpt_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_pages_order_idx": { - "name": "corpus_snapshots_pages_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pages_parent_id_idx": { - "name": "corpus_snapshots_pages_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_pages_parent_id_fk": { - "name": "corpus_snapshots_pages_parent_id_fk", - "tableFrom": "corpus_snapshots_pages", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_internal_corpus": { - "name": "corpus_snapshots_internal_corpus", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "article_updated_at": { - "name": "article_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_internal_corpus_order_idx": { - "name": "corpus_snapshots_internal_corpus_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_parent_id_idx": { - "name": "corpus_snapshots_internal_corpus_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_article_idx": { - "name": "corpus_snapshots_internal_corpus_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_internal_corpus_article_id_articles_id_fk": { - "name": "corpus_snapshots_internal_corpus_article_id_articles_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "corpus_snapshots_internal_corpus_parent_id_fk": { - "name": "corpus_snapshots_internal_corpus_parent_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots": { - "name": "corpus_snapshots", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "keyword_key": { - "name": "keyword_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "captured_at": { - "name": "captured_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_corpus_snapshots_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "snapshot_hash": { - "name": "snapshot_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "query_cluster": { - "name": "query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_claims": { - "name": "baseline_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "facets": { - "name": "facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "gaps": { - "name": "gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_doc_count": { - "name": "baseline_doc_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "failed_page_count": { - "name": "failed_page_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "corpus_snapshots_keyword_idx": { - "name": "corpus_snapshots_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_keyword_key_idx": { - "name": "corpus_snapshots_keyword_key_idx", - "columns": [ - { - "expression": "keyword_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pipeline_run_id_idx": { - "name": "corpus_snapshots_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_updated_at_idx": { - "name": "corpus_snapshots_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_created_at_idx": { - "name": "corpus_snapshots_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topic_searches": { - "name": "topic_searches", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "seed": { - "name": "seed", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "seed_key": { - "name": "seed_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "fetched_at": { - "name": "fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "result_count": { - "name": "result_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "candidates": { - "name": "candidates", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "topic_searches_seed_key_idx": { - "name": "topic_searches_seed_key_idx", - "columns": [ - { - "expression": "seed_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_fetched_at_idx": { - "name": "topic_searches_fetched_at_idx", - "columns": [ - { - "expression": "fetched_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_updated_at_idx": { - "name": "topic_searches_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_created_at_idx": { - "name": "topic_searches_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_runs": { - "name": "information_gain_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "snapshot_id": { - "name": "snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "policy_version": { - "name": "policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "policy": { - "name": "policy", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "decision": { - "name": "decision", - "type": "enum_information_gain_runs_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "reasons": { - "name": "reasons", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_available": { - "name": "baseline_available", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "calibrated": { - "name": "calibrated", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "scores_consensus_coverage": { - "name": "scores_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_potential_gain_units": { - "name": "scores_potential_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_units": { - "name": "scores_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verification_ratio": { - "name": "scores_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_density": { - "name": "scores_verified_gain_density", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_facet_gain_coverage": { - "name": "scores_facet_gain_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_internal_duplication_rate": { - "name": "scores_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_total_claims": { - "name": "claim_summary_total_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_materially_novel_claims": { - "name": "claim_summary_materially_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_verified_novel_claims": { - "name": "claim_summary_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_unsupported_novel_claims": { - "name": "claim_summary_unsupported_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_contradictory_claims": { - "name": "claim_summary_contradictory_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_first_party_claims": { - "name": "claim_summary_first_party_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_ids_blocked": { - "name": "claim_ids_blocked", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_review": { - "name": "claim_ids_review", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_materially_novel": { - "name": "claim_ids_materially_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_verified_novel": { - "name": "claim_ids_verified_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claims": { - "name": "claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "token_count": { - "name": "token_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "draft_updated_at": { - "name": "draft_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "information_gain_runs_article_idx": { - "name": "information_gain_runs_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_pipeline_run_id_idx": { - "name": "information_gain_runs_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_snapshot_idx": { - "name": "information_gain_runs_snapshot_idx", - "columns": [ - { - "expression": "snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_decision_idx": { - "name": "information_gain_runs_decision_idx", - "columns": [ - { - "expression": "decision", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_updated_at_idx": { - "name": "information_gain_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_created_at_idx": { - "name": "information_gain_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "information_gain_runs_article_id_articles_id_fk": { - "name": "information_gain_runs_article_id_articles_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "information_gain_runs_snapshot_id_corpus_snapshots_id_fk": { - "name": "information_gain_runs_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs": { - "name": "pipeline_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "run_id": { - "name": "run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "enum_pipeline_runs_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_pipeline_runs_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "mode": { - "name": "mode", - "type": "enum_pipeline_runs_mode", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "requested_count": { - "name": "requested_count", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "config_fingerprint": { - "name": "config_fingerprint", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "config_snapshot": { - "name": "config_snapshot", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "final_statuses": { - "name": "final_statuses", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "warnings": { - "name": "warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "error_summary": { - "name": "error_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "requested_by": { - "name": "requested_by", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "started_at": { - "name": "started_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "pipeline_runs_run_id_idx": { - "name": "pipeline_runs_run_id_idx", - "columns": [ - { - "expression": "run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_status_idx": { - "name": "pipeline_runs_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_template_idx": { - "name": "pipeline_runs_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_config_fingerprint_idx": { - "name": "pipeline_runs_config_fingerprint_idx", - "columns": [ - { - "expression": "config_fingerprint", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_updated_at_idx": { - "name": "pipeline_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_created_at_idx": { - "name": "pipeline_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_template_id_templates_id_fk": { - "name": "pipeline_runs_template_id_templates_id_fk", - "tableFrom": "pipeline_runs", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs_rels": { - "name": "pipeline_runs_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "pipeline_runs_rels_order_idx": { - "name": "pipeline_runs_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_parent_idx": { - "name": "pipeline_runs_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_path_idx": { - "name": "pipeline_runs_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_articles_id_idx": { - "name": "pipeline_runs_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_rels_parent_fk": { - "name": "pipeline_runs_rels_parent_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "pipeline_runs_rels_articles_fk": { - "name": "pipeline_runs_rels_articles_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_kv": { - "name": "payload_kv", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "data": { - "name": "data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "payload_kv_key_idx": { - "name": "payload_kv_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_log": { - "name": "payload_jobs_log", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "executed_at": { - "name": "executed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_log_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "task_i_d": { - "name": "task_i_d", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "output": { - "name": "output", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "state": { - "name": "state", - "type": "enum_payload_jobs_log_state", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_jobs_log_order_idx": { - "name": "payload_jobs_log_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_log_parent_id_idx": { - "name": "payload_jobs_log_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_jobs_log_parent_id_fk": { - "name": "payload_jobs_log_parent_id_fk", - "tableFrom": "payload_jobs_log", - "tableTo": "payload_jobs", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs": { - "name": "payload_jobs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "total_tried": { - "name": "total_tried", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "has_error": { - "name": "has_error", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "queue": { - "name": "queue", - "type": "varchar", - "primaryKey": false, - "notNull": false, - "default": "'default'" - }, - "wait_until": { - "name": "wait_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "processing": { - "name": "processing", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "concurrency_key": { - "name": "concurrency_key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta": { - "name": "meta", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_jobs_completed_at_idx": { - "name": "payload_jobs_completed_at_idx", - "columns": [ - { - "expression": "completed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_total_tried_idx": { - "name": "payload_jobs_total_tried_idx", - "columns": [ - { - "expression": "total_tried", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_has_error_idx": { - "name": "payload_jobs_has_error_idx", - "columns": [ - { - "expression": "has_error", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_task_slug_idx": { - "name": "payload_jobs_task_slug_idx", - "columns": [ - { - "expression": "task_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_queue_idx": { - "name": "payload_jobs_queue_idx", - "columns": [ - { - "expression": "queue", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_wait_until_idx": { - "name": "payload_jobs_wait_until_idx", - "columns": [ - { - "expression": "wait_until", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_processing_idx": { - "name": "payload_jobs_processing_idx", - "columns": [ - { - "expression": "processing", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_concurrency_key_idx": { - "name": "payload_jobs_concurrency_key_idx", - "columns": [ - { - "expression": "concurrency_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_updated_at_idx": { - "name": "payload_jobs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_created_at_idx": { - "name": "payload_jobs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents": { - "name": "payload_locked_documents", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "global_slug": { - "name": "global_slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_locked_documents_global_slug_idx": { - "name": "payload_locked_documents_global_slug_idx", - "columns": [ - { - "expression": "global_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_updated_at_idx": { - "name": "payload_locked_documents_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_created_at_idx": { - "name": "payload_locked_documents_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents_rels": { - "name": "payload_locked_documents_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "media_id": { - "name": "media_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "templates_id": { - "name": "templates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "cost_log_id": { - "name": "cost_log_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "article_audit_id": { - "name": "article_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voice_files_id": { - "name": "brand_voice_files_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "governance_audit_id": { - "name": "governance_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_source_candidates_id": { - "name": "evidence_source_candidates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "corpus_snapshots_id": { - "name": "corpus_snapshots_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "topic_searches_id": { - "name": "topic_searches_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_runs_id": { - "name": "information_gain_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "pipeline_runs_id": { - "name": "pipeline_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_locked_documents_rels_order_idx": { - "name": "payload_locked_documents_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_parent_idx": { - "name": "payload_locked_documents_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_path_idx": { - "name": "payload_locked_documents_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_users_id_idx": { - "name": "payload_locked_documents_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_media_id_idx": { - "name": "payload_locked_documents_rels_media_id_idx", - "columns": [ - { - "expression": "media_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_templates_id_idx": { - "name": "payload_locked_documents_rels_templates_id_idx", - "columns": [ - { - "expression": "templates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_articles_id_idx": { - "name": "payload_locked_documents_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_cost_log_id_idx": { - "name": "payload_locked_documents_rels_cost_log_id_idx", - "columns": [ - { - "expression": "cost_log_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_article_audit_id_idx": { - "name": "payload_locked_documents_rels_article_audit_id_idx", - "columns": [ - { - "expression": "article_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voices_id_idx": { - "name": "payload_locked_documents_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voice_files_id_idx": { - "name": "payload_locked_documents_rels_brand_voice_files_id_idx", - "columns": [ - { - "expression": "brand_voice_files_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_icps_id_idx": { - "name": "payload_locked_documents_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_governance_audit_id_idx": { - "name": "payload_locked_documents_rels_governance_audit_id_idx", - "columns": [ - { - "expression": "governance_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_sources_id_idx": { - "name": "payload_locked_documents_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_source_candidates_idx": { - "name": "payload_locked_documents_rels_evidence_source_candidates_idx", - "columns": [ - { - "expression": "evidence_source_candidates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_corpus_snapshots_id_idx": { - "name": "payload_locked_documents_rels_corpus_snapshots_id_idx", - "columns": [ - { - "expression": "corpus_snapshots_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_topic_searches_id_idx": { - "name": "payload_locked_documents_rels_topic_searches_id_idx", - "columns": [ - { - "expression": "topic_searches_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_information_gain_runs_id_idx": { - "name": "payload_locked_documents_rels_information_gain_runs_id_idx", - "columns": [ - { - "expression": "information_gain_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_pipeline_runs_id_idx": { - "name": "payload_locked_documents_rels_pipeline_runs_id_idx", - "columns": [ - { - "expression": "pipeline_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_locked_documents_rels_parent_fk": { - "name": "payload_locked_documents_rels_parent_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "payload_locked_documents", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_users_fk": { - "name": "payload_locked_documents_rels_users_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_media_fk": { - "name": "payload_locked_documents_rels_media_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "media", - "columnsFrom": [ - "media_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_templates_fk": { - "name": "payload_locked_documents_rels_templates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "templates", - "columnsFrom": [ - "templates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_articles_fk": { - "name": "payload_locked_documents_rels_articles_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_cost_log_fk": { - "name": "payload_locked_documents_rels_cost_log_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "cost_log", - "columnsFrom": [ - "cost_log_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_article_audit_fk": { - "name": "payload_locked_documents_rels_article_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "article_audit", - "columnsFrom": [ - "article_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voices_fk": { - "name": "payload_locked_documents_rels_brand_voices_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voice_files_fk": { - "name": "payload_locked_documents_rels_brand_voice_files_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "brand_voice_files_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_icps_fk": { - "name": "payload_locked_documents_rels_icps_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_governance_audit_fk": { - "name": "payload_locked_documents_rels_governance_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "governance_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_sources_fk": { - "name": "payload_locked_documents_rels_evidence_sources_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_source_candidates_fk": { - "name": "payload_locked_documents_rels_evidence_source_candidates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_source_candidates", - "columnsFrom": [ - "evidence_source_candidates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_corpus_snapshots_fk": { - "name": "payload_locked_documents_rels_corpus_snapshots_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "corpus_snapshots_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_topic_searches_fk": { - "name": "payload_locked_documents_rels_topic_searches_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "topic_searches", - "columnsFrom": [ - "topic_searches_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_information_gain_runs_fk": { - "name": "payload_locked_documents_rels_information_gain_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_pipeline_runs_fk": { - "name": "payload_locked_documents_rels_pipeline_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "pipeline_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences": { - "name": "payload_preferences", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "value": { - "name": "value", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_preferences_key_idx": { - "name": "payload_preferences_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_updated_at_idx": { - "name": "payload_preferences_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_created_at_idx": { - "name": "payload_preferences_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences_rels": { - "name": "payload_preferences_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_preferences_rels_order_idx": { - "name": "payload_preferences_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_parent_idx": { - "name": "payload_preferences_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_path_idx": { - "name": "payload_preferences_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_users_id_idx": { - "name": "payload_preferences_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_preferences_rels_parent_fk": { - "name": "payload_preferences_rels_parent_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "payload_preferences", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_preferences_rels_users_fk": { - "name": "payload_preferences_rels_users_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_migrations": { - "name": "payload_migrations", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "batch": { - "name": "batch", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_migrations_updated_at_idx": { - "name": "payload_migrations_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_migrations_created_at_idx": { - "name": "payload_migrations_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile_competitors": { - "name": "workspace_profile_competitors", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "workspace_profile_competitors_order_idx": { - "name": "workspace_profile_competitors_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "workspace_profile_competitors_parent_id_idx": { - "name": "workspace_profile_competitors_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "workspace_profile_competitors_parent_id_fk": { - "name": "workspace_profile_competitors_parent_id_fk", - "tableFrom": "workspace_profile_competitors", - "tableTo": "workspace_profile", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile": { - "name": "workspace_profile", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "company_name": { - "name": "company_name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "target_domain": { - "name": "target_domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_notes": { - "name": "site_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_pages": { - "name": "site_pages", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "site_pages_fetched_at": { - "name": "site_pages_fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_core_claims": { - "name": "positioning_core_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "evidence_ref": { - "name": "evidence_ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_core_claims_order_idx": { - "name": "positioning_core_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_core_claims_parent_id_idx": { - "name": "positioning_core_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_core_claims_parent_id_fk": { - "name": "positioning_core_claims_parent_id_fk", - "tableFrom": "positioning_core_claims", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_pillars": { - "name": "positioning_pillars", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "one_line": { - "name": "one_line", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "carries": { - "name": "carries", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_pillars_order_idx": { - "name": "positioning_pillars_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_pillars_parent_id_idx": { - "name": "positioning_pillars_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_pillars_parent_id_fk": { - "name": "positioning_pillars_parent_id_fk", - "tableFrom": "positioning_pillars", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_descriptor_ladder": { - "name": "positioning_descriptor_ladder", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "descriptor": { - "name": "descriptor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_descriptor_ladder_order_idx": { - "name": "positioning_descriptor_ladder_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_descriptor_ladder_parent_id_idx": { - "name": "positioning_descriptor_ladder_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_descriptor_ladder_parent_id_fk": { - "name": "positioning_descriptor_ladder_parent_id_fk", - "tableFrom": "positioning_descriptor_ladder", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_reach_for": { - "name": "positioning_vocabulary_reach_for", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_reach_for_order_idx": { - "name": "positioning_vocabulary_reach_for_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_reach_for_parent_id_idx": { - "name": "positioning_vocabulary_reach_for_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_reach_for_parent_id_fk": { - "name": "positioning_vocabulary_reach_for_parent_id_fk", - "tableFrom": "positioning_vocabulary_reach_for", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_avoid": { - "name": "positioning_vocabulary_avoid", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_avoid_order_idx": { - "name": "positioning_vocabulary_avoid_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_avoid_parent_id_idx": { - "name": "positioning_vocabulary_avoid_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_avoid_parent_id_fk": { - "name": "positioning_vocabulary_avoid_parent_id_fk", - "tableFrom": "positioning_vocabulary_avoid", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_open_rulings": { - "name": "positioning_open_rulings", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_positioning_open_rulings_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'open'" - }, - "ruling": { - "name": "ruling", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "ruled_at": { - "name": "ruled_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_open_rulings_order_idx": { - "name": "positioning_open_rulings_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_open_rulings_parent_id_idx": { - "name": "positioning_open_rulings_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_open_rulings_parent_id_fk": { - "name": "positioning_open_rulings_parent_id_fk", - "tableFrom": "positioning_open_rulings", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning": { - "name": "positioning", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "category": { - "name": "category", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "goal": { - "name": "goal", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "promise": { - "name": "promise", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active_position": { - "name": "active_position", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "macro_frame": { - "name": "macro_frame", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "landscape": { - "name": "landscape", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "enemy": { - "name": "enemy", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "archetype": { - "name": "archetype", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence": { - "name": "essence", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims_cleared_surfaces": { - "name": "evidence_bank_verified_claims_cleared_surfaces", - "schema": "", - "columns": { - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "parent_id": { - "name": "parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "enum_evidence_bank_verified_claims_cleared_surfaces", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - } - }, - "indexes": { - "evidence_bank_verified_claims_cleared_surfaces_order_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_cleared_surfaces_parent_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_cleared_surfaces_parent_fk": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_fk", - "tableFrom": "evidence_bank_verified_claims_cleared_surfaces", - "tableTo": "evidence_bank_verified_claims", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims": { - "name": "evidence_bank_verified_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "primary_source": { - "name": "primary_source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_url": { - "name": "source_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_date": { - "name": "source_date", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sample_or_method": { - "name": "sample_or_method", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "verification_depth": { - "name": "verification_depth", - "type": "enum_evidence_bank_verified_claims_verification_depth", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "limits": { - "name": "limits", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "recheck_at": { - "name": "recheck_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_verified_claims_order_idx": { - "name": "evidence_bank_verified_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_parent_id_idx": { - "name": "evidence_bank_verified_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_parent_id_fk": { - "name": "evidence_bank_verified_claims_parent_id_fk", - "tableFrom": "evidence_bank_verified_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_facts": { - "name": "evidence_bank_facts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "fact": { - "name": "fact", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "owner": { - "name": "owner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "last_confirmed_at": { - "name": "last_confirmed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_facts_order_idx": { - "name": "evidence_bank_facts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_facts_parent_id_idx": { - "name": "evidence_bank_facts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_facts_parent_id_fk": { - "name": "evidence_bank_facts_parent_id_fk", - "tableFrom": "evidence_bank_facts", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_rejected_claims": { - "name": "evidence_bank_rejected_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_bank_rejected_claims_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'rejected'" - }, - "reason": { - "name": "reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "replacement": { - "name": "replacement", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_rejected_claims_order_idx": { - "name": "evidence_bank_rejected_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_rejected_claims_parent_id_idx": { - "name": "evidence_bank_rejected_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_rejected_claims_parent_id_fk": { - "name": "evidence_bank_rejected_claims_parent_id_fk", - "tableFrom": "evidence_bank_rejected_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank": { - "name": "evidence_bank", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "ref_counter": { - "name": "ref_counter", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.llm_settings": { - "name": "llm_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "generate_model": { - "name": "generate_model", - "type": "enum_llm_settings_generate_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "fact_check_model": { - "name": "fact_check_model", - "type": "enum_llm_settings_fact_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "qualitative_review_model": { - "name": "qualitative_review_model", - "type": "enum_llm_settings_qualitative_review_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "claim_extraction_model": { - "name": "claim_extraction_model", - "type": "enum_llm_settings_claim_extraction_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_judge_model": { - "name": "information_gain_judge_model", - "type": "enum_llm_settings_information_gain_judge_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_verification_model": { - "name": "evidence_verification_model", - "type": "enum_llm_settings_evidence_verification_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_check_model": { - "name": "evidence_check_model", - "type": "enum_llm_settings_evidence_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "brand_voice_extract_model": { - "name": "brand_voice_extract_model", - "type": "enum_llm_settings_brand_voice_extract_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "setup_assist_model": { - "name": "setup_assist_model", - "type": "enum_llm_settings_setup_assist_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_policy": { - "name": "information_gain_policy", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "min_consensus_coverage": { - "name": "min_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verification_ratio": { - "name": "min_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_novel_factual_integrity": { - "name": "min_novel_factual_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_numeric_temporal_integrity": { - "name": "min_numeric_temporal_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "require_exact_value_match": { - "name": "require_exact_value_match", - "type": "enum_information_gain_policy_require_exact_value_match", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "require_evidence_lineage": { - "name": "require_evidence_lineage", - "type": "enum_information_gain_policy_require_evidence_lineage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "block_first_party_measurements": { - "name": "block_first_party_measurements", - "type": "enum_information_gain_policy_block_first_party_measurements", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "max_contradiction_probability": { - "name": "max_contradiction_probability", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "material_novelty_threshold": { - "name": "material_novelty_threshold", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "max_internal_duplication_rate": { - "name": "max_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verified_novel_claims": { - "name": "min_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.webhook_settings": { - "name": "webhook_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "secret": { - "name": "secret", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_stats": { - "name": "payload_jobs_stats", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "stats": { - "name": "stats", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": { - "public.enum_articles_brief_sections_source": { - "name": "enum_articles_brief_sections_source", - "schema": "public", - "values": [ - "template", - "research", - "editor" - ] - }, - "public.enum_articles_status": { - "name": "enum_articles_status", - "schema": "public", - "values": [ - "topic_selected", - "brief_review", - "researched", - "drafted", - "qa_passed", - "verified", - "needs_review", - "blocked", - "needs_revision", - "approved", - "published" - ] - }, - "public.enum_articles_information_gain_decision": { - "name": "enum_articles_information_gain_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_cost_log_stage": { - "name": "enum_cost_log_stage", - "schema": "public", - "values": [ - "generate", - "factCheck", - "qualitativeReview", - "claimExtraction", - "informationGainJudge", - "evidenceVerification", - "evidenceCheck", - "brandVoiceExtract", - "setupAssist" - ] - }, - "public.enum_article_audit_actor_type": { - "name": "enum_article_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_brand_voices_status": { - "name": "enum_brand_voices_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_brand_voices_source": { - "name": "enum_brand_voices_source", - "schema": "public", - "values": [ - "onboarding", - "upload" - ] - }, - "public.enum_brand_voices_audience_language_level": { - "name": "enum_brand_voices_audience_language_level", - "schema": "public", - "values": [ - "plain", - "general", - "professional", - "expert" - ] - }, - "public.enum_icps_pains_confidence": { - "name": "enum_icps_pains_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_competition_confidence": { - "name": "enum_icps_competition_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_channels_confidence": { - "name": "enum_icps_channels_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_status": { - "name": "enum_icps_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_icps_motivation_confidence": { - "name": "enum_icps_motivation_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_solution_confidence": { - "name": "enum_icps_solution_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_why_us_confidence": { - "name": "enum_icps_why_us_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_governance_audit_actor_type": { - "name": "enum_governance_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_evidence_sources_quality_class": { - "name": "enum_evidence_sources_quality_class", - "schema": "public", - "values": [ - "first_party_dataset", - "primary", - "official_docs", - "secondary", - "unverified", - "blocked" - ] - }, - "public.enum_evidence_source_candidates_status": { - "name": "enum_evidence_source_candidates_status", - "schema": "public", - "values": [ - "pending", - "approved", - "dismissed" - ] - }, - "public.enum_evidence_source_candidates_suggested_class": { - "name": "enum_evidence_source_candidates_suggested_class", - "schema": "public", - "values": [ - "primary", - "official_docs", - "secondary", - "unverified" - ] - }, - "public.enum_corpus_snapshots_pages_fetch_status": { - "name": "enum_corpus_snapshots_pages_fetch_status", - "schema": "public", - "values": [ - "ok", - "failed", - "skipped" - ] - }, - "public.enum_corpus_snapshots_status": { - "name": "enum_corpus_snapshots_status", - "schema": "public", - "values": [ - "complete", - "partial", - "empty" - ] - }, - "public.enum_information_gain_runs_decision": { - "name": "enum_information_gain_runs_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_pipeline_runs_source": { - "name": "enum_pipeline_runs_source", - "schema": "public", - "values": [ - "admin", - "cli", - "selected" - ] - }, - "public.enum_pipeline_runs_status": { - "name": "enum_pipeline_runs_status", - "schema": "public", - "values": [ - "queued", - "running", - "succeeded", - "failed" - ] - }, - "public.enum_pipeline_runs_mode": { - "name": "enum_pipeline_runs_mode", - "schema": "public", - "values": [ - "mock", - "live" - ] - }, - "public.enum_payload_jobs_log_task_slug": { - "name": "enum_payload_jobs_log_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due" - ] - }, - "public.enum_payload_jobs_log_state": { - "name": "enum_payload_jobs_log_state", - "schema": "public", - "values": [ - "failed", - "succeeded" - ] - }, - "public.enum_payload_jobs_task_slug": { - "name": "enum_payload_jobs_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due" - ] - }, - "public.enum_positioning_open_rulings_status": { - "name": "enum_positioning_open_rulings_status", - "schema": "public", - "values": [ - "open", - "ruled" - ] - }, - "public.enum_evidence_bank_verified_claims_cleared_surfaces": { - "name": "enum_evidence_bank_verified_claims_cleared_surfaces", - "schema": "public", - "values": [ - "web", - "blog", - "ads", - "sales", - "social", - "pr" - ] - }, - "public.enum_evidence_bank_verified_claims_verification_depth": { - "name": "enum_evidence_bank_verified_claims_verification_depth", - "schema": "public", - "values": [ - "primary_document", - "reproduced", - "third_party_audit", - "self_reported" - ] - }, - "public.enum_evidence_bank_rejected_claims_status": { - "name": "enum_evidence_bank_rejected_claims_status", - "schema": "public", - "values": [ - "rejected", - "expired" - ] - }, - "public.enum_llm_settings_generate_model": { - "name": "enum_llm_settings_generate_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_fact_check_model": { - "name": "enum_llm_settings_fact_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_qualitative_review_model": { - "name": "enum_llm_settings_qualitative_review_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_claim_extraction_model": { - "name": "enum_llm_settings_claim_extraction_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_information_gain_judge_model": { - "name": "enum_llm_settings_information_gain_judge_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_verification_model": { - "name": "enum_llm_settings_evidence_verification_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_check_model": { - "name": "enum_llm_settings_evidence_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_brand_voice_extract_model": { - "name": "enum_llm_settings_brand_voice_extract_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_setup_assist_model": { - "name": "enum_llm_settings_setup_assist_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_information_gain_policy_require_exact_value_match": { - "name": "enum_information_gain_policy_require_exact_value_match", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_require_evidence_lineage": { - "name": "enum_information_gain_policy_require_evidence_lineage", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_block_first_party_measurements": { - "name": "enum_information_gain_policy_block_first_party_measurements", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "ac9fbab7-9e43-44df-a751-be5f65de12f9", - "prevId": "00000000-0000-0000-0000-000000000000" -} \ No newline at end of file diff --git a/cms/src/migrations/20261006_205858_articles_lookup_indexes.json b/cms/src/migrations/20261006_205858_articles_lookup_indexes.json deleted file mode 100644 index 461357d3..00000000 --- a/cms/src/migrations/20261006_205858_articles_lookup_indexes.json +++ /dev/null @@ -1,9388 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users_sessions": { - "name": "users_sessions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "users_sessions_order_idx": { - "name": "users_sessions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_sessions_parent_id_idx": { - "name": "users_sessions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "users_sessions_parent_id_fk": { - "name": "users_sessions_parent_id_fk", - "tableFrom": "users_sessions", - "tableTo": "users", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "email": { - "name": "email", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "reset_password_token": { - "name": "reset_password_token", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "reset_password_expiration": { - "name": "reset_password_expiration", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "salt": { - "name": "salt", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "hash": { - "name": "hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "login_attempts": { - "name": "login_attempts", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "lock_until": { - "name": "lock_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "users_updated_at_idx": { - "name": "users_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_created_at_idx": { - "name": "users_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_email_idx": { - "name": "users_email_idx", - "columns": [ - { - "expression": "email", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.media": { - "name": "media", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "media_updated_at_idx": { - "name": "media_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_created_at_idx": { - "name": "media_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_filename_idx": { - "name": "media_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_dos": { - "name": "templates_dos", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_dos_order_idx": { - "name": "templates_dos_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_dos_parent_id_idx": { - "name": "templates_dos_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_dos_parent_id_fk": { - "name": "templates_dos_parent_id_fk", - "tableFrom": "templates_dos", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_donts": { - "name": "templates_donts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_donts_order_idx": { - "name": "templates_donts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_donts_parent_id_idx": { - "name": "templates_donts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_donts_parent_id_fk": { - "name": "templates_donts_parent_id_fk", - "tableFrom": "templates_donts", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_required_sections": { - "name": "templates_required_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_required_sections_order_idx": { - "name": "templates_required_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_required_sections_parent_id_idx": { - "name": "templates_required_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_required_sections_parent_id_fk": { - "name": "templates_required_sections_parent_id_fk", - "tableFrom": "templates_required_sections", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates": { - "name": "templates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "intent": { - "name": "intent", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "outline": { - "name": "outline", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "example": { - "name": "example", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "seo_spec_title_tag_max_length": { - "name": "seo_spec_title_tag_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 60 - }, - "seo_spec_meta_description_max_length": { - "name": "seo_spec_meta_description_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 160 - }, - "seo_spec_heading_structure_rules": { - "name": "seo_spec_heading_structure_rules", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_required": { - "name": "seo_spec_faq_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_min_questions": { - "name": "seo_spec_faq_min_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_max_questions": { - "name": "seo_spec_faq_max_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_og_tags_required": { - "name": "seo_spec_og_tags_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "templates_name_idx": { - "name": "templates_name_idx", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_updated_at_idx": { - "name": "templates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_created_at_idx": { - "name": "templates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_secondary_keywords": { - "name": "articles_secondary_keywords", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_secondary_keywords_order_idx": { - "name": "articles_secondary_keywords_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_secondary_keywords_parent_id_idx": { - "name": "articles_secondary_keywords_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_secondary_keywords_parent_id_fk": { - "name": "articles_secondary_keywords_parent_id_fk", - "tableFrom": "articles_secondary_keywords", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_common_subtopics": { - "name": "articles_research_common_subtopics", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_common_subtopics_order_idx": { - "name": "articles_research_common_subtopics_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_common_subtopics_parent_id_idx": { - "name": "articles_research_common_subtopics_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_common_subtopics_parent_id_fk": { - "name": "articles_research_common_subtopics_parent_id_fk", - "tableFrom": "articles_research_common_subtopics", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_related_questions": { - "name": "articles_research_related_questions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_related_questions_order_idx": { - "name": "articles_research_related_questions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_related_questions_parent_id_idx": { - "name": "articles_research_related_questions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_related_questions_parent_id_fk": { - "name": "articles_research_related_questions_parent_id_fk", - "tableFrom": "articles_research_related_questions", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_brief_sections": { - "name": "articles_brief_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "enum_articles_brief_sections_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "articles_brief_sections_order_idx": { - "name": "articles_brief_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_brief_sections_parent_id_idx": { - "name": "articles_brief_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_brief_sections_parent_id_fk": { - "name": "articles_brief_sections_parent_id_fk", - "tableFrom": "articles_brief_sections", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_faq_items": { - "name": "articles_faq_items", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "answer": { - "name": "answer", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_faq_items_order_idx": { - "name": "articles_faq_items_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_faq_items_parent_id_idx": { - "name": "articles_faq_items_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_faq_items_parent_id_fk": { - "name": "articles_faq_items_parent_id_fk", - "tableFrom": "articles_faq_items", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "archived": { - "name": "archived", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "slug": { - "name": "slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icp_id": { - "name": "icp_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_ranking_pages_summary": { - "name": "research_ranking_pages_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "research_snapshot_id": { - "name": "research_snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_query_cluster": { - "name": "research_query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_facets": { - "name": "research_facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_gaps": { - "name": "research_gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_angle": { - "name": "brief_angle", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_audience": { - "name": "brief_audience", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_must_cover": { - "name": "brief_must_cover", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_opportunities": { - "name": "brief_opportunities", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_notes": { - "name": "brief_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_approved_at": { - "name": "brief_approved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "brief_approved_by": { - "name": "brief_approved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "body": { - "name": "body", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "title_tag": { - "name": "title_tag", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta_description": { - "name": "meta_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_title": { - "name": "og_title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_description": { - "name": "og_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_image": { - "name": "og_image", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "enum_articles_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'topic_selected'" - }, - "publish_at": { - "name": "publish_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "evidence_citations": { - "name": "evidence_citations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_passed": { - "name": "qa_results_structural_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_violations": { - "name": "qa_results_structural_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_passed": { - "name": "qa_results_fact_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_notes": { - "name": "qa_results_fact_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_sources": { - "name": "qa_results_fact_check_sources", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_passed": { - "name": "qa_results_qualitative_review_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_notes": { - "name": "qa_results_qualitative_review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_score": { - "name": "qa_results_qualitative_review_voice_score", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_notes": { - "name": "qa_results_qualitative_review_voice_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_not_trait_violations": { - "name": "qa_results_qualitative_review_not_trait_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_passed": { - "name": "qa_results_evidence_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_notes": { - "name": "qa_results_evidence_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_claims": { - "name": "qa_results_evidence_check_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "information_gain_run_id": { - "name": "information_gain_run_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_decision": { - "name": "information_gain_decision", - "type": "enum_articles_information_gain_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_policy_version": { - "name": "information_gain_policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "information_gain_consensus_coverage": { - "name": "information_gain_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_gain_units": { - "name": "information_gain_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verification_ratio": { - "name": "information_gain_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_internal_duplication_rate": { - "name": "information_gain_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_novel_claims": { - "name": "information_gain_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_scored_at": { - "name": "information_gain_scored_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "generation_model": { - "name": "generation_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_models": { - "name": "qa_models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "total_cost_usd": { - "name": "total_cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_notes": { - "name": "review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_justification": { - "name": "review_justification", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_notes": { - "name": "revision_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_count": { - "name": "revision_count", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "published_at": { - "name": "published_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "articles_archived_idx": { - "name": "articles_archived_idx", - "columns": [ - { - "expression": "archived", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_slug_idx": { - "name": "articles_slug_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_keyword_idx": { - "name": "articles_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_template_idx": { - "name": "articles_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_icp_idx": { - "name": "articles_icp_idx", - "columns": [ - { - "expression": "icp_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_research_snapshot_idx": { - "name": "articles_research_research_snapshot_idx", - "columns": [ - { - "expression": "research_snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_status_idx": { - "name": "articles_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_publish_at_idx": { - "name": "articles_publish_at_idx", - "columns": [ - { - "expression": "publish_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_information_gain_information_gain_run_idx": { - "name": "articles_information_gain_information_gain_run_idx", - "columns": [ - { - "expression": "information_gain_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_updated_at_idx": { - "name": "articles_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_created_at_idx": { - "name": "articles_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_template_id_templates_id_fk": { - "name": "articles_template_id_templates_id_fk", - "tableFrom": "articles", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_icp_id_icps_id_fk": { - "name": "articles_icp_id_icps_id_fk", - "tableFrom": "articles", - "tableTo": "icps", - "columnsFrom": [ - "icp_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_research_snapshot_id_corpus_snapshots_id_fk": { - "name": "articles_research_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "articles", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "research_snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_information_gain_run_id_information_gain_runs_id_fk": { - "name": "articles_information_gain_run_id_information_gain_runs_id_fk", - "tableFrom": "articles", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_run_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cost_log": { - "name": "cost_log", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "enum_cost_log_stage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "provider": { - "name": "provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "model": { - "name": "model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "input_tokens": { - "name": "input_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "output_tokens": { - "name": "output_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "web_search_requests": { - "name": "web_search_requests", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "request": { - "name": "request", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cost_log_pipeline_run_id_idx": { - "name": "cost_log_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_article_idx": { - "name": "cost_log_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_updated_at_idx": { - "name": "cost_log_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_created_at_idx": { - "name": "cost_log_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "cost_log_article_id_articles_id_fk": { - "name": "cost_log_article_id_articles_id_fk", - "tableFrom": "cost_log", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.article_audit": { - "name": "article_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_article_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "article_audit_article_idx": { - "name": "article_audit_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_event_idx": { - "name": "article_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_pipeline_run_id_idx": { - "name": "article_audit_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_updated_at_idx": { - "name": "article_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_created_at_idx": { - "name": "article_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "article_audit_article_id_articles_id_fk": { - "name": "article_audit_article_id_articles_id_fk", - "tableFrom": "article_audit", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_core_values": { - "name": "brand_voices_core_values", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "value": { - "name": "value", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_core_values_order_idx": { - "name": "brand_voices_core_values_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_core_values_parent_id_idx": { - "name": "brand_voices_core_values_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_core_values_parent_id_fk": { - "name": "brand_voices_core_values_parent_id_fk", - "tableFrom": "brand_voices_core_values", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_voice_adjectives": { - "name": "brand_voices_voice_adjectives", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "adjective": { - "name": "adjective", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "do_example": { - "name": "do_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "dont_example": { - "name": "dont_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_voice_adjectives_order_idx": { - "name": "brand_voices_voice_adjectives_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_voice_adjectives_parent_id_idx": { - "name": "brand_voices_voice_adjectives_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_voice_adjectives_parent_id_fk": { - "name": "brand_voices_voice_adjectives_parent_id_fk", - "tableFrom": "brand_voices_voice_adjectives", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_not_traits": { - "name": "brand_voices_not_traits", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "trait": { - "name": "trait", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "boundary_note": { - "name": "boundary_note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_not_traits_order_idx": { - "name": "brand_voices_not_traits_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_not_traits_parent_id_idx": { - "name": "brand_voices_not_traits_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_not_traits_parent_id_fk": { - "name": "brand_voices_not_traits_parent_id_fk", - "tableFrom": "brand_voices_not_traits", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_preferred_words": { - "name": "brand_voices_preferred_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_preferred_words_order_idx": { - "name": "brand_voices_preferred_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_preferred_words_parent_id_idx": { - "name": "brand_voices_preferred_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_preferred_words_parent_id_fk": { - "name": "brand_voices_preferred_words_parent_id_fk", - "tableFrom": "brand_voices_preferred_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_banned_words": { - "name": "brand_voices_banned_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_banned_words_order_idx": { - "name": "brand_voices_banned_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_banned_words_parent_id_idx": { - "name": "brand_voices_banned_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_banned_words_parent_id_fk": { - "name": "brand_voices_banned_words_parent_id_fk", - "tableFrom": "brand_voices_banned_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_samples": { - "name": "brand_voices_samples", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "brand_voices_samples_order_idx": { - "name": "brand_voices_samples_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_samples_parent_id_idx": { - "name": "brand_voices_samples_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_samples_parent_id_fk": { - "name": "brand_voices_samples_parent_id_fk", - "tableFrom": "brand_voices_samples", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices": { - "name": "brand_voices", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_brand_voices_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "source": { - "name": "source", - "type": "enum_brand_voices_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'onboarding'" - }, - "source_file_id": { - "name": "source_file_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "onboarding_step": { - "name": "onboarding_step", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_one_liner": { - "name": "essence_one_liner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_mission": { - "name": "essence_mission", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_description": { - "name": "audience_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_language_level": { - "name": "audience_language_level", - "type": "enum_brand_voices_audience_language_level", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "audience_interests": { - "name": "audience_interests", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_needs": { - "name": "audience_needs", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "persona": { - "name": "persona", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "voice_in_own_words": { - "name": "voice_in_own_words", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "tone_formality": { - "name": "tone_formality", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_warmth": { - "name": "tone_warmth", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_boldness": { - "name": "tone_boldness", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_energy": { - "name": "tone_energy", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "extraction_model": { - "name": "extraction_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_provider": { - "name": "extraction_provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_extracted_at": { - "name": "extraction_extracted_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "extraction_source_chars": { - "name": "extraction_source_chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "extraction_warnings": { - "name": "extraction_warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "brand_voices_status_idx": { - "name": "brand_voices_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_source_file_idx": { - "name": "brand_voices_source_file_idx", - "columns": [ - { - "expression": "source_file_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_updated_at_idx": { - "name": "brand_voices_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_created_at_idx": { - "name": "brand_voices_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_source_file_id_brand_voice_files_id_fk": { - "name": "brand_voices_source_file_id_brand_voice_files_id_fk", - "tableFrom": "brand_voices", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "source_file_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voice_files": { - "name": "brand_voice_files", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voice_files_updated_at_idx": { - "name": "brand_voice_files_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_created_at_idx": { - "name": "brand_voice_files_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_filename_idx": { - "name": "brand_voice_files_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains_evidence": { - "name": "icps_pains_evidence", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_evidence_order_idx": { - "name": "icps_pains_evidence_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_evidence_parent_id_idx": { - "name": "icps_pains_evidence_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_evidence_parent_id_fk": { - "name": "icps_pains_evidence_parent_id_fk", - "tableFrom": "icps_pains_evidence", - "tableTo": "icps_pains", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains": { - "name": "icps_pains", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_pains_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_order_idx": { - "name": "icps_pains_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_parent_id_idx": { - "name": "icps_pains_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_parent_id_fk": { - "name": "icps_pains_parent_id_fk", - "tableFrom": "icps_pains", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_solution_sample_lines": { - "name": "icps_solution_sample_lines", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_solution_sample_lines_order_idx": { - "name": "icps_solution_sample_lines_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_solution_sample_lines_parent_id_idx": { - "name": "icps_solution_sample_lines_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_solution_sample_lines_parent_id_fk": { - "name": "icps_solution_sample_lines_parent_id_fk", - "tableFrom": "icps_solution_sample_lines", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_competition": { - "name": "icps_competition", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "competitor": { - "name": "competitor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claimed_at": { - "name": "claimed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_competition_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_competition_order_idx": { - "name": "icps_competition_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_competition_parent_id_idx": { - "name": "icps_competition_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_competition_parent_id_fk": { - "name": "icps_competition_parent_id_fk", - "tableFrom": "icps_competition", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_channels": { - "name": "icps_channels", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "channel": { - "name": "channel", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_channels_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_channels_order_idx": { - "name": "icps_channels_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_channels_parent_id_idx": { - "name": "icps_channels_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_channels_parent_id_fk": { - "name": "icps_channels_parent_id_fk", - "tableFrom": "icps_channels", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_churn_triggers": { - "name": "icps_churn_triggers", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_churn_triggers_order_idx": { - "name": "icps_churn_triggers_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_churn_triggers_parent_id_idx": { - "name": "icps_churn_triggers_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_churn_triggers_parent_id_fk": { - "name": "icps_churn_triggers_parent_id_fk", - "tableFrom": "icps_churn_triggers", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_not_our_user": { - "name": "icps_not_our_user", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_not_our_user_order_idx": { - "name": "icps_not_our_user_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_not_our_user_parent_id_idx": { - "name": "icps_not_our_user_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_not_our_user_parent_id_fk": { - "name": "icps_not_our_user_parent_id_fk", - "tableFrom": "icps_not_our_user", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps": { - "name": "icps", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_icps_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "primary": { - "name": "primary", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "who": { - "name": "who", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_text": { - "name": "motivation_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_hypothesis": { - "name": "motivation_hypothesis", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "motivation_confidence": { - "name": "motivation_confidence", - "type": "enum_icps_motivation_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "solution_mechanism": { - "name": "solution_mechanism", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "solution_confidence": { - "name": "solution_confidence", - "type": "enum_icps_solution_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "why_us_text": { - "name": "why_us_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "why_us_confidence": { - "name": "why_us_confidence", - "type": "enum_icps_why_us_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "icps_status_idx": { - "name": "icps_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_primary_idx": { - "name": "icps_primary_idx", - "columns": [ - { - "expression": "primary", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_updated_at_idx": { - "name": "icps_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_created_at_idx": { - "name": "icps_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit": { - "name": "governance_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "subject_global": { - "name": "subject_global", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_governance_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "governance_audit_subject_global_idx": { - "name": "governance_audit_subject_global_idx", - "columns": [ - { - "expression": "subject_global", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_event_idx": { - "name": "governance_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_updated_at_idx": { - "name": "governance_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_created_at_idx": { - "name": "governance_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit_rels": { - "name": "governance_audit_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "governance_audit_rels_order_idx": { - "name": "governance_audit_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_parent_idx": { - "name": "governance_audit_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_path_idx": { - "name": "governance_audit_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_brand_voices_id_idx": { - "name": "governance_audit_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_evidence_sources_id_idx": { - "name": "governance_audit_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_icps_id_idx": { - "name": "governance_audit_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "governance_audit_rels_parent_fk": { - "name": "governance_audit_rels_parent_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_brand_voices_fk": { - "name": "governance_audit_rels_brand_voices_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_evidence_sources_fk": { - "name": "governance_audit_rels_evidence_sources_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_icps_fk": { - "name": "governance_audit_rels_icps_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_sources": { - "name": "evidence_sources", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "quality_class": { - "name": "quality_class", - "type": "enum_evidence_sources_quality_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active": { - "name": "active", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_sources_domain_idx": { - "name": "evidence_sources_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_updated_at_idx": { - "name": "evidence_sources_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_created_at_idx": { - "name": "evidence_sources_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_source_candidates": { - "name": "evidence_source_candidates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_source_candidates_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "suggested_class": { - "name": "suggested_class", - "type": "enum_evidence_source_candidates_suggested_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "citation_count": { - "name": "citation_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "serp_count": { - "name": "serp_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "last_seen_at": { - "name": "last_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sightings": { - "name": "sightings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "resolved_source_id": { - "name": "resolved_source_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_source_candidates_domain_idx": { - "name": "evidence_source_candidates_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_status_idx": { - "name": "evidence_source_candidates_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_last_seen_at_idx": { - "name": "evidence_source_candidates_last_seen_at_idx", - "columns": [ - { - "expression": "last_seen_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_resolved_source_idx": { - "name": "evidence_source_candidates_resolved_source_idx", - "columns": [ - { - "expression": "resolved_source_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_updated_at_idx": { - "name": "evidence_source_candidates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_created_at_idx": { - "name": "evidence_source_candidates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk": { - "name": "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk", - "tableFrom": "evidence_source_candidates", - "tableTo": "evidence_sources", - "columnsFrom": [ - "resolved_source_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_pages": { - "name": "corpus_snapshots_pages", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "position": { - "name": "position", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "fetch_status": { - "name": "fetch_status", - "type": "enum_corpus_snapshots_pages_fetch_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "failure_reason": { - "name": "failure_reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "chars": { - "name": "chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "text_hash": { - "name": "text_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "unverified_excerpt_count": { - "name": "unverified_excerpt_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_pages_order_idx": { - "name": "corpus_snapshots_pages_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pages_parent_id_idx": { - "name": "corpus_snapshots_pages_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_pages_parent_id_fk": { - "name": "corpus_snapshots_pages_parent_id_fk", - "tableFrom": "corpus_snapshots_pages", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_internal_corpus": { - "name": "corpus_snapshots_internal_corpus", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "article_updated_at": { - "name": "article_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_internal_corpus_order_idx": { - "name": "corpus_snapshots_internal_corpus_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_parent_id_idx": { - "name": "corpus_snapshots_internal_corpus_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_article_idx": { - "name": "corpus_snapshots_internal_corpus_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_internal_corpus_article_id_articles_id_fk": { - "name": "corpus_snapshots_internal_corpus_article_id_articles_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "corpus_snapshots_internal_corpus_parent_id_fk": { - "name": "corpus_snapshots_internal_corpus_parent_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots": { - "name": "corpus_snapshots", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "keyword_key": { - "name": "keyword_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "captured_at": { - "name": "captured_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_corpus_snapshots_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "snapshot_hash": { - "name": "snapshot_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "query_cluster": { - "name": "query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_claims": { - "name": "baseline_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "facets": { - "name": "facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "gaps": { - "name": "gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_doc_count": { - "name": "baseline_doc_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "failed_page_count": { - "name": "failed_page_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "corpus_snapshots_keyword_idx": { - "name": "corpus_snapshots_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_keyword_key_idx": { - "name": "corpus_snapshots_keyword_key_idx", - "columns": [ - { - "expression": "keyword_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pipeline_run_id_idx": { - "name": "corpus_snapshots_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_updated_at_idx": { - "name": "corpus_snapshots_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_created_at_idx": { - "name": "corpus_snapshots_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topic_searches": { - "name": "topic_searches", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "seed": { - "name": "seed", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "seed_key": { - "name": "seed_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "fetched_at": { - "name": "fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "result_count": { - "name": "result_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "candidates": { - "name": "candidates", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "topic_searches_seed_key_idx": { - "name": "topic_searches_seed_key_idx", - "columns": [ - { - "expression": "seed_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_fetched_at_idx": { - "name": "topic_searches_fetched_at_idx", - "columns": [ - { - "expression": "fetched_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_updated_at_idx": { - "name": "topic_searches_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_created_at_idx": { - "name": "topic_searches_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_runs": { - "name": "information_gain_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "snapshot_id": { - "name": "snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "policy_version": { - "name": "policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "policy": { - "name": "policy", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "decision": { - "name": "decision", - "type": "enum_information_gain_runs_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "reasons": { - "name": "reasons", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_available": { - "name": "baseline_available", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "calibrated": { - "name": "calibrated", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "scores_consensus_coverage": { - "name": "scores_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_potential_gain_units": { - "name": "scores_potential_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_units": { - "name": "scores_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verification_ratio": { - "name": "scores_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_density": { - "name": "scores_verified_gain_density", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_facet_gain_coverage": { - "name": "scores_facet_gain_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_internal_duplication_rate": { - "name": "scores_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_total_claims": { - "name": "claim_summary_total_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_materially_novel_claims": { - "name": "claim_summary_materially_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_verified_novel_claims": { - "name": "claim_summary_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_unsupported_novel_claims": { - "name": "claim_summary_unsupported_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_contradictory_claims": { - "name": "claim_summary_contradictory_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_first_party_claims": { - "name": "claim_summary_first_party_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_ids_blocked": { - "name": "claim_ids_blocked", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_review": { - "name": "claim_ids_review", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_materially_novel": { - "name": "claim_ids_materially_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_verified_novel": { - "name": "claim_ids_verified_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claims": { - "name": "claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "token_count": { - "name": "token_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "draft_updated_at": { - "name": "draft_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "information_gain_runs_article_idx": { - "name": "information_gain_runs_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_pipeline_run_id_idx": { - "name": "information_gain_runs_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_snapshot_idx": { - "name": "information_gain_runs_snapshot_idx", - "columns": [ - { - "expression": "snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_decision_idx": { - "name": "information_gain_runs_decision_idx", - "columns": [ - { - "expression": "decision", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_updated_at_idx": { - "name": "information_gain_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_created_at_idx": { - "name": "information_gain_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "information_gain_runs_article_id_articles_id_fk": { - "name": "information_gain_runs_article_id_articles_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "information_gain_runs_snapshot_id_corpus_snapshots_id_fk": { - "name": "information_gain_runs_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs": { - "name": "pipeline_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "run_id": { - "name": "run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "enum_pipeline_runs_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_pipeline_runs_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "mode": { - "name": "mode", - "type": "enum_pipeline_runs_mode", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "requested_count": { - "name": "requested_count", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "config_fingerprint": { - "name": "config_fingerprint", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "config_snapshot": { - "name": "config_snapshot", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "final_statuses": { - "name": "final_statuses", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "warnings": { - "name": "warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "error_summary": { - "name": "error_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "requested_by": { - "name": "requested_by", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "started_at": { - "name": "started_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "pipeline_runs_run_id_idx": { - "name": "pipeline_runs_run_id_idx", - "columns": [ - { - "expression": "run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_status_idx": { - "name": "pipeline_runs_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_template_idx": { - "name": "pipeline_runs_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_config_fingerprint_idx": { - "name": "pipeline_runs_config_fingerprint_idx", - "columns": [ - { - "expression": "config_fingerprint", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_updated_at_idx": { - "name": "pipeline_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_created_at_idx": { - "name": "pipeline_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_template_id_templates_id_fk": { - "name": "pipeline_runs_template_id_templates_id_fk", - "tableFrom": "pipeline_runs", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs_rels": { - "name": "pipeline_runs_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "pipeline_runs_rels_order_idx": { - "name": "pipeline_runs_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_parent_idx": { - "name": "pipeline_runs_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_path_idx": { - "name": "pipeline_runs_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_articles_id_idx": { - "name": "pipeline_runs_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_rels_parent_fk": { - "name": "pipeline_runs_rels_parent_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "pipeline_runs_rels_articles_fk": { - "name": "pipeline_runs_rels_articles_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_kv": { - "name": "payload_kv", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "data": { - "name": "data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "payload_kv_key_idx": { - "name": "payload_kv_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_log": { - "name": "payload_jobs_log", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "executed_at": { - "name": "executed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_log_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "task_i_d": { - "name": "task_i_d", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "output": { - "name": "output", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "state": { - "name": "state", - "type": "enum_payload_jobs_log_state", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_jobs_log_order_idx": { - "name": "payload_jobs_log_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_log_parent_id_idx": { - "name": "payload_jobs_log_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_jobs_log_parent_id_fk": { - "name": "payload_jobs_log_parent_id_fk", - "tableFrom": "payload_jobs_log", - "tableTo": "payload_jobs", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs": { - "name": "payload_jobs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "total_tried": { - "name": "total_tried", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "has_error": { - "name": "has_error", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "queue": { - "name": "queue", - "type": "varchar", - "primaryKey": false, - "notNull": false, - "default": "'default'" - }, - "wait_until": { - "name": "wait_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "processing": { - "name": "processing", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "concurrency_key": { - "name": "concurrency_key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta": { - "name": "meta", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_jobs_completed_at_idx": { - "name": "payload_jobs_completed_at_idx", - "columns": [ - { - "expression": "completed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_total_tried_idx": { - "name": "payload_jobs_total_tried_idx", - "columns": [ - { - "expression": "total_tried", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_has_error_idx": { - "name": "payload_jobs_has_error_idx", - "columns": [ - { - "expression": "has_error", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_task_slug_idx": { - "name": "payload_jobs_task_slug_idx", - "columns": [ - { - "expression": "task_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_queue_idx": { - "name": "payload_jobs_queue_idx", - "columns": [ - { - "expression": "queue", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_wait_until_idx": { - "name": "payload_jobs_wait_until_idx", - "columns": [ - { - "expression": "wait_until", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_processing_idx": { - "name": "payload_jobs_processing_idx", - "columns": [ - { - "expression": "processing", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_concurrency_key_idx": { - "name": "payload_jobs_concurrency_key_idx", - "columns": [ - { - "expression": "concurrency_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_updated_at_idx": { - "name": "payload_jobs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_created_at_idx": { - "name": "payload_jobs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents": { - "name": "payload_locked_documents", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "global_slug": { - "name": "global_slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_locked_documents_global_slug_idx": { - "name": "payload_locked_documents_global_slug_idx", - "columns": [ - { - "expression": "global_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_updated_at_idx": { - "name": "payload_locked_documents_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_created_at_idx": { - "name": "payload_locked_documents_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents_rels": { - "name": "payload_locked_documents_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "media_id": { - "name": "media_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "templates_id": { - "name": "templates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "cost_log_id": { - "name": "cost_log_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "article_audit_id": { - "name": "article_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voice_files_id": { - "name": "brand_voice_files_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "governance_audit_id": { - "name": "governance_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_source_candidates_id": { - "name": "evidence_source_candidates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "corpus_snapshots_id": { - "name": "corpus_snapshots_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "topic_searches_id": { - "name": "topic_searches_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_runs_id": { - "name": "information_gain_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "pipeline_runs_id": { - "name": "pipeline_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_locked_documents_rels_order_idx": { - "name": "payload_locked_documents_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_parent_idx": { - "name": "payload_locked_documents_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_path_idx": { - "name": "payload_locked_documents_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_users_id_idx": { - "name": "payload_locked_documents_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_media_id_idx": { - "name": "payload_locked_documents_rels_media_id_idx", - "columns": [ - { - "expression": "media_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_templates_id_idx": { - "name": "payload_locked_documents_rels_templates_id_idx", - "columns": [ - { - "expression": "templates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_articles_id_idx": { - "name": "payload_locked_documents_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_cost_log_id_idx": { - "name": "payload_locked_documents_rels_cost_log_id_idx", - "columns": [ - { - "expression": "cost_log_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_article_audit_id_idx": { - "name": "payload_locked_documents_rels_article_audit_id_idx", - "columns": [ - { - "expression": "article_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voices_id_idx": { - "name": "payload_locked_documents_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voice_files_id_idx": { - "name": "payload_locked_documents_rels_brand_voice_files_id_idx", - "columns": [ - { - "expression": "brand_voice_files_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_icps_id_idx": { - "name": "payload_locked_documents_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_governance_audit_id_idx": { - "name": "payload_locked_documents_rels_governance_audit_id_idx", - "columns": [ - { - "expression": "governance_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_sources_id_idx": { - "name": "payload_locked_documents_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_source_candidates_idx": { - "name": "payload_locked_documents_rels_evidence_source_candidates_idx", - "columns": [ - { - "expression": "evidence_source_candidates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_corpus_snapshots_id_idx": { - "name": "payload_locked_documents_rels_corpus_snapshots_id_idx", - "columns": [ - { - "expression": "corpus_snapshots_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_topic_searches_id_idx": { - "name": "payload_locked_documents_rels_topic_searches_id_idx", - "columns": [ - { - "expression": "topic_searches_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_information_gain_runs_id_idx": { - "name": "payload_locked_documents_rels_information_gain_runs_id_idx", - "columns": [ - { - "expression": "information_gain_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_pipeline_runs_id_idx": { - "name": "payload_locked_documents_rels_pipeline_runs_id_idx", - "columns": [ - { - "expression": "pipeline_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_locked_documents_rels_parent_fk": { - "name": "payload_locked_documents_rels_parent_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "payload_locked_documents", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_users_fk": { - "name": "payload_locked_documents_rels_users_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_media_fk": { - "name": "payload_locked_documents_rels_media_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "media", - "columnsFrom": [ - "media_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_templates_fk": { - "name": "payload_locked_documents_rels_templates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "templates", - "columnsFrom": [ - "templates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_articles_fk": { - "name": "payload_locked_documents_rels_articles_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_cost_log_fk": { - "name": "payload_locked_documents_rels_cost_log_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "cost_log", - "columnsFrom": [ - "cost_log_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_article_audit_fk": { - "name": "payload_locked_documents_rels_article_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "article_audit", - "columnsFrom": [ - "article_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voices_fk": { - "name": "payload_locked_documents_rels_brand_voices_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voice_files_fk": { - "name": "payload_locked_documents_rels_brand_voice_files_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "brand_voice_files_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_icps_fk": { - "name": "payload_locked_documents_rels_icps_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_governance_audit_fk": { - "name": "payload_locked_documents_rels_governance_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "governance_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_sources_fk": { - "name": "payload_locked_documents_rels_evidence_sources_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_source_candidates_fk": { - "name": "payload_locked_documents_rels_evidence_source_candidates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_source_candidates", - "columnsFrom": [ - "evidence_source_candidates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_corpus_snapshots_fk": { - "name": "payload_locked_documents_rels_corpus_snapshots_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "corpus_snapshots_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_topic_searches_fk": { - "name": "payload_locked_documents_rels_topic_searches_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "topic_searches", - "columnsFrom": [ - "topic_searches_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_information_gain_runs_fk": { - "name": "payload_locked_documents_rels_information_gain_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_pipeline_runs_fk": { - "name": "payload_locked_documents_rels_pipeline_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "pipeline_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences": { - "name": "payload_preferences", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "value": { - "name": "value", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_preferences_key_idx": { - "name": "payload_preferences_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_updated_at_idx": { - "name": "payload_preferences_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_created_at_idx": { - "name": "payload_preferences_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences_rels": { - "name": "payload_preferences_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_preferences_rels_order_idx": { - "name": "payload_preferences_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_parent_idx": { - "name": "payload_preferences_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_path_idx": { - "name": "payload_preferences_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_users_id_idx": { - "name": "payload_preferences_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_preferences_rels_parent_fk": { - "name": "payload_preferences_rels_parent_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "payload_preferences", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_preferences_rels_users_fk": { - "name": "payload_preferences_rels_users_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_migrations": { - "name": "payload_migrations", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "batch": { - "name": "batch", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_migrations_updated_at_idx": { - "name": "payload_migrations_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_migrations_created_at_idx": { - "name": "payload_migrations_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile_competitors": { - "name": "workspace_profile_competitors", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "workspace_profile_competitors_order_idx": { - "name": "workspace_profile_competitors_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "workspace_profile_competitors_parent_id_idx": { - "name": "workspace_profile_competitors_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "workspace_profile_competitors_parent_id_fk": { - "name": "workspace_profile_competitors_parent_id_fk", - "tableFrom": "workspace_profile_competitors", - "tableTo": "workspace_profile", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile": { - "name": "workspace_profile", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "company_name": { - "name": "company_name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "target_domain": { - "name": "target_domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_notes": { - "name": "site_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_pages": { - "name": "site_pages", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "site_pages_fetched_at": { - "name": "site_pages_fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_core_claims": { - "name": "positioning_core_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "evidence_ref": { - "name": "evidence_ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_core_claims_order_idx": { - "name": "positioning_core_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_core_claims_parent_id_idx": { - "name": "positioning_core_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_core_claims_parent_id_fk": { - "name": "positioning_core_claims_parent_id_fk", - "tableFrom": "positioning_core_claims", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_pillars": { - "name": "positioning_pillars", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "one_line": { - "name": "one_line", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "carries": { - "name": "carries", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_pillars_order_idx": { - "name": "positioning_pillars_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_pillars_parent_id_idx": { - "name": "positioning_pillars_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_pillars_parent_id_fk": { - "name": "positioning_pillars_parent_id_fk", - "tableFrom": "positioning_pillars", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_descriptor_ladder": { - "name": "positioning_descriptor_ladder", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "descriptor": { - "name": "descriptor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_descriptor_ladder_order_idx": { - "name": "positioning_descriptor_ladder_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_descriptor_ladder_parent_id_idx": { - "name": "positioning_descriptor_ladder_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_descriptor_ladder_parent_id_fk": { - "name": "positioning_descriptor_ladder_parent_id_fk", - "tableFrom": "positioning_descriptor_ladder", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_reach_for": { - "name": "positioning_vocabulary_reach_for", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_reach_for_order_idx": { - "name": "positioning_vocabulary_reach_for_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_reach_for_parent_id_idx": { - "name": "positioning_vocabulary_reach_for_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_reach_for_parent_id_fk": { - "name": "positioning_vocabulary_reach_for_parent_id_fk", - "tableFrom": "positioning_vocabulary_reach_for", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_avoid": { - "name": "positioning_vocabulary_avoid", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_avoid_order_idx": { - "name": "positioning_vocabulary_avoid_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_avoid_parent_id_idx": { - "name": "positioning_vocabulary_avoid_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_avoid_parent_id_fk": { - "name": "positioning_vocabulary_avoid_parent_id_fk", - "tableFrom": "positioning_vocabulary_avoid", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_open_rulings": { - "name": "positioning_open_rulings", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_positioning_open_rulings_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'open'" - }, - "ruling": { - "name": "ruling", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "ruled_at": { - "name": "ruled_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_open_rulings_order_idx": { - "name": "positioning_open_rulings_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_open_rulings_parent_id_idx": { - "name": "positioning_open_rulings_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_open_rulings_parent_id_fk": { - "name": "positioning_open_rulings_parent_id_fk", - "tableFrom": "positioning_open_rulings", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning": { - "name": "positioning", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "category": { - "name": "category", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "goal": { - "name": "goal", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "promise": { - "name": "promise", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active_position": { - "name": "active_position", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "macro_frame": { - "name": "macro_frame", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "landscape": { - "name": "landscape", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "enemy": { - "name": "enemy", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "archetype": { - "name": "archetype", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence": { - "name": "essence", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims_cleared_surfaces": { - "name": "evidence_bank_verified_claims_cleared_surfaces", - "schema": "", - "columns": { - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "parent_id": { - "name": "parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "enum_evidence_bank_verified_claims_cleared_surfaces", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - } - }, - "indexes": { - "evidence_bank_verified_claims_cleared_surfaces_order_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_cleared_surfaces_parent_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_cleared_surfaces_parent_fk": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_fk", - "tableFrom": "evidence_bank_verified_claims_cleared_surfaces", - "tableTo": "evidence_bank_verified_claims", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims": { - "name": "evidence_bank_verified_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "primary_source": { - "name": "primary_source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_url": { - "name": "source_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_date": { - "name": "source_date", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sample_or_method": { - "name": "sample_or_method", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "verification_depth": { - "name": "verification_depth", - "type": "enum_evidence_bank_verified_claims_verification_depth", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "limits": { - "name": "limits", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "recheck_at": { - "name": "recheck_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_verified_claims_order_idx": { - "name": "evidence_bank_verified_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_parent_id_idx": { - "name": "evidence_bank_verified_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_parent_id_fk": { - "name": "evidence_bank_verified_claims_parent_id_fk", - "tableFrom": "evidence_bank_verified_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_facts": { - "name": "evidence_bank_facts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "fact": { - "name": "fact", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "owner": { - "name": "owner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "last_confirmed_at": { - "name": "last_confirmed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_facts_order_idx": { - "name": "evidence_bank_facts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_facts_parent_id_idx": { - "name": "evidence_bank_facts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_facts_parent_id_fk": { - "name": "evidence_bank_facts_parent_id_fk", - "tableFrom": "evidence_bank_facts", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_rejected_claims": { - "name": "evidence_bank_rejected_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_bank_rejected_claims_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'rejected'" - }, - "reason": { - "name": "reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "replacement": { - "name": "replacement", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_rejected_claims_order_idx": { - "name": "evidence_bank_rejected_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_rejected_claims_parent_id_idx": { - "name": "evidence_bank_rejected_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_rejected_claims_parent_id_fk": { - "name": "evidence_bank_rejected_claims_parent_id_fk", - "tableFrom": "evidence_bank_rejected_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank": { - "name": "evidence_bank", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "ref_counter": { - "name": "ref_counter", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.llm_settings": { - "name": "llm_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "generate_model": { - "name": "generate_model", - "type": "enum_llm_settings_generate_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "fact_check_model": { - "name": "fact_check_model", - "type": "enum_llm_settings_fact_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "qualitative_review_model": { - "name": "qualitative_review_model", - "type": "enum_llm_settings_qualitative_review_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "claim_extraction_model": { - "name": "claim_extraction_model", - "type": "enum_llm_settings_claim_extraction_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_judge_model": { - "name": "information_gain_judge_model", - "type": "enum_llm_settings_information_gain_judge_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_verification_model": { - "name": "evidence_verification_model", - "type": "enum_llm_settings_evidence_verification_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_check_model": { - "name": "evidence_check_model", - "type": "enum_llm_settings_evidence_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "brand_voice_extract_model": { - "name": "brand_voice_extract_model", - "type": "enum_llm_settings_brand_voice_extract_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "setup_assist_model": { - "name": "setup_assist_model", - "type": "enum_llm_settings_setup_assist_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_policy": { - "name": "information_gain_policy", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "min_consensus_coverage": { - "name": "min_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verification_ratio": { - "name": "min_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_novel_factual_integrity": { - "name": "min_novel_factual_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_numeric_temporal_integrity": { - "name": "min_numeric_temporal_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "require_exact_value_match": { - "name": "require_exact_value_match", - "type": "enum_information_gain_policy_require_exact_value_match", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "require_evidence_lineage": { - "name": "require_evidence_lineage", - "type": "enum_information_gain_policy_require_evidence_lineage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "block_first_party_measurements": { - "name": "block_first_party_measurements", - "type": "enum_information_gain_policy_block_first_party_measurements", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "max_contradiction_probability": { - "name": "max_contradiction_probability", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "material_novelty_threshold": { - "name": "material_novelty_threshold", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "max_internal_duplication_rate": { - "name": "max_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verified_novel_claims": { - "name": "min_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.webhook_settings": { - "name": "webhook_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "secret": { - "name": "secret", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_stats": { - "name": "payload_jobs_stats", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "stats": { - "name": "stats", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": { - "public.enum_articles_brief_sections_source": { - "name": "enum_articles_brief_sections_source", - "schema": "public", - "values": [ - "template", - "research", - "editor" - ] - }, - "public.enum_articles_status": { - "name": "enum_articles_status", - "schema": "public", - "values": [ - "topic_selected", - "brief_review", - "researched", - "drafted", - "qa_passed", - "verified", - "needs_review", - "blocked", - "needs_revision", - "approved", - "published" - ] - }, - "public.enum_articles_information_gain_decision": { - "name": "enum_articles_information_gain_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_cost_log_stage": { - "name": "enum_cost_log_stage", - "schema": "public", - "values": [ - "generate", - "factCheck", - "qualitativeReview", - "claimExtraction", - "informationGainJudge", - "evidenceVerification", - "evidenceCheck", - "brandVoiceExtract", - "setupAssist" - ] - }, - "public.enum_article_audit_actor_type": { - "name": "enum_article_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_brand_voices_status": { - "name": "enum_brand_voices_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_brand_voices_source": { - "name": "enum_brand_voices_source", - "schema": "public", - "values": [ - "onboarding", - "upload" - ] - }, - "public.enum_brand_voices_audience_language_level": { - "name": "enum_brand_voices_audience_language_level", - "schema": "public", - "values": [ - "plain", - "general", - "professional", - "expert" - ] - }, - "public.enum_icps_pains_confidence": { - "name": "enum_icps_pains_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_competition_confidence": { - "name": "enum_icps_competition_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_channels_confidence": { - "name": "enum_icps_channels_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_status": { - "name": "enum_icps_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_icps_motivation_confidence": { - "name": "enum_icps_motivation_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_solution_confidence": { - "name": "enum_icps_solution_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_why_us_confidence": { - "name": "enum_icps_why_us_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_governance_audit_actor_type": { - "name": "enum_governance_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_evidence_sources_quality_class": { - "name": "enum_evidence_sources_quality_class", - "schema": "public", - "values": [ - "first_party_dataset", - "primary", - "official_docs", - "secondary", - "unverified", - "blocked" - ] - }, - "public.enum_evidence_source_candidates_status": { - "name": "enum_evidence_source_candidates_status", - "schema": "public", - "values": [ - "pending", - "approved", - "dismissed" - ] - }, - "public.enum_evidence_source_candidates_suggested_class": { - "name": "enum_evidence_source_candidates_suggested_class", - "schema": "public", - "values": [ - "primary", - "official_docs", - "secondary", - "unverified" - ] - }, - "public.enum_corpus_snapshots_pages_fetch_status": { - "name": "enum_corpus_snapshots_pages_fetch_status", - "schema": "public", - "values": [ - "ok", - "failed", - "skipped" - ] - }, - "public.enum_corpus_snapshots_status": { - "name": "enum_corpus_snapshots_status", - "schema": "public", - "values": [ - "complete", - "partial", - "empty" - ] - }, - "public.enum_information_gain_runs_decision": { - "name": "enum_information_gain_runs_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_pipeline_runs_source": { - "name": "enum_pipeline_runs_source", - "schema": "public", - "values": [ - "admin", - "cli", - "selected" - ] - }, - "public.enum_pipeline_runs_status": { - "name": "enum_pipeline_runs_status", - "schema": "public", - "values": [ - "queued", - "running", - "succeeded", - "failed" - ] - }, - "public.enum_pipeline_runs_mode": { - "name": "enum_pipeline_runs_mode", - "schema": "public", - "values": [ - "mock", - "live" - ] - }, - "public.enum_payload_jobs_log_task_slug": { - "name": "enum_payload_jobs_log_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due" - ] - }, - "public.enum_payload_jobs_log_state": { - "name": "enum_payload_jobs_log_state", - "schema": "public", - "values": [ - "failed", - "succeeded" - ] - }, - "public.enum_payload_jobs_task_slug": { - "name": "enum_payload_jobs_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due" - ] - }, - "public.enum_positioning_open_rulings_status": { - "name": "enum_positioning_open_rulings_status", - "schema": "public", - "values": [ - "open", - "ruled" - ] - }, - "public.enum_evidence_bank_verified_claims_cleared_surfaces": { - "name": "enum_evidence_bank_verified_claims_cleared_surfaces", - "schema": "public", - "values": [ - "web", - "blog", - "ads", - "sales", - "social", - "pr" - ] - }, - "public.enum_evidence_bank_verified_claims_verification_depth": { - "name": "enum_evidence_bank_verified_claims_verification_depth", - "schema": "public", - "values": [ - "primary_document", - "reproduced", - "third_party_audit", - "self_reported" - ] - }, - "public.enum_evidence_bank_rejected_claims_status": { - "name": "enum_evidence_bank_rejected_claims_status", - "schema": "public", - "values": [ - "rejected", - "expired" - ] - }, - "public.enum_llm_settings_generate_model": { - "name": "enum_llm_settings_generate_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_fact_check_model": { - "name": "enum_llm_settings_fact_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_qualitative_review_model": { - "name": "enum_llm_settings_qualitative_review_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_claim_extraction_model": { - "name": "enum_llm_settings_claim_extraction_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_information_gain_judge_model": { - "name": "enum_llm_settings_information_gain_judge_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_verification_model": { - "name": "enum_llm_settings_evidence_verification_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_check_model": { - "name": "enum_llm_settings_evidence_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_brand_voice_extract_model": { - "name": "enum_llm_settings_brand_voice_extract_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_setup_assist_model": { - "name": "enum_llm_settings_setup_assist_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_information_gain_policy_require_exact_value_match": { - "name": "enum_information_gain_policy_require_exact_value_match", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_require_evidence_lineage": { - "name": "enum_information_gain_policy_require_evidence_lineage", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_block_first_party_measurements": { - "name": "enum_information_gain_policy_block_first_party_measurements", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "458d42a9-2c7e-4e82-987c-dc9601fbbe0b", - "prevId": "00000000-0000-0000-0000-000000000000" -} \ No newline at end of file diff --git a/cms/src/migrations/20261007_121854_template_company_mentions.json b/cms/src/migrations/20261007_121854_template_company_mentions.json deleted file mode 100644 index c4d4d58f..00000000 --- a/cms/src/migrations/20261007_121854_template_company_mentions.json +++ /dev/null @@ -1,9405 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users_sessions": { - "name": "users_sessions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "users_sessions_order_idx": { - "name": "users_sessions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_sessions_parent_id_idx": { - "name": "users_sessions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "users_sessions_parent_id_fk": { - "name": "users_sessions_parent_id_fk", - "tableFrom": "users_sessions", - "tableTo": "users", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "email": { - "name": "email", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "reset_password_token": { - "name": "reset_password_token", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "reset_password_expiration": { - "name": "reset_password_expiration", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "salt": { - "name": "salt", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "hash": { - "name": "hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "login_attempts": { - "name": "login_attempts", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "lock_until": { - "name": "lock_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "users_updated_at_idx": { - "name": "users_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_created_at_idx": { - "name": "users_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_email_idx": { - "name": "users_email_idx", - "columns": [ - { - "expression": "email", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.media": { - "name": "media", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "media_updated_at_idx": { - "name": "media_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_created_at_idx": { - "name": "media_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_filename_idx": { - "name": "media_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_dos": { - "name": "templates_dos", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_dos_order_idx": { - "name": "templates_dos_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_dos_parent_id_idx": { - "name": "templates_dos_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_dos_parent_id_fk": { - "name": "templates_dos_parent_id_fk", - "tableFrom": "templates_dos", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_donts": { - "name": "templates_donts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_donts_order_idx": { - "name": "templates_donts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_donts_parent_id_idx": { - "name": "templates_donts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_donts_parent_id_fk": { - "name": "templates_donts_parent_id_fk", - "tableFrom": "templates_donts", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_required_sections": { - "name": "templates_required_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_required_sections_order_idx": { - "name": "templates_required_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_required_sections_parent_id_idx": { - "name": "templates_required_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_required_sections_parent_id_fk": { - "name": "templates_required_sections_parent_id_fk", - "tableFrom": "templates_required_sections", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates": { - "name": "templates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "intent": { - "name": "intent", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "company_mentions": { - "name": "company_mentions", - "type": "enum_templates_company_mentions", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'mention'" - }, - "outline": { - "name": "outline", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "example": { - "name": "example", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "seo_spec_title_tag_max_length": { - "name": "seo_spec_title_tag_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 60 - }, - "seo_spec_meta_description_max_length": { - "name": "seo_spec_meta_description_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 160 - }, - "seo_spec_heading_structure_rules": { - "name": "seo_spec_heading_structure_rules", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_required": { - "name": "seo_spec_faq_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_min_questions": { - "name": "seo_spec_faq_min_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_max_questions": { - "name": "seo_spec_faq_max_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_og_tags_required": { - "name": "seo_spec_og_tags_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "templates_name_idx": { - "name": "templates_name_idx", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_updated_at_idx": { - "name": "templates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_created_at_idx": { - "name": "templates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_secondary_keywords": { - "name": "articles_secondary_keywords", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_secondary_keywords_order_idx": { - "name": "articles_secondary_keywords_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_secondary_keywords_parent_id_idx": { - "name": "articles_secondary_keywords_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_secondary_keywords_parent_id_fk": { - "name": "articles_secondary_keywords_parent_id_fk", - "tableFrom": "articles_secondary_keywords", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_common_subtopics": { - "name": "articles_research_common_subtopics", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_common_subtopics_order_idx": { - "name": "articles_research_common_subtopics_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_common_subtopics_parent_id_idx": { - "name": "articles_research_common_subtopics_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_common_subtopics_parent_id_fk": { - "name": "articles_research_common_subtopics_parent_id_fk", - "tableFrom": "articles_research_common_subtopics", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_related_questions": { - "name": "articles_research_related_questions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_related_questions_order_idx": { - "name": "articles_research_related_questions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_related_questions_parent_id_idx": { - "name": "articles_research_related_questions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_related_questions_parent_id_fk": { - "name": "articles_research_related_questions_parent_id_fk", - "tableFrom": "articles_research_related_questions", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_brief_sections": { - "name": "articles_brief_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "enum_articles_brief_sections_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "articles_brief_sections_order_idx": { - "name": "articles_brief_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_brief_sections_parent_id_idx": { - "name": "articles_brief_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_brief_sections_parent_id_fk": { - "name": "articles_brief_sections_parent_id_fk", - "tableFrom": "articles_brief_sections", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_faq_items": { - "name": "articles_faq_items", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "answer": { - "name": "answer", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_faq_items_order_idx": { - "name": "articles_faq_items_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_faq_items_parent_id_idx": { - "name": "articles_faq_items_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_faq_items_parent_id_fk": { - "name": "articles_faq_items_parent_id_fk", - "tableFrom": "articles_faq_items", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "archived": { - "name": "archived", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "slug": { - "name": "slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icp_id": { - "name": "icp_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_ranking_pages_summary": { - "name": "research_ranking_pages_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "research_snapshot_id": { - "name": "research_snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_query_cluster": { - "name": "research_query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_facets": { - "name": "research_facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_gaps": { - "name": "research_gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_angle": { - "name": "brief_angle", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_audience": { - "name": "brief_audience", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_must_cover": { - "name": "brief_must_cover", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_opportunities": { - "name": "brief_opportunities", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_notes": { - "name": "brief_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_approved_at": { - "name": "brief_approved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "brief_approved_by": { - "name": "brief_approved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "body": { - "name": "body", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "title_tag": { - "name": "title_tag", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta_description": { - "name": "meta_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_title": { - "name": "og_title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_description": { - "name": "og_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_image": { - "name": "og_image", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "enum_articles_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'topic_selected'" - }, - "publish_at": { - "name": "publish_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "evidence_citations": { - "name": "evidence_citations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_passed": { - "name": "qa_results_structural_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_violations": { - "name": "qa_results_structural_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_passed": { - "name": "qa_results_fact_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_notes": { - "name": "qa_results_fact_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_sources": { - "name": "qa_results_fact_check_sources", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_passed": { - "name": "qa_results_qualitative_review_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_notes": { - "name": "qa_results_qualitative_review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_score": { - "name": "qa_results_qualitative_review_voice_score", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_notes": { - "name": "qa_results_qualitative_review_voice_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_not_trait_violations": { - "name": "qa_results_qualitative_review_not_trait_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_passed": { - "name": "qa_results_evidence_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_notes": { - "name": "qa_results_evidence_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_claims": { - "name": "qa_results_evidence_check_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "information_gain_run_id": { - "name": "information_gain_run_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_decision": { - "name": "information_gain_decision", - "type": "enum_articles_information_gain_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_policy_version": { - "name": "information_gain_policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "information_gain_consensus_coverage": { - "name": "information_gain_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_gain_units": { - "name": "information_gain_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verification_ratio": { - "name": "information_gain_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_internal_duplication_rate": { - "name": "information_gain_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_novel_claims": { - "name": "information_gain_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_scored_at": { - "name": "information_gain_scored_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "generation_model": { - "name": "generation_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_models": { - "name": "qa_models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "total_cost_usd": { - "name": "total_cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_notes": { - "name": "review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_justification": { - "name": "review_justification", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_notes": { - "name": "revision_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_count": { - "name": "revision_count", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "published_at": { - "name": "published_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "articles_archived_idx": { - "name": "articles_archived_idx", - "columns": [ - { - "expression": "archived", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_slug_idx": { - "name": "articles_slug_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_keyword_idx": { - "name": "articles_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_template_idx": { - "name": "articles_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_icp_idx": { - "name": "articles_icp_idx", - "columns": [ - { - "expression": "icp_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_research_snapshot_idx": { - "name": "articles_research_research_snapshot_idx", - "columns": [ - { - "expression": "research_snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_status_idx": { - "name": "articles_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_publish_at_idx": { - "name": "articles_publish_at_idx", - "columns": [ - { - "expression": "publish_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_information_gain_information_gain_run_idx": { - "name": "articles_information_gain_information_gain_run_idx", - "columns": [ - { - "expression": "information_gain_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_updated_at_idx": { - "name": "articles_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_created_at_idx": { - "name": "articles_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_template_id_templates_id_fk": { - "name": "articles_template_id_templates_id_fk", - "tableFrom": "articles", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_icp_id_icps_id_fk": { - "name": "articles_icp_id_icps_id_fk", - "tableFrom": "articles", - "tableTo": "icps", - "columnsFrom": [ - "icp_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_research_snapshot_id_corpus_snapshots_id_fk": { - "name": "articles_research_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "articles", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "research_snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_information_gain_run_id_information_gain_runs_id_fk": { - "name": "articles_information_gain_run_id_information_gain_runs_id_fk", - "tableFrom": "articles", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_run_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cost_log": { - "name": "cost_log", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "enum_cost_log_stage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "provider": { - "name": "provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "model": { - "name": "model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "input_tokens": { - "name": "input_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "output_tokens": { - "name": "output_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "web_search_requests": { - "name": "web_search_requests", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "request": { - "name": "request", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cost_log_pipeline_run_id_idx": { - "name": "cost_log_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_article_idx": { - "name": "cost_log_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_updated_at_idx": { - "name": "cost_log_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_created_at_idx": { - "name": "cost_log_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "cost_log_article_id_articles_id_fk": { - "name": "cost_log_article_id_articles_id_fk", - "tableFrom": "cost_log", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.article_audit": { - "name": "article_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_article_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "article_audit_article_idx": { - "name": "article_audit_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_event_idx": { - "name": "article_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_pipeline_run_id_idx": { - "name": "article_audit_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_updated_at_idx": { - "name": "article_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_created_at_idx": { - "name": "article_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "article_audit_article_id_articles_id_fk": { - "name": "article_audit_article_id_articles_id_fk", - "tableFrom": "article_audit", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_core_values": { - "name": "brand_voices_core_values", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "value": { - "name": "value", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_core_values_order_idx": { - "name": "brand_voices_core_values_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_core_values_parent_id_idx": { - "name": "brand_voices_core_values_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_core_values_parent_id_fk": { - "name": "brand_voices_core_values_parent_id_fk", - "tableFrom": "brand_voices_core_values", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_voice_adjectives": { - "name": "brand_voices_voice_adjectives", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "adjective": { - "name": "adjective", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "do_example": { - "name": "do_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "dont_example": { - "name": "dont_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_voice_adjectives_order_idx": { - "name": "brand_voices_voice_adjectives_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_voice_adjectives_parent_id_idx": { - "name": "brand_voices_voice_adjectives_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_voice_adjectives_parent_id_fk": { - "name": "brand_voices_voice_adjectives_parent_id_fk", - "tableFrom": "brand_voices_voice_adjectives", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_not_traits": { - "name": "brand_voices_not_traits", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "trait": { - "name": "trait", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "boundary_note": { - "name": "boundary_note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_not_traits_order_idx": { - "name": "brand_voices_not_traits_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_not_traits_parent_id_idx": { - "name": "brand_voices_not_traits_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_not_traits_parent_id_fk": { - "name": "brand_voices_not_traits_parent_id_fk", - "tableFrom": "brand_voices_not_traits", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_preferred_words": { - "name": "brand_voices_preferred_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_preferred_words_order_idx": { - "name": "brand_voices_preferred_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_preferred_words_parent_id_idx": { - "name": "brand_voices_preferred_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_preferred_words_parent_id_fk": { - "name": "brand_voices_preferred_words_parent_id_fk", - "tableFrom": "brand_voices_preferred_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_banned_words": { - "name": "brand_voices_banned_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_banned_words_order_idx": { - "name": "brand_voices_banned_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_banned_words_parent_id_idx": { - "name": "brand_voices_banned_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_banned_words_parent_id_fk": { - "name": "brand_voices_banned_words_parent_id_fk", - "tableFrom": "brand_voices_banned_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_samples": { - "name": "brand_voices_samples", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "brand_voices_samples_order_idx": { - "name": "brand_voices_samples_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_samples_parent_id_idx": { - "name": "brand_voices_samples_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_samples_parent_id_fk": { - "name": "brand_voices_samples_parent_id_fk", - "tableFrom": "brand_voices_samples", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices": { - "name": "brand_voices", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_brand_voices_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "source": { - "name": "source", - "type": "enum_brand_voices_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'onboarding'" - }, - "source_file_id": { - "name": "source_file_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "onboarding_step": { - "name": "onboarding_step", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_one_liner": { - "name": "essence_one_liner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_mission": { - "name": "essence_mission", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_description": { - "name": "audience_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_language_level": { - "name": "audience_language_level", - "type": "enum_brand_voices_audience_language_level", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "audience_interests": { - "name": "audience_interests", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_needs": { - "name": "audience_needs", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "persona": { - "name": "persona", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "voice_in_own_words": { - "name": "voice_in_own_words", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "tone_formality": { - "name": "tone_formality", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_warmth": { - "name": "tone_warmth", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_boldness": { - "name": "tone_boldness", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_energy": { - "name": "tone_energy", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "extraction_model": { - "name": "extraction_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_provider": { - "name": "extraction_provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_extracted_at": { - "name": "extraction_extracted_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "extraction_source_chars": { - "name": "extraction_source_chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "extraction_warnings": { - "name": "extraction_warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "brand_voices_status_idx": { - "name": "brand_voices_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_source_file_idx": { - "name": "brand_voices_source_file_idx", - "columns": [ - { - "expression": "source_file_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_updated_at_idx": { - "name": "brand_voices_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_created_at_idx": { - "name": "brand_voices_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_source_file_id_brand_voice_files_id_fk": { - "name": "brand_voices_source_file_id_brand_voice_files_id_fk", - "tableFrom": "brand_voices", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "source_file_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voice_files": { - "name": "brand_voice_files", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voice_files_updated_at_idx": { - "name": "brand_voice_files_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_created_at_idx": { - "name": "brand_voice_files_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_filename_idx": { - "name": "brand_voice_files_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains_evidence": { - "name": "icps_pains_evidence", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_evidence_order_idx": { - "name": "icps_pains_evidence_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_evidence_parent_id_idx": { - "name": "icps_pains_evidence_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_evidence_parent_id_fk": { - "name": "icps_pains_evidence_parent_id_fk", - "tableFrom": "icps_pains_evidence", - "tableTo": "icps_pains", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains": { - "name": "icps_pains", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_pains_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_order_idx": { - "name": "icps_pains_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_parent_id_idx": { - "name": "icps_pains_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_parent_id_fk": { - "name": "icps_pains_parent_id_fk", - "tableFrom": "icps_pains", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_solution_sample_lines": { - "name": "icps_solution_sample_lines", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_solution_sample_lines_order_idx": { - "name": "icps_solution_sample_lines_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_solution_sample_lines_parent_id_idx": { - "name": "icps_solution_sample_lines_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_solution_sample_lines_parent_id_fk": { - "name": "icps_solution_sample_lines_parent_id_fk", - "tableFrom": "icps_solution_sample_lines", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_competition": { - "name": "icps_competition", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "competitor": { - "name": "competitor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claimed_at": { - "name": "claimed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_competition_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_competition_order_idx": { - "name": "icps_competition_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_competition_parent_id_idx": { - "name": "icps_competition_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_competition_parent_id_fk": { - "name": "icps_competition_parent_id_fk", - "tableFrom": "icps_competition", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_channels": { - "name": "icps_channels", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "channel": { - "name": "channel", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_channels_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_channels_order_idx": { - "name": "icps_channels_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_channels_parent_id_idx": { - "name": "icps_channels_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_channels_parent_id_fk": { - "name": "icps_channels_parent_id_fk", - "tableFrom": "icps_channels", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_churn_triggers": { - "name": "icps_churn_triggers", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_churn_triggers_order_idx": { - "name": "icps_churn_triggers_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_churn_triggers_parent_id_idx": { - "name": "icps_churn_triggers_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_churn_triggers_parent_id_fk": { - "name": "icps_churn_triggers_parent_id_fk", - "tableFrom": "icps_churn_triggers", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_not_our_user": { - "name": "icps_not_our_user", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_not_our_user_order_idx": { - "name": "icps_not_our_user_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_not_our_user_parent_id_idx": { - "name": "icps_not_our_user_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_not_our_user_parent_id_fk": { - "name": "icps_not_our_user_parent_id_fk", - "tableFrom": "icps_not_our_user", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps": { - "name": "icps", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_icps_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "primary": { - "name": "primary", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "who": { - "name": "who", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_text": { - "name": "motivation_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_hypothesis": { - "name": "motivation_hypothesis", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "motivation_confidence": { - "name": "motivation_confidence", - "type": "enum_icps_motivation_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "solution_mechanism": { - "name": "solution_mechanism", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "solution_confidence": { - "name": "solution_confidence", - "type": "enum_icps_solution_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "why_us_text": { - "name": "why_us_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "why_us_confidence": { - "name": "why_us_confidence", - "type": "enum_icps_why_us_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "icps_status_idx": { - "name": "icps_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_primary_idx": { - "name": "icps_primary_idx", - "columns": [ - { - "expression": "primary", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_updated_at_idx": { - "name": "icps_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_created_at_idx": { - "name": "icps_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit": { - "name": "governance_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "subject_global": { - "name": "subject_global", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_governance_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "governance_audit_subject_global_idx": { - "name": "governance_audit_subject_global_idx", - "columns": [ - { - "expression": "subject_global", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_event_idx": { - "name": "governance_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_updated_at_idx": { - "name": "governance_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_created_at_idx": { - "name": "governance_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit_rels": { - "name": "governance_audit_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "governance_audit_rels_order_idx": { - "name": "governance_audit_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_parent_idx": { - "name": "governance_audit_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_path_idx": { - "name": "governance_audit_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_brand_voices_id_idx": { - "name": "governance_audit_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_evidence_sources_id_idx": { - "name": "governance_audit_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_icps_id_idx": { - "name": "governance_audit_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "governance_audit_rels_parent_fk": { - "name": "governance_audit_rels_parent_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_brand_voices_fk": { - "name": "governance_audit_rels_brand_voices_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_evidence_sources_fk": { - "name": "governance_audit_rels_evidence_sources_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_icps_fk": { - "name": "governance_audit_rels_icps_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_sources": { - "name": "evidence_sources", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "quality_class": { - "name": "quality_class", - "type": "enum_evidence_sources_quality_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active": { - "name": "active", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_sources_domain_idx": { - "name": "evidence_sources_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_updated_at_idx": { - "name": "evidence_sources_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_created_at_idx": { - "name": "evidence_sources_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_source_candidates": { - "name": "evidence_source_candidates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_source_candidates_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "suggested_class": { - "name": "suggested_class", - "type": "enum_evidence_source_candidates_suggested_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "citation_count": { - "name": "citation_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "serp_count": { - "name": "serp_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "last_seen_at": { - "name": "last_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sightings": { - "name": "sightings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "resolved_source_id": { - "name": "resolved_source_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_source_candidates_domain_idx": { - "name": "evidence_source_candidates_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_status_idx": { - "name": "evidence_source_candidates_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_last_seen_at_idx": { - "name": "evidence_source_candidates_last_seen_at_idx", - "columns": [ - { - "expression": "last_seen_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_resolved_source_idx": { - "name": "evidence_source_candidates_resolved_source_idx", - "columns": [ - { - "expression": "resolved_source_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_updated_at_idx": { - "name": "evidence_source_candidates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_created_at_idx": { - "name": "evidence_source_candidates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk": { - "name": "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk", - "tableFrom": "evidence_source_candidates", - "tableTo": "evidence_sources", - "columnsFrom": [ - "resolved_source_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_pages": { - "name": "corpus_snapshots_pages", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "position": { - "name": "position", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "fetch_status": { - "name": "fetch_status", - "type": "enum_corpus_snapshots_pages_fetch_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "failure_reason": { - "name": "failure_reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "chars": { - "name": "chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "text_hash": { - "name": "text_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "unverified_excerpt_count": { - "name": "unverified_excerpt_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_pages_order_idx": { - "name": "corpus_snapshots_pages_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pages_parent_id_idx": { - "name": "corpus_snapshots_pages_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_pages_parent_id_fk": { - "name": "corpus_snapshots_pages_parent_id_fk", - "tableFrom": "corpus_snapshots_pages", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_internal_corpus": { - "name": "corpus_snapshots_internal_corpus", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "article_updated_at": { - "name": "article_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_internal_corpus_order_idx": { - "name": "corpus_snapshots_internal_corpus_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_parent_id_idx": { - "name": "corpus_snapshots_internal_corpus_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_article_idx": { - "name": "corpus_snapshots_internal_corpus_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_internal_corpus_article_id_articles_id_fk": { - "name": "corpus_snapshots_internal_corpus_article_id_articles_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "corpus_snapshots_internal_corpus_parent_id_fk": { - "name": "corpus_snapshots_internal_corpus_parent_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots": { - "name": "corpus_snapshots", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "keyword_key": { - "name": "keyword_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "captured_at": { - "name": "captured_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_corpus_snapshots_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "snapshot_hash": { - "name": "snapshot_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "query_cluster": { - "name": "query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_claims": { - "name": "baseline_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "facets": { - "name": "facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "gaps": { - "name": "gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_doc_count": { - "name": "baseline_doc_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "failed_page_count": { - "name": "failed_page_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "corpus_snapshots_keyword_idx": { - "name": "corpus_snapshots_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_keyword_key_idx": { - "name": "corpus_snapshots_keyword_key_idx", - "columns": [ - { - "expression": "keyword_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pipeline_run_id_idx": { - "name": "corpus_snapshots_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_updated_at_idx": { - "name": "corpus_snapshots_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_created_at_idx": { - "name": "corpus_snapshots_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topic_searches": { - "name": "topic_searches", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "seed": { - "name": "seed", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "seed_key": { - "name": "seed_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "fetched_at": { - "name": "fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "result_count": { - "name": "result_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "candidates": { - "name": "candidates", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "topic_searches_seed_key_idx": { - "name": "topic_searches_seed_key_idx", - "columns": [ - { - "expression": "seed_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_fetched_at_idx": { - "name": "topic_searches_fetched_at_idx", - "columns": [ - { - "expression": "fetched_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_updated_at_idx": { - "name": "topic_searches_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_created_at_idx": { - "name": "topic_searches_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_runs": { - "name": "information_gain_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "snapshot_id": { - "name": "snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "policy_version": { - "name": "policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "policy": { - "name": "policy", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "decision": { - "name": "decision", - "type": "enum_information_gain_runs_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "reasons": { - "name": "reasons", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_available": { - "name": "baseline_available", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "calibrated": { - "name": "calibrated", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "scores_consensus_coverage": { - "name": "scores_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_potential_gain_units": { - "name": "scores_potential_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_units": { - "name": "scores_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verification_ratio": { - "name": "scores_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_density": { - "name": "scores_verified_gain_density", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_facet_gain_coverage": { - "name": "scores_facet_gain_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_internal_duplication_rate": { - "name": "scores_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_total_claims": { - "name": "claim_summary_total_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_materially_novel_claims": { - "name": "claim_summary_materially_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_verified_novel_claims": { - "name": "claim_summary_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_unsupported_novel_claims": { - "name": "claim_summary_unsupported_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_contradictory_claims": { - "name": "claim_summary_contradictory_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_first_party_claims": { - "name": "claim_summary_first_party_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_ids_blocked": { - "name": "claim_ids_blocked", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_review": { - "name": "claim_ids_review", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_materially_novel": { - "name": "claim_ids_materially_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_verified_novel": { - "name": "claim_ids_verified_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claims": { - "name": "claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "token_count": { - "name": "token_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "draft_updated_at": { - "name": "draft_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "information_gain_runs_article_idx": { - "name": "information_gain_runs_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_pipeline_run_id_idx": { - "name": "information_gain_runs_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_snapshot_idx": { - "name": "information_gain_runs_snapshot_idx", - "columns": [ - { - "expression": "snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_decision_idx": { - "name": "information_gain_runs_decision_idx", - "columns": [ - { - "expression": "decision", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_updated_at_idx": { - "name": "information_gain_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_created_at_idx": { - "name": "information_gain_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "information_gain_runs_article_id_articles_id_fk": { - "name": "information_gain_runs_article_id_articles_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "information_gain_runs_snapshot_id_corpus_snapshots_id_fk": { - "name": "information_gain_runs_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs": { - "name": "pipeline_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "run_id": { - "name": "run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "enum_pipeline_runs_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_pipeline_runs_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "mode": { - "name": "mode", - "type": "enum_pipeline_runs_mode", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "requested_count": { - "name": "requested_count", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "config_fingerprint": { - "name": "config_fingerprint", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "config_snapshot": { - "name": "config_snapshot", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "final_statuses": { - "name": "final_statuses", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "warnings": { - "name": "warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "error_summary": { - "name": "error_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "requested_by": { - "name": "requested_by", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "started_at": { - "name": "started_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "pipeline_runs_run_id_idx": { - "name": "pipeline_runs_run_id_idx", - "columns": [ - { - "expression": "run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_status_idx": { - "name": "pipeline_runs_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_template_idx": { - "name": "pipeline_runs_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_config_fingerprint_idx": { - "name": "pipeline_runs_config_fingerprint_idx", - "columns": [ - { - "expression": "config_fingerprint", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_updated_at_idx": { - "name": "pipeline_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_created_at_idx": { - "name": "pipeline_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_template_id_templates_id_fk": { - "name": "pipeline_runs_template_id_templates_id_fk", - "tableFrom": "pipeline_runs", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs_rels": { - "name": "pipeline_runs_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "pipeline_runs_rels_order_idx": { - "name": "pipeline_runs_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_parent_idx": { - "name": "pipeline_runs_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_path_idx": { - "name": "pipeline_runs_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_articles_id_idx": { - "name": "pipeline_runs_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_rels_parent_fk": { - "name": "pipeline_runs_rels_parent_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "pipeline_runs_rels_articles_fk": { - "name": "pipeline_runs_rels_articles_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_kv": { - "name": "payload_kv", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "data": { - "name": "data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "payload_kv_key_idx": { - "name": "payload_kv_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_log": { - "name": "payload_jobs_log", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "executed_at": { - "name": "executed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_log_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "task_i_d": { - "name": "task_i_d", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "output": { - "name": "output", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "state": { - "name": "state", - "type": "enum_payload_jobs_log_state", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_jobs_log_order_idx": { - "name": "payload_jobs_log_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_log_parent_id_idx": { - "name": "payload_jobs_log_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_jobs_log_parent_id_fk": { - "name": "payload_jobs_log_parent_id_fk", - "tableFrom": "payload_jobs_log", - "tableTo": "payload_jobs", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs": { - "name": "payload_jobs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "total_tried": { - "name": "total_tried", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "has_error": { - "name": "has_error", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "queue": { - "name": "queue", - "type": "varchar", - "primaryKey": false, - "notNull": false, - "default": "'default'" - }, - "wait_until": { - "name": "wait_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "processing": { - "name": "processing", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "concurrency_key": { - "name": "concurrency_key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta": { - "name": "meta", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_jobs_completed_at_idx": { - "name": "payload_jobs_completed_at_idx", - "columns": [ - { - "expression": "completed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_total_tried_idx": { - "name": "payload_jobs_total_tried_idx", - "columns": [ - { - "expression": "total_tried", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_has_error_idx": { - "name": "payload_jobs_has_error_idx", - "columns": [ - { - "expression": "has_error", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_task_slug_idx": { - "name": "payload_jobs_task_slug_idx", - "columns": [ - { - "expression": "task_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_queue_idx": { - "name": "payload_jobs_queue_idx", - "columns": [ - { - "expression": "queue", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_wait_until_idx": { - "name": "payload_jobs_wait_until_idx", - "columns": [ - { - "expression": "wait_until", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_processing_idx": { - "name": "payload_jobs_processing_idx", - "columns": [ - { - "expression": "processing", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_concurrency_key_idx": { - "name": "payload_jobs_concurrency_key_idx", - "columns": [ - { - "expression": "concurrency_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_updated_at_idx": { - "name": "payload_jobs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_created_at_idx": { - "name": "payload_jobs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents": { - "name": "payload_locked_documents", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "global_slug": { - "name": "global_slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_locked_documents_global_slug_idx": { - "name": "payload_locked_documents_global_slug_idx", - "columns": [ - { - "expression": "global_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_updated_at_idx": { - "name": "payload_locked_documents_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_created_at_idx": { - "name": "payload_locked_documents_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents_rels": { - "name": "payload_locked_documents_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "media_id": { - "name": "media_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "templates_id": { - "name": "templates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "cost_log_id": { - "name": "cost_log_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "article_audit_id": { - "name": "article_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voice_files_id": { - "name": "brand_voice_files_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "governance_audit_id": { - "name": "governance_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_source_candidates_id": { - "name": "evidence_source_candidates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "corpus_snapshots_id": { - "name": "corpus_snapshots_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "topic_searches_id": { - "name": "topic_searches_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_runs_id": { - "name": "information_gain_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "pipeline_runs_id": { - "name": "pipeline_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_locked_documents_rels_order_idx": { - "name": "payload_locked_documents_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_parent_idx": { - "name": "payload_locked_documents_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_path_idx": { - "name": "payload_locked_documents_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_users_id_idx": { - "name": "payload_locked_documents_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_media_id_idx": { - "name": "payload_locked_documents_rels_media_id_idx", - "columns": [ - { - "expression": "media_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_templates_id_idx": { - "name": "payload_locked_documents_rels_templates_id_idx", - "columns": [ - { - "expression": "templates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_articles_id_idx": { - "name": "payload_locked_documents_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_cost_log_id_idx": { - "name": "payload_locked_documents_rels_cost_log_id_idx", - "columns": [ - { - "expression": "cost_log_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_article_audit_id_idx": { - "name": "payload_locked_documents_rels_article_audit_id_idx", - "columns": [ - { - "expression": "article_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voices_id_idx": { - "name": "payload_locked_documents_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voice_files_id_idx": { - "name": "payload_locked_documents_rels_brand_voice_files_id_idx", - "columns": [ - { - "expression": "brand_voice_files_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_icps_id_idx": { - "name": "payload_locked_documents_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_governance_audit_id_idx": { - "name": "payload_locked_documents_rels_governance_audit_id_idx", - "columns": [ - { - "expression": "governance_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_sources_id_idx": { - "name": "payload_locked_documents_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_source_candidates_idx": { - "name": "payload_locked_documents_rels_evidence_source_candidates_idx", - "columns": [ - { - "expression": "evidence_source_candidates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_corpus_snapshots_id_idx": { - "name": "payload_locked_documents_rels_corpus_snapshots_id_idx", - "columns": [ - { - "expression": "corpus_snapshots_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_topic_searches_id_idx": { - "name": "payload_locked_documents_rels_topic_searches_id_idx", - "columns": [ - { - "expression": "topic_searches_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_information_gain_runs_id_idx": { - "name": "payload_locked_documents_rels_information_gain_runs_id_idx", - "columns": [ - { - "expression": "information_gain_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_pipeline_runs_id_idx": { - "name": "payload_locked_documents_rels_pipeline_runs_id_idx", - "columns": [ - { - "expression": "pipeline_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_locked_documents_rels_parent_fk": { - "name": "payload_locked_documents_rels_parent_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "payload_locked_documents", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_users_fk": { - "name": "payload_locked_documents_rels_users_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_media_fk": { - "name": "payload_locked_documents_rels_media_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "media", - "columnsFrom": [ - "media_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_templates_fk": { - "name": "payload_locked_documents_rels_templates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "templates", - "columnsFrom": [ - "templates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_articles_fk": { - "name": "payload_locked_documents_rels_articles_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_cost_log_fk": { - "name": "payload_locked_documents_rels_cost_log_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "cost_log", - "columnsFrom": [ - "cost_log_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_article_audit_fk": { - "name": "payload_locked_documents_rels_article_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "article_audit", - "columnsFrom": [ - "article_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voices_fk": { - "name": "payload_locked_documents_rels_brand_voices_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voice_files_fk": { - "name": "payload_locked_documents_rels_brand_voice_files_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "brand_voice_files_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_icps_fk": { - "name": "payload_locked_documents_rels_icps_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_governance_audit_fk": { - "name": "payload_locked_documents_rels_governance_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "governance_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_sources_fk": { - "name": "payload_locked_documents_rels_evidence_sources_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_source_candidates_fk": { - "name": "payload_locked_documents_rels_evidence_source_candidates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_source_candidates", - "columnsFrom": [ - "evidence_source_candidates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_corpus_snapshots_fk": { - "name": "payload_locked_documents_rels_corpus_snapshots_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "corpus_snapshots_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_topic_searches_fk": { - "name": "payload_locked_documents_rels_topic_searches_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "topic_searches", - "columnsFrom": [ - "topic_searches_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_information_gain_runs_fk": { - "name": "payload_locked_documents_rels_information_gain_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_pipeline_runs_fk": { - "name": "payload_locked_documents_rels_pipeline_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "pipeline_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences": { - "name": "payload_preferences", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "value": { - "name": "value", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_preferences_key_idx": { - "name": "payload_preferences_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_updated_at_idx": { - "name": "payload_preferences_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_created_at_idx": { - "name": "payload_preferences_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences_rels": { - "name": "payload_preferences_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_preferences_rels_order_idx": { - "name": "payload_preferences_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_parent_idx": { - "name": "payload_preferences_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_path_idx": { - "name": "payload_preferences_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_users_id_idx": { - "name": "payload_preferences_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_preferences_rels_parent_fk": { - "name": "payload_preferences_rels_parent_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "payload_preferences", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_preferences_rels_users_fk": { - "name": "payload_preferences_rels_users_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_migrations": { - "name": "payload_migrations", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "batch": { - "name": "batch", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_migrations_updated_at_idx": { - "name": "payload_migrations_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_migrations_created_at_idx": { - "name": "payload_migrations_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile_competitors": { - "name": "workspace_profile_competitors", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "workspace_profile_competitors_order_idx": { - "name": "workspace_profile_competitors_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "workspace_profile_competitors_parent_id_idx": { - "name": "workspace_profile_competitors_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "workspace_profile_competitors_parent_id_fk": { - "name": "workspace_profile_competitors_parent_id_fk", - "tableFrom": "workspace_profile_competitors", - "tableTo": "workspace_profile", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile": { - "name": "workspace_profile", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "company_name": { - "name": "company_name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "target_domain": { - "name": "target_domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_notes": { - "name": "site_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_pages": { - "name": "site_pages", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "site_pages_fetched_at": { - "name": "site_pages_fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_core_claims": { - "name": "positioning_core_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "evidence_ref": { - "name": "evidence_ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_core_claims_order_idx": { - "name": "positioning_core_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_core_claims_parent_id_idx": { - "name": "positioning_core_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_core_claims_parent_id_fk": { - "name": "positioning_core_claims_parent_id_fk", - "tableFrom": "positioning_core_claims", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_pillars": { - "name": "positioning_pillars", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "one_line": { - "name": "one_line", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "carries": { - "name": "carries", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_pillars_order_idx": { - "name": "positioning_pillars_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_pillars_parent_id_idx": { - "name": "positioning_pillars_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_pillars_parent_id_fk": { - "name": "positioning_pillars_parent_id_fk", - "tableFrom": "positioning_pillars", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_descriptor_ladder": { - "name": "positioning_descriptor_ladder", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "descriptor": { - "name": "descriptor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_descriptor_ladder_order_idx": { - "name": "positioning_descriptor_ladder_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_descriptor_ladder_parent_id_idx": { - "name": "positioning_descriptor_ladder_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_descriptor_ladder_parent_id_fk": { - "name": "positioning_descriptor_ladder_parent_id_fk", - "tableFrom": "positioning_descriptor_ladder", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_reach_for": { - "name": "positioning_vocabulary_reach_for", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_reach_for_order_idx": { - "name": "positioning_vocabulary_reach_for_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_reach_for_parent_id_idx": { - "name": "positioning_vocabulary_reach_for_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_reach_for_parent_id_fk": { - "name": "positioning_vocabulary_reach_for_parent_id_fk", - "tableFrom": "positioning_vocabulary_reach_for", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_avoid": { - "name": "positioning_vocabulary_avoid", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_avoid_order_idx": { - "name": "positioning_vocabulary_avoid_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_avoid_parent_id_idx": { - "name": "positioning_vocabulary_avoid_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_avoid_parent_id_fk": { - "name": "positioning_vocabulary_avoid_parent_id_fk", - "tableFrom": "positioning_vocabulary_avoid", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_open_rulings": { - "name": "positioning_open_rulings", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_positioning_open_rulings_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'open'" - }, - "ruling": { - "name": "ruling", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "ruled_at": { - "name": "ruled_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_open_rulings_order_idx": { - "name": "positioning_open_rulings_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_open_rulings_parent_id_idx": { - "name": "positioning_open_rulings_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_open_rulings_parent_id_fk": { - "name": "positioning_open_rulings_parent_id_fk", - "tableFrom": "positioning_open_rulings", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning": { - "name": "positioning", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "category": { - "name": "category", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "goal": { - "name": "goal", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "promise": { - "name": "promise", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active_position": { - "name": "active_position", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "macro_frame": { - "name": "macro_frame", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "landscape": { - "name": "landscape", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "enemy": { - "name": "enemy", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "archetype": { - "name": "archetype", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence": { - "name": "essence", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims_cleared_surfaces": { - "name": "evidence_bank_verified_claims_cleared_surfaces", - "schema": "", - "columns": { - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "parent_id": { - "name": "parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "enum_evidence_bank_verified_claims_cleared_surfaces", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - } - }, - "indexes": { - "evidence_bank_verified_claims_cleared_surfaces_order_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_cleared_surfaces_parent_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_cleared_surfaces_parent_fk": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_fk", - "tableFrom": "evidence_bank_verified_claims_cleared_surfaces", - "tableTo": "evidence_bank_verified_claims", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims": { - "name": "evidence_bank_verified_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "primary_source": { - "name": "primary_source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_url": { - "name": "source_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_date": { - "name": "source_date", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sample_or_method": { - "name": "sample_or_method", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "verification_depth": { - "name": "verification_depth", - "type": "enum_evidence_bank_verified_claims_verification_depth", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "limits": { - "name": "limits", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "recheck_at": { - "name": "recheck_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_verified_claims_order_idx": { - "name": "evidence_bank_verified_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_parent_id_idx": { - "name": "evidence_bank_verified_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_parent_id_fk": { - "name": "evidence_bank_verified_claims_parent_id_fk", - "tableFrom": "evidence_bank_verified_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_facts": { - "name": "evidence_bank_facts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "fact": { - "name": "fact", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "owner": { - "name": "owner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "last_confirmed_at": { - "name": "last_confirmed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_facts_order_idx": { - "name": "evidence_bank_facts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_facts_parent_id_idx": { - "name": "evidence_bank_facts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_facts_parent_id_fk": { - "name": "evidence_bank_facts_parent_id_fk", - "tableFrom": "evidence_bank_facts", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_rejected_claims": { - "name": "evidence_bank_rejected_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_bank_rejected_claims_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'rejected'" - }, - "reason": { - "name": "reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "replacement": { - "name": "replacement", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_rejected_claims_order_idx": { - "name": "evidence_bank_rejected_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_rejected_claims_parent_id_idx": { - "name": "evidence_bank_rejected_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_rejected_claims_parent_id_fk": { - "name": "evidence_bank_rejected_claims_parent_id_fk", - "tableFrom": "evidence_bank_rejected_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank": { - "name": "evidence_bank", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "ref_counter": { - "name": "ref_counter", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.llm_settings": { - "name": "llm_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "generate_model": { - "name": "generate_model", - "type": "enum_llm_settings_generate_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "fact_check_model": { - "name": "fact_check_model", - "type": "enum_llm_settings_fact_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "qualitative_review_model": { - "name": "qualitative_review_model", - "type": "enum_llm_settings_qualitative_review_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "claim_extraction_model": { - "name": "claim_extraction_model", - "type": "enum_llm_settings_claim_extraction_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_judge_model": { - "name": "information_gain_judge_model", - "type": "enum_llm_settings_information_gain_judge_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_verification_model": { - "name": "evidence_verification_model", - "type": "enum_llm_settings_evidence_verification_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_check_model": { - "name": "evidence_check_model", - "type": "enum_llm_settings_evidence_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "brand_voice_extract_model": { - "name": "brand_voice_extract_model", - "type": "enum_llm_settings_brand_voice_extract_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "setup_assist_model": { - "name": "setup_assist_model", - "type": "enum_llm_settings_setup_assist_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_policy": { - "name": "information_gain_policy", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "min_consensus_coverage": { - "name": "min_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verification_ratio": { - "name": "min_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_novel_factual_integrity": { - "name": "min_novel_factual_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_numeric_temporal_integrity": { - "name": "min_numeric_temporal_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "require_exact_value_match": { - "name": "require_exact_value_match", - "type": "enum_information_gain_policy_require_exact_value_match", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "require_evidence_lineage": { - "name": "require_evidence_lineage", - "type": "enum_information_gain_policy_require_evidence_lineage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "block_first_party_measurements": { - "name": "block_first_party_measurements", - "type": "enum_information_gain_policy_block_first_party_measurements", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "max_contradiction_probability": { - "name": "max_contradiction_probability", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "material_novelty_threshold": { - "name": "material_novelty_threshold", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "max_internal_duplication_rate": { - "name": "max_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verified_novel_claims": { - "name": "min_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.webhook_settings": { - "name": "webhook_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "secret": { - "name": "secret", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_stats": { - "name": "payload_jobs_stats", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "stats": { - "name": "stats", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": { - "public.enum_templates_company_mentions": { - "name": "enum_templates_company_mentions", - "schema": "public", - "values": [ - "none", - "mention", - "feature" - ] - }, - "public.enum_articles_brief_sections_source": { - "name": "enum_articles_brief_sections_source", - "schema": "public", - "values": [ - "template", - "research", - "editor" - ] - }, - "public.enum_articles_status": { - "name": "enum_articles_status", - "schema": "public", - "values": [ - "topic_selected", - "brief_review", - "researched", - "drafted", - "qa_passed", - "verified", - "needs_review", - "blocked", - "needs_revision", - "approved", - "published" - ] - }, - "public.enum_articles_information_gain_decision": { - "name": "enum_articles_information_gain_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_cost_log_stage": { - "name": "enum_cost_log_stage", - "schema": "public", - "values": [ - "generate", - "factCheck", - "qualitativeReview", - "claimExtraction", - "informationGainJudge", - "evidenceVerification", - "evidenceCheck", - "brandVoiceExtract", - "setupAssist" - ] - }, - "public.enum_article_audit_actor_type": { - "name": "enum_article_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_brand_voices_status": { - "name": "enum_brand_voices_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_brand_voices_source": { - "name": "enum_brand_voices_source", - "schema": "public", - "values": [ - "onboarding", - "upload" - ] - }, - "public.enum_brand_voices_audience_language_level": { - "name": "enum_brand_voices_audience_language_level", - "schema": "public", - "values": [ - "plain", - "general", - "professional", - "expert" - ] - }, - "public.enum_icps_pains_confidence": { - "name": "enum_icps_pains_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_competition_confidence": { - "name": "enum_icps_competition_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_channels_confidence": { - "name": "enum_icps_channels_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_status": { - "name": "enum_icps_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_icps_motivation_confidence": { - "name": "enum_icps_motivation_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_solution_confidence": { - "name": "enum_icps_solution_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_why_us_confidence": { - "name": "enum_icps_why_us_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_governance_audit_actor_type": { - "name": "enum_governance_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_evidence_sources_quality_class": { - "name": "enum_evidence_sources_quality_class", - "schema": "public", - "values": [ - "first_party_dataset", - "primary", - "official_docs", - "secondary", - "unverified", - "blocked" - ] - }, - "public.enum_evidence_source_candidates_status": { - "name": "enum_evidence_source_candidates_status", - "schema": "public", - "values": [ - "pending", - "approved", - "dismissed" - ] - }, - "public.enum_evidence_source_candidates_suggested_class": { - "name": "enum_evidence_source_candidates_suggested_class", - "schema": "public", - "values": [ - "primary", - "official_docs", - "secondary", - "unverified" - ] - }, - "public.enum_corpus_snapshots_pages_fetch_status": { - "name": "enum_corpus_snapshots_pages_fetch_status", - "schema": "public", - "values": [ - "ok", - "failed", - "skipped" - ] - }, - "public.enum_corpus_snapshots_status": { - "name": "enum_corpus_snapshots_status", - "schema": "public", - "values": [ - "complete", - "partial", - "empty" - ] - }, - "public.enum_information_gain_runs_decision": { - "name": "enum_information_gain_runs_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_pipeline_runs_source": { - "name": "enum_pipeline_runs_source", - "schema": "public", - "values": [ - "admin", - "cli", - "selected" - ] - }, - "public.enum_pipeline_runs_status": { - "name": "enum_pipeline_runs_status", - "schema": "public", - "values": [ - "queued", - "running", - "succeeded", - "failed" - ] - }, - "public.enum_pipeline_runs_mode": { - "name": "enum_pipeline_runs_mode", - "schema": "public", - "values": [ - "mock", - "live" - ] - }, - "public.enum_payload_jobs_log_task_slug": { - "name": "enum_payload_jobs_log_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due" - ] - }, - "public.enum_payload_jobs_log_state": { - "name": "enum_payload_jobs_log_state", - "schema": "public", - "values": [ - "failed", - "succeeded" - ] - }, - "public.enum_payload_jobs_task_slug": { - "name": "enum_payload_jobs_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due" - ] - }, - "public.enum_positioning_open_rulings_status": { - "name": "enum_positioning_open_rulings_status", - "schema": "public", - "values": [ - "open", - "ruled" - ] - }, - "public.enum_evidence_bank_verified_claims_cleared_surfaces": { - "name": "enum_evidence_bank_verified_claims_cleared_surfaces", - "schema": "public", - "values": [ - "web", - "blog", - "ads", - "sales", - "social", - "pr" - ] - }, - "public.enum_evidence_bank_verified_claims_verification_depth": { - "name": "enum_evidence_bank_verified_claims_verification_depth", - "schema": "public", - "values": [ - "primary_document", - "reproduced", - "third_party_audit", - "self_reported" - ] - }, - "public.enum_evidence_bank_rejected_claims_status": { - "name": "enum_evidence_bank_rejected_claims_status", - "schema": "public", - "values": [ - "rejected", - "expired" - ] - }, - "public.enum_llm_settings_generate_model": { - "name": "enum_llm_settings_generate_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_fact_check_model": { - "name": "enum_llm_settings_fact_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_qualitative_review_model": { - "name": "enum_llm_settings_qualitative_review_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_claim_extraction_model": { - "name": "enum_llm_settings_claim_extraction_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_information_gain_judge_model": { - "name": "enum_llm_settings_information_gain_judge_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_verification_model": { - "name": "enum_llm_settings_evidence_verification_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_check_model": { - "name": "enum_llm_settings_evidence_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_brand_voice_extract_model": { - "name": "enum_llm_settings_brand_voice_extract_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_setup_assist_model": { - "name": "enum_llm_settings_setup_assist_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_information_gain_policy_require_exact_value_match": { - "name": "enum_information_gain_policy_require_exact_value_match", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_require_evidence_lineage": { - "name": "enum_information_gain_policy_require_evidence_lineage", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_block_first_party_measurements": { - "name": "enum_information_gain_policy_block_first_party_measurements", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "a0a5f510-926c-4fb6-a679-eb157859c797", - "prevId": "00000000-0000-0000-0000-000000000000" -} \ No newline at end of file diff --git a/cms/src/migrations/20261007_133223_brief_angles.json b/cms/src/migrations/20261007_133223_brief_angles.json deleted file mode 100644 index b7dca257..00000000 --- a/cms/src/migrations/20261007_133223_brief_angles.json +++ /dev/null @@ -1,9439 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users_sessions": { - "name": "users_sessions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "users_sessions_order_idx": { - "name": "users_sessions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_sessions_parent_id_idx": { - "name": "users_sessions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "users_sessions_parent_id_fk": { - "name": "users_sessions_parent_id_fk", - "tableFrom": "users_sessions", - "tableTo": "users", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "email": { - "name": "email", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "reset_password_token": { - "name": "reset_password_token", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "reset_password_expiration": { - "name": "reset_password_expiration", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "salt": { - "name": "salt", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "hash": { - "name": "hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "login_attempts": { - "name": "login_attempts", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "lock_until": { - "name": "lock_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "users_updated_at_idx": { - "name": "users_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_created_at_idx": { - "name": "users_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_email_idx": { - "name": "users_email_idx", - "columns": [ - { - "expression": "email", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.media": { - "name": "media", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "media_updated_at_idx": { - "name": "media_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_created_at_idx": { - "name": "media_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_filename_idx": { - "name": "media_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_dos": { - "name": "templates_dos", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_dos_order_idx": { - "name": "templates_dos_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_dos_parent_id_idx": { - "name": "templates_dos_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_dos_parent_id_fk": { - "name": "templates_dos_parent_id_fk", - "tableFrom": "templates_dos", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_donts": { - "name": "templates_donts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_donts_order_idx": { - "name": "templates_donts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_donts_parent_id_idx": { - "name": "templates_donts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_donts_parent_id_fk": { - "name": "templates_donts_parent_id_fk", - "tableFrom": "templates_donts", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_required_sections": { - "name": "templates_required_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_required_sections_order_idx": { - "name": "templates_required_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_required_sections_parent_id_idx": { - "name": "templates_required_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_required_sections_parent_id_fk": { - "name": "templates_required_sections_parent_id_fk", - "tableFrom": "templates_required_sections", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates": { - "name": "templates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "intent": { - "name": "intent", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "company_mentions": { - "name": "company_mentions", - "type": "enum_templates_company_mentions", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'mention'" - }, - "outline": { - "name": "outline", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "example": { - "name": "example", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "seo_spec_title_tag_max_length": { - "name": "seo_spec_title_tag_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 60 - }, - "seo_spec_meta_description_max_length": { - "name": "seo_spec_meta_description_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 160 - }, - "seo_spec_heading_structure_rules": { - "name": "seo_spec_heading_structure_rules", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_required": { - "name": "seo_spec_faq_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_min_questions": { - "name": "seo_spec_faq_min_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_max_questions": { - "name": "seo_spec_faq_max_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_og_tags_required": { - "name": "seo_spec_og_tags_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "templates_name_idx": { - "name": "templates_name_idx", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_updated_at_idx": { - "name": "templates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_created_at_idx": { - "name": "templates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_secondary_keywords": { - "name": "articles_secondary_keywords", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_secondary_keywords_order_idx": { - "name": "articles_secondary_keywords_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_secondary_keywords_parent_id_idx": { - "name": "articles_secondary_keywords_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_secondary_keywords_parent_id_fk": { - "name": "articles_secondary_keywords_parent_id_fk", - "tableFrom": "articles_secondary_keywords", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_common_subtopics": { - "name": "articles_research_common_subtopics", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_common_subtopics_order_idx": { - "name": "articles_research_common_subtopics_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_common_subtopics_parent_id_idx": { - "name": "articles_research_common_subtopics_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_common_subtopics_parent_id_fk": { - "name": "articles_research_common_subtopics_parent_id_fk", - "tableFrom": "articles_research_common_subtopics", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_related_questions": { - "name": "articles_research_related_questions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_related_questions_order_idx": { - "name": "articles_research_related_questions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_related_questions_parent_id_idx": { - "name": "articles_research_related_questions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_related_questions_parent_id_fk": { - "name": "articles_research_related_questions_parent_id_fk", - "tableFrom": "articles_research_related_questions", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_brief_sections": { - "name": "articles_brief_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "enum_articles_brief_sections_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "articles_brief_sections_order_idx": { - "name": "articles_brief_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_brief_sections_parent_id_idx": { - "name": "articles_brief_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_brief_sections_parent_id_fk": { - "name": "articles_brief_sections_parent_id_fk", - "tableFrom": "articles_brief_sections", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_faq_items": { - "name": "articles_faq_items", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "answer": { - "name": "answer", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_faq_items_order_idx": { - "name": "articles_faq_items_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_faq_items_parent_id_idx": { - "name": "articles_faq_items_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_faq_items_parent_id_fk": { - "name": "articles_faq_items_parent_id_fk", - "tableFrom": "articles_faq_items", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "archived": { - "name": "archived", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "slug": { - "name": "slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icp_id": { - "name": "icp_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_ranking_pages_summary": { - "name": "research_ranking_pages_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "research_snapshot_id": { - "name": "research_snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_query_cluster": { - "name": "research_query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_facets": { - "name": "research_facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_gaps": { - "name": "research_gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_angle": { - "name": "brief_angle", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_angle_options": { - "name": "brief_angle_options", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_audience": { - "name": "brief_audience", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_must_cover": { - "name": "brief_must_cover", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_opportunities": { - "name": "brief_opportunities", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_notes": { - "name": "brief_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_approved_at": { - "name": "brief_approved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "brief_approved_by": { - "name": "brief_approved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "body": { - "name": "body", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "title_tag": { - "name": "title_tag", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta_description": { - "name": "meta_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_title": { - "name": "og_title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_description": { - "name": "og_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_image": { - "name": "og_image", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "enum_articles_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'topic_selected'" - }, - "publish_at": { - "name": "publish_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "evidence_citations": { - "name": "evidence_citations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_passed": { - "name": "qa_results_structural_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_violations": { - "name": "qa_results_structural_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_passed": { - "name": "qa_results_fact_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_notes": { - "name": "qa_results_fact_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_sources": { - "name": "qa_results_fact_check_sources", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_passed": { - "name": "qa_results_qualitative_review_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_notes": { - "name": "qa_results_qualitative_review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_score": { - "name": "qa_results_qualitative_review_voice_score", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_notes": { - "name": "qa_results_qualitative_review_voice_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_not_trait_violations": { - "name": "qa_results_qualitative_review_not_trait_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_passed": { - "name": "qa_results_evidence_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_notes": { - "name": "qa_results_evidence_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_claims": { - "name": "qa_results_evidence_check_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "information_gain_run_id": { - "name": "information_gain_run_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_decision": { - "name": "information_gain_decision", - "type": "enum_articles_information_gain_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_policy_version": { - "name": "information_gain_policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "information_gain_consensus_coverage": { - "name": "information_gain_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_gain_units": { - "name": "information_gain_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verification_ratio": { - "name": "information_gain_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_internal_duplication_rate": { - "name": "information_gain_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_novel_claims": { - "name": "information_gain_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_scored_at": { - "name": "information_gain_scored_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "generation_model": { - "name": "generation_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_models": { - "name": "qa_models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "total_cost_usd": { - "name": "total_cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_notes": { - "name": "review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_justification": { - "name": "review_justification", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_notes": { - "name": "revision_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_count": { - "name": "revision_count", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "published_at": { - "name": "published_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "articles_archived_idx": { - "name": "articles_archived_idx", - "columns": [ - { - "expression": "archived", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_slug_idx": { - "name": "articles_slug_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_keyword_idx": { - "name": "articles_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_template_idx": { - "name": "articles_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_icp_idx": { - "name": "articles_icp_idx", - "columns": [ - { - "expression": "icp_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_research_snapshot_idx": { - "name": "articles_research_research_snapshot_idx", - "columns": [ - { - "expression": "research_snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_status_idx": { - "name": "articles_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_publish_at_idx": { - "name": "articles_publish_at_idx", - "columns": [ - { - "expression": "publish_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_information_gain_information_gain_run_idx": { - "name": "articles_information_gain_information_gain_run_idx", - "columns": [ - { - "expression": "information_gain_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_updated_at_idx": { - "name": "articles_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_created_at_idx": { - "name": "articles_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_template_id_templates_id_fk": { - "name": "articles_template_id_templates_id_fk", - "tableFrom": "articles", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_icp_id_icps_id_fk": { - "name": "articles_icp_id_icps_id_fk", - "tableFrom": "articles", - "tableTo": "icps", - "columnsFrom": [ - "icp_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_research_snapshot_id_corpus_snapshots_id_fk": { - "name": "articles_research_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "articles", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "research_snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_information_gain_run_id_information_gain_runs_id_fk": { - "name": "articles_information_gain_run_id_information_gain_runs_id_fk", - "tableFrom": "articles", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_run_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cost_log": { - "name": "cost_log", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "enum_cost_log_stage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "provider": { - "name": "provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "model": { - "name": "model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "input_tokens": { - "name": "input_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "output_tokens": { - "name": "output_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "web_search_requests": { - "name": "web_search_requests", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "request": { - "name": "request", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cost_log_pipeline_run_id_idx": { - "name": "cost_log_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_article_idx": { - "name": "cost_log_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_updated_at_idx": { - "name": "cost_log_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_created_at_idx": { - "name": "cost_log_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "cost_log_article_id_articles_id_fk": { - "name": "cost_log_article_id_articles_id_fk", - "tableFrom": "cost_log", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.article_audit": { - "name": "article_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_article_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "article_audit_article_idx": { - "name": "article_audit_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_event_idx": { - "name": "article_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_pipeline_run_id_idx": { - "name": "article_audit_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_updated_at_idx": { - "name": "article_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_created_at_idx": { - "name": "article_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "article_audit_article_id_articles_id_fk": { - "name": "article_audit_article_id_articles_id_fk", - "tableFrom": "article_audit", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_core_values": { - "name": "brand_voices_core_values", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "value": { - "name": "value", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_core_values_order_idx": { - "name": "brand_voices_core_values_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_core_values_parent_id_idx": { - "name": "brand_voices_core_values_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_core_values_parent_id_fk": { - "name": "brand_voices_core_values_parent_id_fk", - "tableFrom": "brand_voices_core_values", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_voice_adjectives": { - "name": "brand_voices_voice_adjectives", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "adjective": { - "name": "adjective", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "do_example": { - "name": "do_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "dont_example": { - "name": "dont_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_voice_adjectives_order_idx": { - "name": "brand_voices_voice_adjectives_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_voice_adjectives_parent_id_idx": { - "name": "brand_voices_voice_adjectives_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_voice_adjectives_parent_id_fk": { - "name": "brand_voices_voice_adjectives_parent_id_fk", - "tableFrom": "brand_voices_voice_adjectives", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_not_traits": { - "name": "brand_voices_not_traits", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "trait": { - "name": "trait", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "boundary_note": { - "name": "boundary_note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_not_traits_order_idx": { - "name": "brand_voices_not_traits_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_not_traits_parent_id_idx": { - "name": "brand_voices_not_traits_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_not_traits_parent_id_fk": { - "name": "brand_voices_not_traits_parent_id_fk", - "tableFrom": "brand_voices_not_traits", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_preferred_words": { - "name": "brand_voices_preferred_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_preferred_words_order_idx": { - "name": "brand_voices_preferred_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_preferred_words_parent_id_idx": { - "name": "brand_voices_preferred_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_preferred_words_parent_id_fk": { - "name": "brand_voices_preferred_words_parent_id_fk", - "tableFrom": "brand_voices_preferred_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_banned_words": { - "name": "brand_voices_banned_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_banned_words_order_idx": { - "name": "brand_voices_banned_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_banned_words_parent_id_idx": { - "name": "brand_voices_banned_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_banned_words_parent_id_fk": { - "name": "brand_voices_banned_words_parent_id_fk", - "tableFrom": "brand_voices_banned_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_samples": { - "name": "brand_voices_samples", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "brand_voices_samples_order_idx": { - "name": "brand_voices_samples_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_samples_parent_id_idx": { - "name": "brand_voices_samples_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_samples_parent_id_fk": { - "name": "brand_voices_samples_parent_id_fk", - "tableFrom": "brand_voices_samples", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices": { - "name": "brand_voices", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_brand_voices_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "source": { - "name": "source", - "type": "enum_brand_voices_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'onboarding'" - }, - "source_file_id": { - "name": "source_file_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "onboarding_step": { - "name": "onboarding_step", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_one_liner": { - "name": "essence_one_liner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_mission": { - "name": "essence_mission", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_description": { - "name": "audience_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_language_level": { - "name": "audience_language_level", - "type": "enum_brand_voices_audience_language_level", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "audience_interests": { - "name": "audience_interests", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_needs": { - "name": "audience_needs", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "persona": { - "name": "persona", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "voice_in_own_words": { - "name": "voice_in_own_words", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "tone_formality": { - "name": "tone_formality", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_warmth": { - "name": "tone_warmth", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_boldness": { - "name": "tone_boldness", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_energy": { - "name": "tone_energy", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "extraction_model": { - "name": "extraction_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_provider": { - "name": "extraction_provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_extracted_at": { - "name": "extraction_extracted_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "extraction_source_chars": { - "name": "extraction_source_chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "extraction_warnings": { - "name": "extraction_warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "brand_voices_status_idx": { - "name": "brand_voices_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_source_file_idx": { - "name": "brand_voices_source_file_idx", - "columns": [ - { - "expression": "source_file_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_updated_at_idx": { - "name": "brand_voices_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_created_at_idx": { - "name": "brand_voices_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_source_file_id_brand_voice_files_id_fk": { - "name": "brand_voices_source_file_id_brand_voice_files_id_fk", - "tableFrom": "brand_voices", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "source_file_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voice_files": { - "name": "brand_voice_files", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voice_files_updated_at_idx": { - "name": "brand_voice_files_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_created_at_idx": { - "name": "brand_voice_files_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_filename_idx": { - "name": "brand_voice_files_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains_evidence": { - "name": "icps_pains_evidence", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_evidence_order_idx": { - "name": "icps_pains_evidence_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_evidence_parent_id_idx": { - "name": "icps_pains_evidence_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_evidence_parent_id_fk": { - "name": "icps_pains_evidence_parent_id_fk", - "tableFrom": "icps_pains_evidence", - "tableTo": "icps_pains", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains": { - "name": "icps_pains", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_pains_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_order_idx": { - "name": "icps_pains_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_parent_id_idx": { - "name": "icps_pains_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_parent_id_fk": { - "name": "icps_pains_parent_id_fk", - "tableFrom": "icps_pains", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_solution_sample_lines": { - "name": "icps_solution_sample_lines", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_solution_sample_lines_order_idx": { - "name": "icps_solution_sample_lines_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_solution_sample_lines_parent_id_idx": { - "name": "icps_solution_sample_lines_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_solution_sample_lines_parent_id_fk": { - "name": "icps_solution_sample_lines_parent_id_fk", - "tableFrom": "icps_solution_sample_lines", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_competition": { - "name": "icps_competition", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "competitor": { - "name": "competitor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claimed_at": { - "name": "claimed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_competition_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_competition_order_idx": { - "name": "icps_competition_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_competition_parent_id_idx": { - "name": "icps_competition_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_competition_parent_id_fk": { - "name": "icps_competition_parent_id_fk", - "tableFrom": "icps_competition", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_channels": { - "name": "icps_channels", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "channel": { - "name": "channel", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_channels_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_channels_order_idx": { - "name": "icps_channels_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_channels_parent_id_idx": { - "name": "icps_channels_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_channels_parent_id_fk": { - "name": "icps_channels_parent_id_fk", - "tableFrom": "icps_channels", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_churn_triggers": { - "name": "icps_churn_triggers", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_churn_triggers_order_idx": { - "name": "icps_churn_triggers_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_churn_triggers_parent_id_idx": { - "name": "icps_churn_triggers_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_churn_triggers_parent_id_fk": { - "name": "icps_churn_triggers_parent_id_fk", - "tableFrom": "icps_churn_triggers", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_not_our_user": { - "name": "icps_not_our_user", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_not_our_user_order_idx": { - "name": "icps_not_our_user_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_not_our_user_parent_id_idx": { - "name": "icps_not_our_user_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_not_our_user_parent_id_fk": { - "name": "icps_not_our_user_parent_id_fk", - "tableFrom": "icps_not_our_user", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps": { - "name": "icps", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_icps_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "primary": { - "name": "primary", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "who": { - "name": "who", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_text": { - "name": "motivation_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_hypothesis": { - "name": "motivation_hypothesis", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "motivation_confidence": { - "name": "motivation_confidence", - "type": "enum_icps_motivation_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "solution_mechanism": { - "name": "solution_mechanism", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "solution_confidence": { - "name": "solution_confidence", - "type": "enum_icps_solution_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "why_us_text": { - "name": "why_us_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "why_us_confidence": { - "name": "why_us_confidence", - "type": "enum_icps_why_us_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "icps_status_idx": { - "name": "icps_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_primary_idx": { - "name": "icps_primary_idx", - "columns": [ - { - "expression": "primary", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_updated_at_idx": { - "name": "icps_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_created_at_idx": { - "name": "icps_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit": { - "name": "governance_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "subject_global": { - "name": "subject_global", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_governance_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "governance_audit_subject_global_idx": { - "name": "governance_audit_subject_global_idx", - "columns": [ - { - "expression": "subject_global", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_event_idx": { - "name": "governance_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_updated_at_idx": { - "name": "governance_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_created_at_idx": { - "name": "governance_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit_rels": { - "name": "governance_audit_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "governance_audit_rels_order_idx": { - "name": "governance_audit_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_parent_idx": { - "name": "governance_audit_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_path_idx": { - "name": "governance_audit_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_brand_voices_id_idx": { - "name": "governance_audit_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_evidence_sources_id_idx": { - "name": "governance_audit_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_icps_id_idx": { - "name": "governance_audit_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "governance_audit_rels_parent_fk": { - "name": "governance_audit_rels_parent_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_brand_voices_fk": { - "name": "governance_audit_rels_brand_voices_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_evidence_sources_fk": { - "name": "governance_audit_rels_evidence_sources_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_icps_fk": { - "name": "governance_audit_rels_icps_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_sources": { - "name": "evidence_sources", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "quality_class": { - "name": "quality_class", - "type": "enum_evidence_sources_quality_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active": { - "name": "active", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_sources_domain_idx": { - "name": "evidence_sources_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_updated_at_idx": { - "name": "evidence_sources_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_created_at_idx": { - "name": "evidence_sources_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_source_candidates": { - "name": "evidence_source_candidates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_source_candidates_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "suggested_class": { - "name": "suggested_class", - "type": "enum_evidence_source_candidates_suggested_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "citation_count": { - "name": "citation_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "serp_count": { - "name": "serp_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "last_seen_at": { - "name": "last_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sightings": { - "name": "sightings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "resolved_source_id": { - "name": "resolved_source_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_source_candidates_domain_idx": { - "name": "evidence_source_candidates_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_status_idx": { - "name": "evidence_source_candidates_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_last_seen_at_idx": { - "name": "evidence_source_candidates_last_seen_at_idx", - "columns": [ - { - "expression": "last_seen_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_resolved_source_idx": { - "name": "evidence_source_candidates_resolved_source_idx", - "columns": [ - { - "expression": "resolved_source_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_updated_at_idx": { - "name": "evidence_source_candidates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_created_at_idx": { - "name": "evidence_source_candidates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk": { - "name": "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk", - "tableFrom": "evidence_source_candidates", - "tableTo": "evidence_sources", - "columnsFrom": [ - "resolved_source_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_pages": { - "name": "corpus_snapshots_pages", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "position": { - "name": "position", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "fetch_status": { - "name": "fetch_status", - "type": "enum_corpus_snapshots_pages_fetch_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "failure_reason": { - "name": "failure_reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "chars": { - "name": "chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "text_hash": { - "name": "text_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "unverified_excerpt_count": { - "name": "unverified_excerpt_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_pages_order_idx": { - "name": "corpus_snapshots_pages_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pages_parent_id_idx": { - "name": "corpus_snapshots_pages_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_pages_parent_id_fk": { - "name": "corpus_snapshots_pages_parent_id_fk", - "tableFrom": "corpus_snapshots_pages", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_internal_corpus": { - "name": "corpus_snapshots_internal_corpus", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "article_updated_at": { - "name": "article_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_internal_corpus_order_idx": { - "name": "corpus_snapshots_internal_corpus_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_parent_id_idx": { - "name": "corpus_snapshots_internal_corpus_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_article_idx": { - "name": "corpus_snapshots_internal_corpus_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_internal_corpus_article_id_articles_id_fk": { - "name": "corpus_snapshots_internal_corpus_article_id_articles_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "corpus_snapshots_internal_corpus_parent_id_fk": { - "name": "corpus_snapshots_internal_corpus_parent_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots": { - "name": "corpus_snapshots", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "keyword_key": { - "name": "keyword_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "captured_at": { - "name": "captured_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_corpus_snapshots_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "snapshot_hash": { - "name": "snapshot_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "query_cluster": { - "name": "query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_claims": { - "name": "baseline_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "facets": { - "name": "facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "gaps": { - "name": "gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_doc_count": { - "name": "baseline_doc_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "failed_page_count": { - "name": "failed_page_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "corpus_snapshots_keyword_idx": { - "name": "corpus_snapshots_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_keyword_key_idx": { - "name": "corpus_snapshots_keyword_key_idx", - "columns": [ - { - "expression": "keyword_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pipeline_run_id_idx": { - "name": "corpus_snapshots_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_updated_at_idx": { - "name": "corpus_snapshots_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_created_at_idx": { - "name": "corpus_snapshots_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topic_searches": { - "name": "topic_searches", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "seed": { - "name": "seed", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "seed_key": { - "name": "seed_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "fetched_at": { - "name": "fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "result_count": { - "name": "result_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "candidates": { - "name": "candidates", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "topic_searches_seed_key_idx": { - "name": "topic_searches_seed_key_idx", - "columns": [ - { - "expression": "seed_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_fetched_at_idx": { - "name": "topic_searches_fetched_at_idx", - "columns": [ - { - "expression": "fetched_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_updated_at_idx": { - "name": "topic_searches_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_created_at_idx": { - "name": "topic_searches_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_runs": { - "name": "information_gain_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "snapshot_id": { - "name": "snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "policy_version": { - "name": "policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "policy": { - "name": "policy", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "decision": { - "name": "decision", - "type": "enum_information_gain_runs_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "reasons": { - "name": "reasons", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_available": { - "name": "baseline_available", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "calibrated": { - "name": "calibrated", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "scores_consensus_coverage": { - "name": "scores_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_potential_gain_units": { - "name": "scores_potential_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_units": { - "name": "scores_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verification_ratio": { - "name": "scores_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_density": { - "name": "scores_verified_gain_density", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_facet_gain_coverage": { - "name": "scores_facet_gain_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_internal_duplication_rate": { - "name": "scores_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_total_claims": { - "name": "claim_summary_total_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_materially_novel_claims": { - "name": "claim_summary_materially_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_verified_novel_claims": { - "name": "claim_summary_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_unsupported_novel_claims": { - "name": "claim_summary_unsupported_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_contradictory_claims": { - "name": "claim_summary_contradictory_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_first_party_claims": { - "name": "claim_summary_first_party_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_ids_blocked": { - "name": "claim_ids_blocked", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_review": { - "name": "claim_ids_review", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_materially_novel": { - "name": "claim_ids_materially_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_verified_novel": { - "name": "claim_ids_verified_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claims": { - "name": "claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "token_count": { - "name": "token_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "draft_updated_at": { - "name": "draft_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "information_gain_runs_article_idx": { - "name": "information_gain_runs_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_pipeline_run_id_idx": { - "name": "information_gain_runs_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_snapshot_idx": { - "name": "information_gain_runs_snapshot_idx", - "columns": [ - { - "expression": "snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_decision_idx": { - "name": "information_gain_runs_decision_idx", - "columns": [ - { - "expression": "decision", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_updated_at_idx": { - "name": "information_gain_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_created_at_idx": { - "name": "information_gain_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "information_gain_runs_article_id_articles_id_fk": { - "name": "information_gain_runs_article_id_articles_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "information_gain_runs_snapshot_id_corpus_snapshots_id_fk": { - "name": "information_gain_runs_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs": { - "name": "pipeline_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "run_id": { - "name": "run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "enum_pipeline_runs_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_pipeline_runs_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "mode": { - "name": "mode", - "type": "enum_pipeline_runs_mode", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "requested_count": { - "name": "requested_count", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "config_fingerprint": { - "name": "config_fingerprint", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "config_snapshot": { - "name": "config_snapshot", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "final_statuses": { - "name": "final_statuses", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "warnings": { - "name": "warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "error_summary": { - "name": "error_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "requested_by": { - "name": "requested_by", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "started_at": { - "name": "started_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "pipeline_runs_run_id_idx": { - "name": "pipeline_runs_run_id_idx", - "columns": [ - { - "expression": "run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_status_idx": { - "name": "pipeline_runs_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_template_idx": { - "name": "pipeline_runs_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_config_fingerprint_idx": { - "name": "pipeline_runs_config_fingerprint_idx", - "columns": [ - { - "expression": "config_fingerprint", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_updated_at_idx": { - "name": "pipeline_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_created_at_idx": { - "name": "pipeline_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_template_id_templates_id_fk": { - "name": "pipeline_runs_template_id_templates_id_fk", - "tableFrom": "pipeline_runs", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs_rels": { - "name": "pipeline_runs_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "pipeline_runs_rels_order_idx": { - "name": "pipeline_runs_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_parent_idx": { - "name": "pipeline_runs_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_path_idx": { - "name": "pipeline_runs_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_articles_id_idx": { - "name": "pipeline_runs_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_rels_parent_fk": { - "name": "pipeline_runs_rels_parent_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "pipeline_runs_rels_articles_fk": { - "name": "pipeline_runs_rels_articles_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_kv": { - "name": "payload_kv", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "data": { - "name": "data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "payload_kv_key_idx": { - "name": "payload_kv_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_log": { - "name": "payload_jobs_log", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "executed_at": { - "name": "executed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_log_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "task_i_d": { - "name": "task_i_d", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "output": { - "name": "output", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "state": { - "name": "state", - "type": "enum_payload_jobs_log_state", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_jobs_log_order_idx": { - "name": "payload_jobs_log_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_log_parent_id_idx": { - "name": "payload_jobs_log_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_jobs_log_parent_id_fk": { - "name": "payload_jobs_log_parent_id_fk", - "tableFrom": "payload_jobs_log", - "tableTo": "payload_jobs", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs": { - "name": "payload_jobs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "total_tried": { - "name": "total_tried", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "has_error": { - "name": "has_error", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "queue": { - "name": "queue", - "type": "varchar", - "primaryKey": false, - "notNull": false, - "default": "'default'" - }, - "wait_until": { - "name": "wait_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "processing": { - "name": "processing", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "concurrency_key": { - "name": "concurrency_key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta": { - "name": "meta", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_jobs_completed_at_idx": { - "name": "payload_jobs_completed_at_idx", - "columns": [ - { - "expression": "completed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_total_tried_idx": { - "name": "payload_jobs_total_tried_idx", - "columns": [ - { - "expression": "total_tried", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_has_error_idx": { - "name": "payload_jobs_has_error_idx", - "columns": [ - { - "expression": "has_error", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_task_slug_idx": { - "name": "payload_jobs_task_slug_idx", - "columns": [ - { - "expression": "task_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_queue_idx": { - "name": "payload_jobs_queue_idx", - "columns": [ - { - "expression": "queue", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_wait_until_idx": { - "name": "payload_jobs_wait_until_idx", - "columns": [ - { - "expression": "wait_until", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_processing_idx": { - "name": "payload_jobs_processing_idx", - "columns": [ - { - "expression": "processing", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_concurrency_key_idx": { - "name": "payload_jobs_concurrency_key_idx", - "columns": [ - { - "expression": "concurrency_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_updated_at_idx": { - "name": "payload_jobs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_created_at_idx": { - "name": "payload_jobs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents": { - "name": "payload_locked_documents", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "global_slug": { - "name": "global_slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_locked_documents_global_slug_idx": { - "name": "payload_locked_documents_global_slug_idx", - "columns": [ - { - "expression": "global_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_updated_at_idx": { - "name": "payload_locked_documents_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_created_at_idx": { - "name": "payload_locked_documents_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents_rels": { - "name": "payload_locked_documents_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "media_id": { - "name": "media_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "templates_id": { - "name": "templates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "cost_log_id": { - "name": "cost_log_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "article_audit_id": { - "name": "article_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voice_files_id": { - "name": "brand_voice_files_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "governance_audit_id": { - "name": "governance_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_source_candidates_id": { - "name": "evidence_source_candidates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "corpus_snapshots_id": { - "name": "corpus_snapshots_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "topic_searches_id": { - "name": "topic_searches_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_runs_id": { - "name": "information_gain_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "pipeline_runs_id": { - "name": "pipeline_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_locked_documents_rels_order_idx": { - "name": "payload_locked_documents_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_parent_idx": { - "name": "payload_locked_documents_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_path_idx": { - "name": "payload_locked_documents_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_users_id_idx": { - "name": "payload_locked_documents_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_media_id_idx": { - "name": "payload_locked_documents_rels_media_id_idx", - "columns": [ - { - "expression": "media_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_templates_id_idx": { - "name": "payload_locked_documents_rels_templates_id_idx", - "columns": [ - { - "expression": "templates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_articles_id_idx": { - "name": "payload_locked_documents_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_cost_log_id_idx": { - "name": "payload_locked_documents_rels_cost_log_id_idx", - "columns": [ - { - "expression": "cost_log_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_article_audit_id_idx": { - "name": "payload_locked_documents_rels_article_audit_id_idx", - "columns": [ - { - "expression": "article_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voices_id_idx": { - "name": "payload_locked_documents_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voice_files_id_idx": { - "name": "payload_locked_documents_rels_brand_voice_files_id_idx", - "columns": [ - { - "expression": "brand_voice_files_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_icps_id_idx": { - "name": "payload_locked_documents_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_governance_audit_id_idx": { - "name": "payload_locked_documents_rels_governance_audit_id_idx", - "columns": [ - { - "expression": "governance_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_sources_id_idx": { - "name": "payload_locked_documents_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_source_candidates_idx": { - "name": "payload_locked_documents_rels_evidence_source_candidates_idx", - "columns": [ - { - "expression": "evidence_source_candidates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_corpus_snapshots_id_idx": { - "name": "payload_locked_documents_rels_corpus_snapshots_id_idx", - "columns": [ - { - "expression": "corpus_snapshots_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_topic_searches_id_idx": { - "name": "payload_locked_documents_rels_topic_searches_id_idx", - "columns": [ - { - "expression": "topic_searches_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_information_gain_runs_id_idx": { - "name": "payload_locked_documents_rels_information_gain_runs_id_idx", - "columns": [ - { - "expression": "information_gain_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_pipeline_runs_id_idx": { - "name": "payload_locked_documents_rels_pipeline_runs_id_idx", - "columns": [ - { - "expression": "pipeline_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_locked_documents_rels_parent_fk": { - "name": "payload_locked_documents_rels_parent_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "payload_locked_documents", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_users_fk": { - "name": "payload_locked_documents_rels_users_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_media_fk": { - "name": "payload_locked_documents_rels_media_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "media", - "columnsFrom": [ - "media_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_templates_fk": { - "name": "payload_locked_documents_rels_templates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "templates", - "columnsFrom": [ - "templates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_articles_fk": { - "name": "payload_locked_documents_rels_articles_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_cost_log_fk": { - "name": "payload_locked_documents_rels_cost_log_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "cost_log", - "columnsFrom": [ - "cost_log_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_article_audit_fk": { - "name": "payload_locked_documents_rels_article_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "article_audit", - "columnsFrom": [ - "article_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voices_fk": { - "name": "payload_locked_documents_rels_brand_voices_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voice_files_fk": { - "name": "payload_locked_documents_rels_brand_voice_files_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "brand_voice_files_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_icps_fk": { - "name": "payload_locked_documents_rels_icps_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_governance_audit_fk": { - "name": "payload_locked_documents_rels_governance_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "governance_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_sources_fk": { - "name": "payload_locked_documents_rels_evidence_sources_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_source_candidates_fk": { - "name": "payload_locked_documents_rels_evidence_source_candidates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_source_candidates", - "columnsFrom": [ - "evidence_source_candidates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_corpus_snapshots_fk": { - "name": "payload_locked_documents_rels_corpus_snapshots_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "corpus_snapshots_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_topic_searches_fk": { - "name": "payload_locked_documents_rels_topic_searches_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "topic_searches", - "columnsFrom": [ - "topic_searches_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_information_gain_runs_fk": { - "name": "payload_locked_documents_rels_information_gain_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_pipeline_runs_fk": { - "name": "payload_locked_documents_rels_pipeline_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "pipeline_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences": { - "name": "payload_preferences", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "value": { - "name": "value", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_preferences_key_idx": { - "name": "payload_preferences_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_updated_at_idx": { - "name": "payload_preferences_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_created_at_idx": { - "name": "payload_preferences_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences_rels": { - "name": "payload_preferences_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_preferences_rels_order_idx": { - "name": "payload_preferences_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_parent_idx": { - "name": "payload_preferences_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_path_idx": { - "name": "payload_preferences_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_users_id_idx": { - "name": "payload_preferences_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_preferences_rels_parent_fk": { - "name": "payload_preferences_rels_parent_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "payload_preferences", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_preferences_rels_users_fk": { - "name": "payload_preferences_rels_users_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_migrations": { - "name": "payload_migrations", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "batch": { - "name": "batch", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_migrations_updated_at_idx": { - "name": "payload_migrations_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_migrations_created_at_idx": { - "name": "payload_migrations_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile_competitors": { - "name": "workspace_profile_competitors", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "workspace_profile_competitors_order_idx": { - "name": "workspace_profile_competitors_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "workspace_profile_competitors_parent_id_idx": { - "name": "workspace_profile_competitors_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "workspace_profile_competitors_parent_id_fk": { - "name": "workspace_profile_competitors_parent_id_fk", - "tableFrom": "workspace_profile_competitors", - "tableTo": "workspace_profile", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile": { - "name": "workspace_profile", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "company_name": { - "name": "company_name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "target_domain": { - "name": "target_domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_notes": { - "name": "site_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_pages": { - "name": "site_pages", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "site_pages_fetched_at": { - "name": "site_pages_fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_core_claims": { - "name": "positioning_core_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "evidence_ref": { - "name": "evidence_ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_core_claims_order_idx": { - "name": "positioning_core_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_core_claims_parent_id_idx": { - "name": "positioning_core_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_core_claims_parent_id_fk": { - "name": "positioning_core_claims_parent_id_fk", - "tableFrom": "positioning_core_claims", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_pillars": { - "name": "positioning_pillars", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "one_line": { - "name": "one_line", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "carries": { - "name": "carries", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_pillars_order_idx": { - "name": "positioning_pillars_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_pillars_parent_id_idx": { - "name": "positioning_pillars_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_pillars_parent_id_fk": { - "name": "positioning_pillars_parent_id_fk", - "tableFrom": "positioning_pillars", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_descriptor_ladder": { - "name": "positioning_descriptor_ladder", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "descriptor": { - "name": "descriptor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_descriptor_ladder_order_idx": { - "name": "positioning_descriptor_ladder_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_descriptor_ladder_parent_id_idx": { - "name": "positioning_descriptor_ladder_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_descriptor_ladder_parent_id_fk": { - "name": "positioning_descriptor_ladder_parent_id_fk", - "tableFrom": "positioning_descriptor_ladder", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_reach_for": { - "name": "positioning_vocabulary_reach_for", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_reach_for_order_idx": { - "name": "positioning_vocabulary_reach_for_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_reach_for_parent_id_idx": { - "name": "positioning_vocabulary_reach_for_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_reach_for_parent_id_fk": { - "name": "positioning_vocabulary_reach_for_parent_id_fk", - "tableFrom": "positioning_vocabulary_reach_for", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_avoid": { - "name": "positioning_vocabulary_avoid", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_avoid_order_idx": { - "name": "positioning_vocabulary_avoid_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_avoid_parent_id_idx": { - "name": "positioning_vocabulary_avoid_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_avoid_parent_id_fk": { - "name": "positioning_vocabulary_avoid_parent_id_fk", - "tableFrom": "positioning_vocabulary_avoid", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_open_rulings": { - "name": "positioning_open_rulings", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_positioning_open_rulings_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'open'" - }, - "ruling": { - "name": "ruling", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "ruled_at": { - "name": "ruled_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_open_rulings_order_idx": { - "name": "positioning_open_rulings_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_open_rulings_parent_id_idx": { - "name": "positioning_open_rulings_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_open_rulings_parent_id_fk": { - "name": "positioning_open_rulings_parent_id_fk", - "tableFrom": "positioning_open_rulings", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning": { - "name": "positioning", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "category": { - "name": "category", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "goal": { - "name": "goal", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "promise": { - "name": "promise", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active_position": { - "name": "active_position", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "macro_frame": { - "name": "macro_frame", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "landscape": { - "name": "landscape", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "enemy": { - "name": "enemy", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "archetype": { - "name": "archetype", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence": { - "name": "essence", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims_cleared_surfaces": { - "name": "evidence_bank_verified_claims_cleared_surfaces", - "schema": "", - "columns": { - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "parent_id": { - "name": "parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "enum_evidence_bank_verified_claims_cleared_surfaces", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - } - }, - "indexes": { - "evidence_bank_verified_claims_cleared_surfaces_order_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_cleared_surfaces_parent_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_cleared_surfaces_parent_fk": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_fk", - "tableFrom": "evidence_bank_verified_claims_cleared_surfaces", - "tableTo": "evidence_bank_verified_claims", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims": { - "name": "evidence_bank_verified_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "primary_source": { - "name": "primary_source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_url": { - "name": "source_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_date": { - "name": "source_date", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sample_or_method": { - "name": "sample_or_method", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "verification_depth": { - "name": "verification_depth", - "type": "enum_evidence_bank_verified_claims_verification_depth", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "limits": { - "name": "limits", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "recheck_at": { - "name": "recheck_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_verified_claims_order_idx": { - "name": "evidence_bank_verified_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_parent_id_idx": { - "name": "evidence_bank_verified_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_parent_id_fk": { - "name": "evidence_bank_verified_claims_parent_id_fk", - "tableFrom": "evidence_bank_verified_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_facts": { - "name": "evidence_bank_facts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "fact": { - "name": "fact", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "owner": { - "name": "owner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "last_confirmed_at": { - "name": "last_confirmed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_facts_order_idx": { - "name": "evidence_bank_facts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_facts_parent_id_idx": { - "name": "evidence_bank_facts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_facts_parent_id_fk": { - "name": "evidence_bank_facts_parent_id_fk", - "tableFrom": "evidence_bank_facts", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_rejected_claims": { - "name": "evidence_bank_rejected_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_bank_rejected_claims_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'rejected'" - }, - "reason": { - "name": "reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "replacement": { - "name": "replacement", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_rejected_claims_order_idx": { - "name": "evidence_bank_rejected_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_rejected_claims_parent_id_idx": { - "name": "evidence_bank_rejected_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_rejected_claims_parent_id_fk": { - "name": "evidence_bank_rejected_claims_parent_id_fk", - "tableFrom": "evidence_bank_rejected_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank": { - "name": "evidence_bank", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "ref_counter": { - "name": "ref_counter", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.llm_settings": { - "name": "llm_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "brief_angle_model": { - "name": "brief_angle_model", - "type": "enum_llm_settings_brief_angle_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "generate_model": { - "name": "generate_model", - "type": "enum_llm_settings_generate_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "fact_check_model": { - "name": "fact_check_model", - "type": "enum_llm_settings_fact_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "qualitative_review_model": { - "name": "qualitative_review_model", - "type": "enum_llm_settings_qualitative_review_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "claim_extraction_model": { - "name": "claim_extraction_model", - "type": "enum_llm_settings_claim_extraction_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_judge_model": { - "name": "information_gain_judge_model", - "type": "enum_llm_settings_information_gain_judge_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_verification_model": { - "name": "evidence_verification_model", - "type": "enum_llm_settings_evidence_verification_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_check_model": { - "name": "evidence_check_model", - "type": "enum_llm_settings_evidence_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "brand_voice_extract_model": { - "name": "brand_voice_extract_model", - "type": "enum_llm_settings_brand_voice_extract_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "setup_assist_model": { - "name": "setup_assist_model", - "type": "enum_llm_settings_setup_assist_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_policy": { - "name": "information_gain_policy", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "min_consensus_coverage": { - "name": "min_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verification_ratio": { - "name": "min_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_novel_factual_integrity": { - "name": "min_novel_factual_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_numeric_temporal_integrity": { - "name": "min_numeric_temporal_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "require_exact_value_match": { - "name": "require_exact_value_match", - "type": "enum_information_gain_policy_require_exact_value_match", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "require_evidence_lineage": { - "name": "require_evidence_lineage", - "type": "enum_information_gain_policy_require_evidence_lineage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "block_first_party_measurements": { - "name": "block_first_party_measurements", - "type": "enum_information_gain_policy_block_first_party_measurements", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "max_contradiction_probability": { - "name": "max_contradiction_probability", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "material_novelty_threshold": { - "name": "material_novelty_threshold", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "max_internal_duplication_rate": { - "name": "max_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verified_novel_claims": { - "name": "min_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.webhook_settings": { - "name": "webhook_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "secret": { - "name": "secret", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_stats": { - "name": "payload_jobs_stats", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "stats": { - "name": "stats", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": { - "public.enum_templates_company_mentions": { - "name": "enum_templates_company_mentions", - "schema": "public", - "values": [ - "none", - "mention", - "feature" - ] - }, - "public.enum_articles_brief_sections_source": { - "name": "enum_articles_brief_sections_source", - "schema": "public", - "values": [ - "template", - "research", - "editor" - ] - }, - "public.enum_articles_status": { - "name": "enum_articles_status", - "schema": "public", - "values": [ - "topic_selected", - "brief_review", - "researched", - "drafted", - "qa_passed", - "verified", - "needs_review", - "blocked", - "needs_revision", - "approved", - "published" - ] - }, - "public.enum_articles_information_gain_decision": { - "name": "enum_articles_information_gain_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_cost_log_stage": { - "name": "enum_cost_log_stage", - "schema": "public", - "values": [ - "generate", - "factCheck", - "qualitativeReview", - "claimExtraction", - "informationGainJudge", - "evidenceVerification", - "evidenceCheck", - "briefAngle", - "brandVoiceExtract", - "setupAssist" - ] - }, - "public.enum_article_audit_actor_type": { - "name": "enum_article_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_brand_voices_status": { - "name": "enum_brand_voices_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_brand_voices_source": { - "name": "enum_brand_voices_source", - "schema": "public", - "values": [ - "onboarding", - "upload" - ] - }, - "public.enum_brand_voices_audience_language_level": { - "name": "enum_brand_voices_audience_language_level", - "schema": "public", - "values": [ - "plain", - "general", - "professional", - "expert" - ] - }, - "public.enum_icps_pains_confidence": { - "name": "enum_icps_pains_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_competition_confidence": { - "name": "enum_icps_competition_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_channels_confidence": { - "name": "enum_icps_channels_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_status": { - "name": "enum_icps_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_icps_motivation_confidence": { - "name": "enum_icps_motivation_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_solution_confidence": { - "name": "enum_icps_solution_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_why_us_confidence": { - "name": "enum_icps_why_us_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_governance_audit_actor_type": { - "name": "enum_governance_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_evidence_sources_quality_class": { - "name": "enum_evidence_sources_quality_class", - "schema": "public", - "values": [ - "first_party_dataset", - "primary", - "official_docs", - "secondary", - "unverified", - "blocked" - ] - }, - "public.enum_evidence_source_candidates_status": { - "name": "enum_evidence_source_candidates_status", - "schema": "public", - "values": [ - "pending", - "approved", - "dismissed" - ] - }, - "public.enum_evidence_source_candidates_suggested_class": { - "name": "enum_evidence_source_candidates_suggested_class", - "schema": "public", - "values": [ - "primary", - "official_docs", - "secondary", - "unverified" - ] - }, - "public.enum_corpus_snapshots_pages_fetch_status": { - "name": "enum_corpus_snapshots_pages_fetch_status", - "schema": "public", - "values": [ - "ok", - "failed", - "skipped" - ] - }, - "public.enum_corpus_snapshots_status": { - "name": "enum_corpus_snapshots_status", - "schema": "public", - "values": [ - "complete", - "partial", - "empty" - ] - }, - "public.enum_information_gain_runs_decision": { - "name": "enum_information_gain_runs_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_pipeline_runs_source": { - "name": "enum_pipeline_runs_source", - "schema": "public", - "values": [ - "admin", - "cli", - "selected" - ] - }, - "public.enum_pipeline_runs_status": { - "name": "enum_pipeline_runs_status", - "schema": "public", - "values": [ - "queued", - "running", - "succeeded", - "failed" - ] - }, - "public.enum_pipeline_runs_mode": { - "name": "enum_pipeline_runs_mode", - "schema": "public", - "values": [ - "mock", - "live" - ] - }, - "public.enum_payload_jobs_log_task_slug": { - "name": "enum_payload_jobs_log_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due" - ] - }, - "public.enum_payload_jobs_log_state": { - "name": "enum_payload_jobs_log_state", - "schema": "public", - "values": [ - "failed", - "succeeded" - ] - }, - "public.enum_payload_jobs_task_slug": { - "name": "enum_payload_jobs_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due" - ] - }, - "public.enum_positioning_open_rulings_status": { - "name": "enum_positioning_open_rulings_status", - "schema": "public", - "values": [ - "open", - "ruled" - ] - }, - "public.enum_evidence_bank_verified_claims_cleared_surfaces": { - "name": "enum_evidence_bank_verified_claims_cleared_surfaces", - "schema": "public", - "values": [ - "web", - "blog", - "ads", - "sales", - "social", - "pr" - ] - }, - "public.enum_evidence_bank_verified_claims_verification_depth": { - "name": "enum_evidence_bank_verified_claims_verification_depth", - "schema": "public", - "values": [ - "primary_document", - "reproduced", - "third_party_audit", - "self_reported" - ] - }, - "public.enum_evidence_bank_rejected_claims_status": { - "name": "enum_evidence_bank_rejected_claims_status", - "schema": "public", - "values": [ - "rejected", - "expired" - ] - }, - "public.enum_llm_settings_brief_angle_model": { - "name": "enum_llm_settings_brief_angle_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_generate_model": { - "name": "enum_llm_settings_generate_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_fact_check_model": { - "name": "enum_llm_settings_fact_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_qualitative_review_model": { - "name": "enum_llm_settings_qualitative_review_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_claim_extraction_model": { - "name": "enum_llm_settings_claim_extraction_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_information_gain_judge_model": { - "name": "enum_llm_settings_information_gain_judge_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_verification_model": { - "name": "enum_llm_settings_evidence_verification_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_check_model": { - "name": "enum_llm_settings_evidence_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_brand_voice_extract_model": { - "name": "enum_llm_settings_brand_voice_extract_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_setup_assist_model": { - "name": "enum_llm_settings_setup_assist_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_information_gain_policy_require_exact_value_match": { - "name": "enum_information_gain_policy_require_exact_value_match", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_require_evidence_lineage": { - "name": "enum_information_gain_policy_require_evidence_lineage", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_block_first_party_measurements": { - "name": "enum_information_gain_policy_block_first_party_measurements", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "bc46dd1b-ddd0-4c4c-af30-a9a2f65a6f95", - "prevId": "00000000-0000-0000-0000-000000000000" -} \ No newline at end of file diff --git a/cms/src/migrations/20261007_133736_topic_relevance.json b/cms/src/migrations/20261007_133736_topic_relevance.json deleted file mode 100644 index 9ec89e7a..00000000 --- a/cms/src/migrations/20261007_133736_topic_relevance.json +++ /dev/null @@ -1,9485 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users_sessions": { - "name": "users_sessions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "users_sessions_order_idx": { - "name": "users_sessions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_sessions_parent_id_idx": { - "name": "users_sessions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "users_sessions_parent_id_fk": { - "name": "users_sessions_parent_id_fk", - "tableFrom": "users_sessions", - "tableTo": "users", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "email": { - "name": "email", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "reset_password_token": { - "name": "reset_password_token", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "reset_password_expiration": { - "name": "reset_password_expiration", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "salt": { - "name": "salt", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "hash": { - "name": "hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "login_attempts": { - "name": "login_attempts", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "lock_until": { - "name": "lock_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "users_updated_at_idx": { - "name": "users_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_created_at_idx": { - "name": "users_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_email_idx": { - "name": "users_email_idx", - "columns": [ - { - "expression": "email", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.media": { - "name": "media", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "media_updated_at_idx": { - "name": "media_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_created_at_idx": { - "name": "media_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_filename_idx": { - "name": "media_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_dos": { - "name": "templates_dos", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_dos_order_idx": { - "name": "templates_dos_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_dos_parent_id_idx": { - "name": "templates_dos_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_dos_parent_id_fk": { - "name": "templates_dos_parent_id_fk", - "tableFrom": "templates_dos", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_donts": { - "name": "templates_donts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_donts_order_idx": { - "name": "templates_donts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_donts_parent_id_idx": { - "name": "templates_donts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_donts_parent_id_fk": { - "name": "templates_donts_parent_id_fk", - "tableFrom": "templates_donts", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_required_sections": { - "name": "templates_required_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_required_sections_order_idx": { - "name": "templates_required_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_required_sections_parent_id_idx": { - "name": "templates_required_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_required_sections_parent_id_fk": { - "name": "templates_required_sections_parent_id_fk", - "tableFrom": "templates_required_sections", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates": { - "name": "templates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "intent": { - "name": "intent", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "company_mentions": { - "name": "company_mentions", - "type": "enum_templates_company_mentions", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'mention'" - }, - "outline": { - "name": "outline", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "example": { - "name": "example", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "seo_spec_title_tag_max_length": { - "name": "seo_spec_title_tag_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 60 - }, - "seo_spec_meta_description_max_length": { - "name": "seo_spec_meta_description_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 160 - }, - "seo_spec_heading_structure_rules": { - "name": "seo_spec_heading_structure_rules", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_required": { - "name": "seo_spec_faq_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_min_questions": { - "name": "seo_spec_faq_min_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_max_questions": { - "name": "seo_spec_faq_max_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_og_tags_required": { - "name": "seo_spec_og_tags_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "templates_name_idx": { - "name": "templates_name_idx", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_updated_at_idx": { - "name": "templates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_created_at_idx": { - "name": "templates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_secondary_keywords": { - "name": "articles_secondary_keywords", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_secondary_keywords_order_idx": { - "name": "articles_secondary_keywords_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_secondary_keywords_parent_id_idx": { - "name": "articles_secondary_keywords_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_secondary_keywords_parent_id_fk": { - "name": "articles_secondary_keywords_parent_id_fk", - "tableFrom": "articles_secondary_keywords", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_common_subtopics": { - "name": "articles_research_common_subtopics", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_common_subtopics_order_idx": { - "name": "articles_research_common_subtopics_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_common_subtopics_parent_id_idx": { - "name": "articles_research_common_subtopics_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_common_subtopics_parent_id_fk": { - "name": "articles_research_common_subtopics_parent_id_fk", - "tableFrom": "articles_research_common_subtopics", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_related_questions": { - "name": "articles_research_related_questions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_related_questions_order_idx": { - "name": "articles_research_related_questions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_related_questions_parent_id_idx": { - "name": "articles_research_related_questions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_related_questions_parent_id_fk": { - "name": "articles_research_related_questions_parent_id_fk", - "tableFrom": "articles_research_related_questions", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_brief_sections": { - "name": "articles_brief_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "enum_articles_brief_sections_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "articles_brief_sections_order_idx": { - "name": "articles_brief_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_brief_sections_parent_id_idx": { - "name": "articles_brief_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_brief_sections_parent_id_fk": { - "name": "articles_brief_sections_parent_id_fk", - "tableFrom": "articles_brief_sections", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_faq_items": { - "name": "articles_faq_items", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "answer": { - "name": "answer", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_faq_items_order_idx": { - "name": "articles_faq_items_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_faq_items_parent_id_idx": { - "name": "articles_faq_items_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_faq_items_parent_id_fk": { - "name": "articles_faq_items_parent_id_fk", - "tableFrom": "articles_faq_items", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "archived": { - "name": "archived", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "slug": { - "name": "slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icp_id": { - "name": "icp_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_ranking_pages_summary": { - "name": "research_ranking_pages_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "research_snapshot_id": { - "name": "research_snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_query_cluster": { - "name": "research_query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_facets": { - "name": "research_facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_gaps": { - "name": "research_gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_angle": { - "name": "brief_angle", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_angle_options": { - "name": "brief_angle_options", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_audience": { - "name": "brief_audience", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_must_cover": { - "name": "brief_must_cover", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_opportunities": { - "name": "brief_opportunities", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_notes": { - "name": "brief_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_approved_at": { - "name": "brief_approved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "brief_approved_by": { - "name": "brief_approved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "body": { - "name": "body", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "title_tag": { - "name": "title_tag", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta_description": { - "name": "meta_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_title": { - "name": "og_title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_description": { - "name": "og_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_image": { - "name": "og_image", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "enum_articles_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'topic_selected'" - }, - "publish_at": { - "name": "publish_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "evidence_citations": { - "name": "evidence_citations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_passed": { - "name": "qa_results_structural_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_violations": { - "name": "qa_results_structural_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_passed": { - "name": "qa_results_fact_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_notes": { - "name": "qa_results_fact_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_sources": { - "name": "qa_results_fact_check_sources", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_passed": { - "name": "qa_results_qualitative_review_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_notes": { - "name": "qa_results_qualitative_review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_score": { - "name": "qa_results_qualitative_review_voice_score", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_notes": { - "name": "qa_results_qualitative_review_voice_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_not_trait_violations": { - "name": "qa_results_qualitative_review_not_trait_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_passed": { - "name": "qa_results_evidence_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_notes": { - "name": "qa_results_evidence_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_claims": { - "name": "qa_results_evidence_check_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "information_gain_run_id": { - "name": "information_gain_run_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_decision": { - "name": "information_gain_decision", - "type": "enum_articles_information_gain_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_policy_version": { - "name": "information_gain_policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "information_gain_consensus_coverage": { - "name": "information_gain_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_gain_units": { - "name": "information_gain_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verification_ratio": { - "name": "information_gain_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_internal_duplication_rate": { - "name": "information_gain_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_novel_claims": { - "name": "information_gain_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_scored_at": { - "name": "information_gain_scored_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "generation_model": { - "name": "generation_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_models": { - "name": "qa_models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "total_cost_usd": { - "name": "total_cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_notes": { - "name": "review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_justification": { - "name": "review_justification", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_notes": { - "name": "revision_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_count": { - "name": "revision_count", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "published_at": { - "name": "published_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "articles_archived_idx": { - "name": "articles_archived_idx", - "columns": [ - { - "expression": "archived", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_slug_idx": { - "name": "articles_slug_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_keyword_idx": { - "name": "articles_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_template_idx": { - "name": "articles_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_icp_idx": { - "name": "articles_icp_idx", - "columns": [ - { - "expression": "icp_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_research_snapshot_idx": { - "name": "articles_research_research_snapshot_idx", - "columns": [ - { - "expression": "research_snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_status_idx": { - "name": "articles_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_publish_at_idx": { - "name": "articles_publish_at_idx", - "columns": [ - { - "expression": "publish_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_information_gain_information_gain_run_idx": { - "name": "articles_information_gain_information_gain_run_idx", - "columns": [ - { - "expression": "information_gain_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_updated_at_idx": { - "name": "articles_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_created_at_idx": { - "name": "articles_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_template_id_templates_id_fk": { - "name": "articles_template_id_templates_id_fk", - "tableFrom": "articles", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_icp_id_icps_id_fk": { - "name": "articles_icp_id_icps_id_fk", - "tableFrom": "articles", - "tableTo": "icps", - "columnsFrom": [ - "icp_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_research_snapshot_id_corpus_snapshots_id_fk": { - "name": "articles_research_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "articles", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "research_snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_information_gain_run_id_information_gain_runs_id_fk": { - "name": "articles_information_gain_run_id_information_gain_runs_id_fk", - "tableFrom": "articles", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_run_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cost_log": { - "name": "cost_log", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "enum_cost_log_stage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "provider": { - "name": "provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "model": { - "name": "model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "input_tokens": { - "name": "input_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "output_tokens": { - "name": "output_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "web_search_requests": { - "name": "web_search_requests", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "request": { - "name": "request", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cost_log_pipeline_run_id_idx": { - "name": "cost_log_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_article_idx": { - "name": "cost_log_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_updated_at_idx": { - "name": "cost_log_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_created_at_idx": { - "name": "cost_log_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "cost_log_article_id_articles_id_fk": { - "name": "cost_log_article_id_articles_id_fk", - "tableFrom": "cost_log", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.article_audit": { - "name": "article_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_article_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "article_audit_article_idx": { - "name": "article_audit_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_event_idx": { - "name": "article_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_pipeline_run_id_idx": { - "name": "article_audit_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_updated_at_idx": { - "name": "article_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_created_at_idx": { - "name": "article_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "article_audit_article_id_articles_id_fk": { - "name": "article_audit_article_id_articles_id_fk", - "tableFrom": "article_audit", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_core_values": { - "name": "brand_voices_core_values", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "value": { - "name": "value", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_core_values_order_idx": { - "name": "brand_voices_core_values_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_core_values_parent_id_idx": { - "name": "brand_voices_core_values_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_core_values_parent_id_fk": { - "name": "brand_voices_core_values_parent_id_fk", - "tableFrom": "brand_voices_core_values", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_voice_adjectives": { - "name": "brand_voices_voice_adjectives", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "adjective": { - "name": "adjective", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "do_example": { - "name": "do_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "dont_example": { - "name": "dont_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_voice_adjectives_order_idx": { - "name": "brand_voices_voice_adjectives_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_voice_adjectives_parent_id_idx": { - "name": "brand_voices_voice_adjectives_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_voice_adjectives_parent_id_fk": { - "name": "brand_voices_voice_adjectives_parent_id_fk", - "tableFrom": "brand_voices_voice_adjectives", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_not_traits": { - "name": "brand_voices_not_traits", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "trait": { - "name": "trait", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "boundary_note": { - "name": "boundary_note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_not_traits_order_idx": { - "name": "brand_voices_not_traits_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_not_traits_parent_id_idx": { - "name": "brand_voices_not_traits_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_not_traits_parent_id_fk": { - "name": "brand_voices_not_traits_parent_id_fk", - "tableFrom": "brand_voices_not_traits", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_preferred_words": { - "name": "brand_voices_preferred_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_preferred_words_order_idx": { - "name": "brand_voices_preferred_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_preferred_words_parent_id_idx": { - "name": "brand_voices_preferred_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_preferred_words_parent_id_fk": { - "name": "brand_voices_preferred_words_parent_id_fk", - "tableFrom": "brand_voices_preferred_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_banned_words": { - "name": "brand_voices_banned_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_banned_words_order_idx": { - "name": "brand_voices_banned_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_banned_words_parent_id_idx": { - "name": "brand_voices_banned_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_banned_words_parent_id_fk": { - "name": "brand_voices_banned_words_parent_id_fk", - "tableFrom": "brand_voices_banned_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_samples": { - "name": "brand_voices_samples", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "brand_voices_samples_order_idx": { - "name": "brand_voices_samples_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_samples_parent_id_idx": { - "name": "brand_voices_samples_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_samples_parent_id_fk": { - "name": "brand_voices_samples_parent_id_fk", - "tableFrom": "brand_voices_samples", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices": { - "name": "brand_voices", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_brand_voices_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "source": { - "name": "source", - "type": "enum_brand_voices_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'onboarding'" - }, - "source_file_id": { - "name": "source_file_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "onboarding_step": { - "name": "onboarding_step", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_one_liner": { - "name": "essence_one_liner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_mission": { - "name": "essence_mission", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_description": { - "name": "audience_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_language_level": { - "name": "audience_language_level", - "type": "enum_brand_voices_audience_language_level", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "audience_interests": { - "name": "audience_interests", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_needs": { - "name": "audience_needs", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "persona": { - "name": "persona", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "voice_in_own_words": { - "name": "voice_in_own_words", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "tone_formality": { - "name": "tone_formality", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_warmth": { - "name": "tone_warmth", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_boldness": { - "name": "tone_boldness", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_energy": { - "name": "tone_energy", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "extraction_model": { - "name": "extraction_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_provider": { - "name": "extraction_provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_extracted_at": { - "name": "extraction_extracted_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "extraction_source_chars": { - "name": "extraction_source_chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "extraction_warnings": { - "name": "extraction_warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "brand_voices_status_idx": { - "name": "brand_voices_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_source_file_idx": { - "name": "brand_voices_source_file_idx", - "columns": [ - { - "expression": "source_file_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_updated_at_idx": { - "name": "brand_voices_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_created_at_idx": { - "name": "brand_voices_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_source_file_id_brand_voice_files_id_fk": { - "name": "brand_voices_source_file_id_brand_voice_files_id_fk", - "tableFrom": "brand_voices", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "source_file_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voice_files": { - "name": "brand_voice_files", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voice_files_updated_at_idx": { - "name": "brand_voice_files_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_created_at_idx": { - "name": "brand_voice_files_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_filename_idx": { - "name": "brand_voice_files_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains_evidence": { - "name": "icps_pains_evidence", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_evidence_order_idx": { - "name": "icps_pains_evidence_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_evidence_parent_id_idx": { - "name": "icps_pains_evidence_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_evidence_parent_id_fk": { - "name": "icps_pains_evidence_parent_id_fk", - "tableFrom": "icps_pains_evidence", - "tableTo": "icps_pains", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains": { - "name": "icps_pains", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_pains_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_order_idx": { - "name": "icps_pains_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_parent_id_idx": { - "name": "icps_pains_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_parent_id_fk": { - "name": "icps_pains_parent_id_fk", - "tableFrom": "icps_pains", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_solution_sample_lines": { - "name": "icps_solution_sample_lines", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_solution_sample_lines_order_idx": { - "name": "icps_solution_sample_lines_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_solution_sample_lines_parent_id_idx": { - "name": "icps_solution_sample_lines_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_solution_sample_lines_parent_id_fk": { - "name": "icps_solution_sample_lines_parent_id_fk", - "tableFrom": "icps_solution_sample_lines", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_competition": { - "name": "icps_competition", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "competitor": { - "name": "competitor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claimed_at": { - "name": "claimed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_competition_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_competition_order_idx": { - "name": "icps_competition_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_competition_parent_id_idx": { - "name": "icps_competition_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_competition_parent_id_fk": { - "name": "icps_competition_parent_id_fk", - "tableFrom": "icps_competition", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_channels": { - "name": "icps_channels", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "channel": { - "name": "channel", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_channels_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_channels_order_idx": { - "name": "icps_channels_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_channels_parent_id_idx": { - "name": "icps_channels_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_channels_parent_id_fk": { - "name": "icps_channels_parent_id_fk", - "tableFrom": "icps_channels", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_churn_triggers": { - "name": "icps_churn_triggers", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_churn_triggers_order_idx": { - "name": "icps_churn_triggers_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_churn_triggers_parent_id_idx": { - "name": "icps_churn_triggers_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_churn_triggers_parent_id_fk": { - "name": "icps_churn_triggers_parent_id_fk", - "tableFrom": "icps_churn_triggers", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_not_our_user": { - "name": "icps_not_our_user", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_not_our_user_order_idx": { - "name": "icps_not_our_user_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_not_our_user_parent_id_idx": { - "name": "icps_not_our_user_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_not_our_user_parent_id_fk": { - "name": "icps_not_our_user_parent_id_fk", - "tableFrom": "icps_not_our_user", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps": { - "name": "icps", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_icps_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "primary": { - "name": "primary", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "who": { - "name": "who", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_text": { - "name": "motivation_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_hypothesis": { - "name": "motivation_hypothesis", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "motivation_confidence": { - "name": "motivation_confidence", - "type": "enum_icps_motivation_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "solution_mechanism": { - "name": "solution_mechanism", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "solution_confidence": { - "name": "solution_confidence", - "type": "enum_icps_solution_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "why_us_text": { - "name": "why_us_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "why_us_confidence": { - "name": "why_us_confidence", - "type": "enum_icps_why_us_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "icps_status_idx": { - "name": "icps_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_primary_idx": { - "name": "icps_primary_idx", - "columns": [ - { - "expression": "primary", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_updated_at_idx": { - "name": "icps_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_created_at_idx": { - "name": "icps_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit": { - "name": "governance_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "subject_global": { - "name": "subject_global", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_governance_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "governance_audit_subject_global_idx": { - "name": "governance_audit_subject_global_idx", - "columns": [ - { - "expression": "subject_global", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_event_idx": { - "name": "governance_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_updated_at_idx": { - "name": "governance_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_created_at_idx": { - "name": "governance_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit_rels": { - "name": "governance_audit_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "governance_audit_rels_order_idx": { - "name": "governance_audit_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_parent_idx": { - "name": "governance_audit_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_path_idx": { - "name": "governance_audit_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_brand_voices_id_idx": { - "name": "governance_audit_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_evidence_sources_id_idx": { - "name": "governance_audit_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_icps_id_idx": { - "name": "governance_audit_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "governance_audit_rels_parent_fk": { - "name": "governance_audit_rels_parent_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_brand_voices_fk": { - "name": "governance_audit_rels_brand_voices_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_evidence_sources_fk": { - "name": "governance_audit_rels_evidence_sources_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_icps_fk": { - "name": "governance_audit_rels_icps_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_sources": { - "name": "evidence_sources", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "quality_class": { - "name": "quality_class", - "type": "enum_evidence_sources_quality_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active": { - "name": "active", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_sources_domain_idx": { - "name": "evidence_sources_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_updated_at_idx": { - "name": "evidence_sources_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_created_at_idx": { - "name": "evidence_sources_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_source_candidates": { - "name": "evidence_source_candidates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_source_candidates_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "suggested_class": { - "name": "suggested_class", - "type": "enum_evidence_source_candidates_suggested_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "citation_count": { - "name": "citation_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "serp_count": { - "name": "serp_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "last_seen_at": { - "name": "last_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sightings": { - "name": "sightings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "resolved_source_id": { - "name": "resolved_source_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_source_candidates_domain_idx": { - "name": "evidence_source_candidates_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_status_idx": { - "name": "evidence_source_candidates_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_last_seen_at_idx": { - "name": "evidence_source_candidates_last_seen_at_idx", - "columns": [ - { - "expression": "last_seen_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_resolved_source_idx": { - "name": "evidence_source_candidates_resolved_source_idx", - "columns": [ - { - "expression": "resolved_source_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_updated_at_idx": { - "name": "evidence_source_candidates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_created_at_idx": { - "name": "evidence_source_candidates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk": { - "name": "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk", - "tableFrom": "evidence_source_candidates", - "tableTo": "evidence_sources", - "columnsFrom": [ - "resolved_source_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_pages": { - "name": "corpus_snapshots_pages", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "position": { - "name": "position", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "fetch_status": { - "name": "fetch_status", - "type": "enum_corpus_snapshots_pages_fetch_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "failure_reason": { - "name": "failure_reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "chars": { - "name": "chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "text_hash": { - "name": "text_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "unverified_excerpt_count": { - "name": "unverified_excerpt_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_pages_order_idx": { - "name": "corpus_snapshots_pages_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pages_parent_id_idx": { - "name": "corpus_snapshots_pages_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_pages_parent_id_fk": { - "name": "corpus_snapshots_pages_parent_id_fk", - "tableFrom": "corpus_snapshots_pages", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_internal_corpus": { - "name": "corpus_snapshots_internal_corpus", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "article_updated_at": { - "name": "article_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_internal_corpus_order_idx": { - "name": "corpus_snapshots_internal_corpus_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_parent_id_idx": { - "name": "corpus_snapshots_internal_corpus_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_article_idx": { - "name": "corpus_snapshots_internal_corpus_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_internal_corpus_article_id_articles_id_fk": { - "name": "corpus_snapshots_internal_corpus_article_id_articles_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "corpus_snapshots_internal_corpus_parent_id_fk": { - "name": "corpus_snapshots_internal_corpus_parent_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots": { - "name": "corpus_snapshots", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "keyword_key": { - "name": "keyword_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "captured_at": { - "name": "captured_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_corpus_snapshots_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "snapshot_hash": { - "name": "snapshot_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "query_cluster": { - "name": "query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_claims": { - "name": "baseline_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "facets": { - "name": "facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "gaps": { - "name": "gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_doc_count": { - "name": "baseline_doc_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "failed_page_count": { - "name": "failed_page_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "corpus_snapshots_keyword_idx": { - "name": "corpus_snapshots_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_keyword_key_idx": { - "name": "corpus_snapshots_keyword_key_idx", - "columns": [ - { - "expression": "keyword_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pipeline_run_id_idx": { - "name": "corpus_snapshots_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_updated_at_idx": { - "name": "corpus_snapshots_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_created_at_idx": { - "name": "corpus_snapshots_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topic_searches": { - "name": "topic_searches", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "relevance": { - "name": "relevance", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "relevance_fingerprint": { - "name": "relevance_fingerprint", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "relevance_model": { - "name": "relevance_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "seed": { - "name": "seed", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "seed_key": { - "name": "seed_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "fetched_at": { - "name": "fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "result_count": { - "name": "result_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "candidates": { - "name": "candidates", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "topic_searches_seed_key_idx": { - "name": "topic_searches_seed_key_idx", - "columns": [ - { - "expression": "seed_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_fetched_at_idx": { - "name": "topic_searches_fetched_at_idx", - "columns": [ - { - "expression": "fetched_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_updated_at_idx": { - "name": "topic_searches_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_created_at_idx": { - "name": "topic_searches_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_runs": { - "name": "information_gain_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "snapshot_id": { - "name": "snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "policy_version": { - "name": "policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "policy": { - "name": "policy", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "decision": { - "name": "decision", - "type": "enum_information_gain_runs_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "reasons": { - "name": "reasons", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_available": { - "name": "baseline_available", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "calibrated": { - "name": "calibrated", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "scores_consensus_coverage": { - "name": "scores_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_potential_gain_units": { - "name": "scores_potential_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_units": { - "name": "scores_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verification_ratio": { - "name": "scores_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_density": { - "name": "scores_verified_gain_density", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_facet_gain_coverage": { - "name": "scores_facet_gain_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_internal_duplication_rate": { - "name": "scores_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_total_claims": { - "name": "claim_summary_total_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_materially_novel_claims": { - "name": "claim_summary_materially_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_verified_novel_claims": { - "name": "claim_summary_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_unsupported_novel_claims": { - "name": "claim_summary_unsupported_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_contradictory_claims": { - "name": "claim_summary_contradictory_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_first_party_claims": { - "name": "claim_summary_first_party_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_ids_blocked": { - "name": "claim_ids_blocked", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_review": { - "name": "claim_ids_review", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_materially_novel": { - "name": "claim_ids_materially_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_verified_novel": { - "name": "claim_ids_verified_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claims": { - "name": "claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "token_count": { - "name": "token_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "draft_updated_at": { - "name": "draft_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "information_gain_runs_article_idx": { - "name": "information_gain_runs_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_pipeline_run_id_idx": { - "name": "information_gain_runs_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_snapshot_idx": { - "name": "information_gain_runs_snapshot_idx", - "columns": [ - { - "expression": "snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_decision_idx": { - "name": "information_gain_runs_decision_idx", - "columns": [ - { - "expression": "decision", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_updated_at_idx": { - "name": "information_gain_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_created_at_idx": { - "name": "information_gain_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "information_gain_runs_article_id_articles_id_fk": { - "name": "information_gain_runs_article_id_articles_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "information_gain_runs_snapshot_id_corpus_snapshots_id_fk": { - "name": "information_gain_runs_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs": { - "name": "pipeline_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "run_id": { - "name": "run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "enum_pipeline_runs_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_pipeline_runs_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "mode": { - "name": "mode", - "type": "enum_pipeline_runs_mode", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "requested_count": { - "name": "requested_count", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "config_fingerprint": { - "name": "config_fingerprint", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "config_snapshot": { - "name": "config_snapshot", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "final_statuses": { - "name": "final_statuses", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "warnings": { - "name": "warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "error_summary": { - "name": "error_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "requested_by": { - "name": "requested_by", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "started_at": { - "name": "started_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "pipeline_runs_run_id_idx": { - "name": "pipeline_runs_run_id_idx", - "columns": [ - { - "expression": "run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_status_idx": { - "name": "pipeline_runs_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_template_idx": { - "name": "pipeline_runs_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_config_fingerprint_idx": { - "name": "pipeline_runs_config_fingerprint_idx", - "columns": [ - { - "expression": "config_fingerprint", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_updated_at_idx": { - "name": "pipeline_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_created_at_idx": { - "name": "pipeline_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_template_id_templates_id_fk": { - "name": "pipeline_runs_template_id_templates_id_fk", - "tableFrom": "pipeline_runs", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs_rels": { - "name": "pipeline_runs_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "pipeline_runs_rels_order_idx": { - "name": "pipeline_runs_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_parent_idx": { - "name": "pipeline_runs_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_path_idx": { - "name": "pipeline_runs_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_articles_id_idx": { - "name": "pipeline_runs_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_rels_parent_fk": { - "name": "pipeline_runs_rels_parent_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "pipeline_runs_rels_articles_fk": { - "name": "pipeline_runs_rels_articles_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_kv": { - "name": "payload_kv", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "data": { - "name": "data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "payload_kv_key_idx": { - "name": "payload_kv_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_log": { - "name": "payload_jobs_log", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "executed_at": { - "name": "executed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_log_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "task_i_d": { - "name": "task_i_d", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "output": { - "name": "output", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "state": { - "name": "state", - "type": "enum_payload_jobs_log_state", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_jobs_log_order_idx": { - "name": "payload_jobs_log_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_log_parent_id_idx": { - "name": "payload_jobs_log_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_jobs_log_parent_id_fk": { - "name": "payload_jobs_log_parent_id_fk", - "tableFrom": "payload_jobs_log", - "tableTo": "payload_jobs", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs": { - "name": "payload_jobs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "total_tried": { - "name": "total_tried", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "has_error": { - "name": "has_error", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "queue": { - "name": "queue", - "type": "varchar", - "primaryKey": false, - "notNull": false, - "default": "'default'" - }, - "wait_until": { - "name": "wait_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "processing": { - "name": "processing", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "concurrency_key": { - "name": "concurrency_key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta": { - "name": "meta", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_jobs_completed_at_idx": { - "name": "payload_jobs_completed_at_idx", - "columns": [ - { - "expression": "completed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_total_tried_idx": { - "name": "payload_jobs_total_tried_idx", - "columns": [ - { - "expression": "total_tried", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_has_error_idx": { - "name": "payload_jobs_has_error_idx", - "columns": [ - { - "expression": "has_error", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_task_slug_idx": { - "name": "payload_jobs_task_slug_idx", - "columns": [ - { - "expression": "task_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_queue_idx": { - "name": "payload_jobs_queue_idx", - "columns": [ - { - "expression": "queue", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_wait_until_idx": { - "name": "payload_jobs_wait_until_idx", - "columns": [ - { - "expression": "wait_until", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_processing_idx": { - "name": "payload_jobs_processing_idx", - "columns": [ - { - "expression": "processing", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_concurrency_key_idx": { - "name": "payload_jobs_concurrency_key_idx", - "columns": [ - { - "expression": "concurrency_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_updated_at_idx": { - "name": "payload_jobs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_created_at_idx": { - "name": "payload_jobs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents": { - "name": "payload_locked_documents", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "global_slug": { - "name": "global_slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_locked_documents_global_slug_idx": { - "name": "payload_locked_documents_global_slug_idx", - "columns": [ - { - "expression": "global_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_updated_at_idx": { - "name": "payload_locked_documents_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_created_at_idx": { - "name": "payload_locked_documents_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents_rels": { - "name": "payload_locked_documents_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "media_id": { - "name": "media_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "templates_id": { - "name": "templates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "cost_log_id": { - "name": "cost_log_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "article_audit_id": { - "name": "article_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voice_files_id": { - "name": "brand_voice_files_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "governance_audit_id": { - "name": "governance_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_source_candidates_id": { - "name": "evidence_source_candidates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "corpus_snapshots_id": { - "name": "corpus_snapshots_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "topic_searches_id": { - "name": "topic_searches_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_runs_id": { - "name": "information_gain_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "pipeline_runs_id": { - "name": "pipeline_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_locked_documents_rels_order_idx": { - "name": "payload_locked_documents_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_parent_idx": { - "name": "payload_locked_documents_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_path_idx": { - "name": "payload_locked_documents_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_users_id_idx": { - "name": "payload_locked_documents_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_media_id_idx": { - "name": "payload_locked_documents_rels_media_id_idx", - "columns": [ - { - "expression": "media_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_templates_id_idx": { - "name": "payload_locked_documents_rels_templates_id_idx", - "columns": [ - { - "expression": "templates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_articles_id_idx": { - "name": "payload_locked_documents_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_cost_log_id_idx": { - "name": "payload_locked_documents_rels_cost_log_id_idx", - "columns": [ - { - "expression": "cost_log_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_article_audit_id_idx": { - "name": "payload_locked_documents_rels_article_audit_id_idx", - "columns": [ - { - "expression": "article_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voices_id_idx": { - "name": "payload_locked_documents_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voice_files_id_idx": { - "name": "payload_locked_documents_rels_brand_voice_files_id_idx", - "columns": [ - { - "expression": "brand_voice_files_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_icps_id_idx": { - "name": "payload_locked_documents_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_governance_audit_id_idx": { - "name": "payload_locked_documents_rels_governance_audit_id_idx", - "columns": [ - { - "expression": "governance_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_sources_id_idx": { - "name": "payload_locked_documents_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_source_candidates_idx": { - "name": "payload_locked_documents_rels_evidence_source_candidates_idx", - "columns": [ - { - "expression": "evidence_source_candidates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_corpus_snapshots_id_idx": { - "name": "payload_locked_documents_rels_corpus_snapshots_id_idx", - "columns": [ - { - "expression": "corpus_snapshots_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_topic_searches_id_idx": { - "name": "payload_locked_documents_rels_topic_searches_id_idx", - "columns": [ - { - "expression": "topic_searches_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_information_gain_runs_id_idx": { - "name": "payload_locked_documents_rels_information_gain_runs_id_idx", - "columns": [ - { - "expression": "information_gain_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_pipeline_runs_id_idx": { - "name": "payload_locked_documents_rels_pipeline_runs_id_idx", - "columns": [ - { - "expression": "pipeline_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_locked_documents_rels_parent_fk": { - "name": "payload_locked_documents_rels_parent_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "payload_locked_documents", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_users_fk": { - "name": "payload_locked_documents_rels_users_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_media_fk": { - "name": "payload_locked_documents_rels_media_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "media", - "columnsFrom": [ - "media_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_templates_fk": { - "name": "payload_locked_documents_rels_templates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "templates", - "columnsFrom": [ - "templates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_articles_fk": { - "name": "payload_locked_documents_rels_articles_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_cost_log_fk": { - "name": "payload_locked_documents_rels_cost_log_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "cost_log", - "columnsFrom": [ - "cost_log_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_article_audit_fk": { - "name": "payload_locked_documents_rels_article_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "article_audit", - "columnsFrom": [ - "article_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voices_fk": { - "name": "payload_locked_documents_rels_brand_voices_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voice_files_fk": { - "name": "payload_locked_documents_rels_brand_voice_files_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "brand_voice_files_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_icps_fk": { - "name": "payload_locked_documents_rels_icps_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_governance_audit_fk": { - "name": "payload_locked_documents_rels_governance_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "governance_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_sources_fk": { - "name": "payload_locked_documents_rels_evidence_sources_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_source_candidates_fk": { - "name": "payload_locked_documents_rels_evidence_source_candidates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_source_candidates", - "columnsFrom": [ - "evidence_source_candidates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_corpus_snapshots_fk": { - "name": "payload_locked_documents_rels_corpus_snapshots_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "corpus_snapshots_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_topic_searches_fk": { - "name": "payload_locked_documents_rels_topic_searches_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "topic_searches", - "columnsFrom": [ - "topic_searches_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_information_gain_runs_fk": { - "name": "payload_locked_documents_rels_information_gain_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_pipeline_runs_fk": { - "name": "payload_locked_documents_rels_pipeline_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "pipeline_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences": { - "name": "payload_preferences", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "value": { - "name": "value", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_preferences_key_idx": { - "name": "payload_preferences_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_updated_at_idx": { - "name": "payload_preferences_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_created_at_idx": { - "name": "payload_preferences_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences_rels": { - "name": "payload_preferences_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_preferences_rels_order_idx": { - "name": "payload_preferences_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_parent_idx": { - "name": "payload_preferences_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_path_idx": { - "name": "payload_preferences_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_users_id_idx": { - "name": "payload_preferences_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_preferences_rels_parent_fk": { - "name": "payload_preferences_rels_parent_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "payload_preferences", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_preferences_rels_users_fk": { - "name": "payload_preferences_rels_users_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_migrations": { - "name": "payload_migrations", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "batch": { - "name": "batch", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_migrations_updated_at_idx": { - "name": "payload_migrations_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_migrations_created_at_idx": { - "name": "payload_migrations_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile_competitors": { - "name": "workspace_profile_competitors", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "workspace_profile_competitors_order_idx": { - "name": "workspace_profile_competitors_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "workspace_profile_competitors_parent_id_idx": { - "name": "workspace_profile_competitors_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "workspace_profile_competitors_parent_id_fk": { - "name": "workspace_profile_competitors_parent_id_fk", - "tableFrom": "workspace_profile_competitors", - "tableTo": "workspace_profile", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile": { - "name": "workspace_profile", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "company_name": { - "name": "company_name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "target_domain": { - "name": "target_domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_notes": { - "name": "site_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_pages": { - "name": "site_pages", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "site_pages_fetched_at": { - "name": "site_pages_fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_core_claims": { - "name": "positioning_core_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "evidence_ref": { - "name": "evidence_ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_core_claims_order_idx": { - "name": "positioning_core_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_core_claims_parent_id_idx": { - "name": "positioning_core_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_core_claims_parent_id_fk": { - "name": "positioning_core_claims_parent_id_fk", - "tableFrom": "positioning_core_claims", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_pillars": { - "name": "positioning_pillars", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "one_line": { - "name": "one_line", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "carries": { - "name": "carries", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_pillars_order_idx": { - "name": "positioning_pillars_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_pillars_parent_id_idx": { - "name": "positioning_pillars_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_pillars_parent_id_fk": { - "name": "positioning_pillars_parent_id_fk", - "tableFrom": "positioning_pillars", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_descriptor_ladder": { - "name": "positioning_descriptor_ladder", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "descriptor": { - "name": "descriptor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_descriptor_ladder_order_idx": { - "name": "positioning_descriptor_ladder_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_descriptor_ladder_parent_id_idx": { - "name": "positioning_descriptor_ladder_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_descriptor_ladder_parent_id_fk": { - "name": "positioning_descriptor_ladder_parent_id_fk", - "tableFrom": "positioning_descriptor_ladder", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_reach_for": { - "name": "positioning_vocabulary_reach_for", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_reach_for_order_idx": { - "name": "positioning_vocabulary_reach_for_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_reach_for_parent_id_idx": { - "name": "positioning_vocabulary_reach_for_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_reach_for_parent_id_fk": { - "name": "positioning_vocabulary_reach_for_parent_id_fk", - "tableFrom": "positioning_vocabulary_reach_for", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_avoid": { - "name": "positioning_vocabulary_avoid", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_avoid_order_idx": { - "name": "positioning_vocabulary_avoid_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_avoid_parent_id_idx": { - "name": "positioning_vocabulary_avoid_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_avoid_parent_id_fk": { - "name": "positioning_vocabulary_avoid_parent_id_fk", - "tableFrom": "positioning_vocabulary_avoid", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_open_rulings": { - "name": "positioning_open_rulings", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_positioning_open_rulings_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'open'" - }, - "ruling": { - "name": "ruling", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "ruled_at": { - "name": "ruled_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_open_rulings_order_idx": { - "name": "positioning_open_rulings_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_open_rulings_parent_id_idx": { - "name": "positioning_open_rulings_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_open_rulings_parent_id_fk": { - "name": "positioning_open_rulings_parent_id_fk", - "tableFrom": "positioning_open_rulings", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning": { - "name": "positioning", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "category": { - "name": "category", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "goal": { - "name": "goal", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "promise": { - "name": "promise", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active_position": { - "name": "active_position", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "macro_frame": { - "name": "macro_frame", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "landscape": { - "name": "landscape", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "enemy": { - "name": "enemy", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "archetype": { - "name": "archetype", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence": { - "name": "essence", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims_cleared_surfaces": { - "name": "evidence_bank_verified_claims_cleared_surfaces", - "schema": "", - "columns": { - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "parent_id": { - "name": "parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "enum_evidence_bank_verified_claims_cleared_surfaces", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - } - }, - "indexes": { - "evidence_bank_verified_claims_cleared_surfaces_order_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_cleared_surfaces_parent_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_cleared_surfaces_parent_fk": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_fk", - "tableFrom": "evidence_bank_verified_claims_cleared_surfaces", - "tableTo": "evidence_bank_verified_claims", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims": { - "name": "evidence_bank_verified_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "primary_source": { - "name": "primary_source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_url": { - "name": "source_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_date": { - "name": "source_date", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sample_or_method": { - "name": "sample_or_method", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "verification_depth": { - "name": "verification_depth", - "type": "enum_evidence_bank_verified_claims_verification_depth", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "limits": { - "name": "limits", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "recheck_at": { - "name": "recheck_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_verified_claims_order_idx": { - "name": "evidence_bank_verified_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_parent_id_idx": { - "name": "evidence_bank_verified_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_parent_id_fk": { - "name": "evidence_bank_verified_claims_parent_id_fk", - "tableFrom": "evidence_bank_verified_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_facts": { - "name": "evidence_bank_facts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "fact": { - "name": "fact", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "owner": { - "name": "owner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "last_confirmed_at": { - "name": "last_confirmed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_facts_order_idx": { - "name": "evidence_bank_facts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_facts_parent_id_idx": { - "name": "evidence_bank_facts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_facts_parent_id_fk": { - "name": "evidence_bank_facts_parent_id_fk", - "tableFrom": "evidence_bank_facts", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_rejected_claims": { - "name": "evidence_bank_rejected_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_bank_rejected_claims_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'rejected'" - }, - "reason": { - "name": "reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "replacement": { - "name": "replacement", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_rejected_claims_order_idx": { - "name": "evidence_bank_rejected_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_rejected_claims_parent_id_idx": { - "name": "evidence_bank_rejected_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_rejected_claims_parent_id_fk": { - "name": "evidence_bank_rejected_claims_parent_id_fk", - "tableFrom": "evidence_bank_rejected_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank": { - "name": "evidence_bank", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "ref_counter": { - "name": "ref_counter", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.llm_settings": { - "name": "llm_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "topic_relevance_model": { - "name": "topic_relevance_model", - "type": "enum_llm_settings_topic_relevance_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "brief_angle_model": { - "name": "brief_angle_model", - "type": "enum_llm_settings_brief_angle_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "generate_model": { - "name": "generate_model", - "type": "enum_llm_settings_generate_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "fact_check_model": { - "name": "fact_check_model", - "type": "enum_llm_settings_fact_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "qualitative_review_model": { - "name": "qualitative_review_model", - "type": "enum_llm_settings_qualitative_review_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "claim_extraction_model": { - "name": "claim_extraction_model", - "type": "enum_llm_settings_claim_extraction_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_judge_model": { - "name": "information_gain_judge_model", - "type": "enum_llm_settings_information_gain_judge_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_verification_model": { - "name": "evidence_verification_model", - "type": "enum_llm_settings_evidence_verification_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_check_model": { - "name": "evidence_check_model", - "type": "enum_llm_settings_evidence_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "brand_voice_extract_model": { - "name": "brand_voice_extract_model", - "type": "enum_llm_settings_brand_voice_extract_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "setup_assist_model": { - "name": "setup_assist_model", - "type": "enum_llm_settings_setup_assist_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_policy": { - "name": "information_gain_policy", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "min_consensus_coverage": { - "name": "min_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verification_ratio": { - "name": "min_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_novel_factual_integrity": { - "name": "min_novel_factual_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_numeric_temporal_integrity": { - "name": "min_numeric_temporal_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "require_exact_value_match": { - "name": "require_exact_value_match", - "type": "enum_information_gain_policy_require_exact_value_match", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "require_evidence_lineage": { - "name": "require_evidence_lineage", - "type": "enum_information_gain_policy_require_evidence_lineage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "block_first_party_measurements": { - "name": "block_first_party_measurements", - "type": "enum_information_gain_policy_block_first_party_measurements", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "max_contradiction_probability": { - "name": "max_contradiction_probability", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "material_novelty_threshold": { - "name": "material_novelty_threshold", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "max_internal_duplication_rate": { - "name": "max_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verified_novel_claims": { - "name": "min_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.webhook_settings": { - "name": "webhook_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "secret": { - "name": "secret", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_stats": { - "name": "payload_jobs_stats", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "stats": { - "name": "stats", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": { - "public.enum_templates_company_mentions": { - "name": "enum_templates_company_mentions", - "schema": "public", - "values": [ - "none", - "mention", - "feature" - ] - }, - "public.enum_articles_brief_sections_source": { - "name": "enum_articles_brief_sections_source", - "schema": "public", - "values": [ - "template", - "research", - "editor" - ] - }, - "public.enum_articles_status": { - "name": "enum_articles_status", - "schema": "public", - "values": [ - "topic_selected", - "brief_review", - "researched", - "drafted", - "qa_passed", - "verified", - "needs_review", - "blocked", - "needs_revision", - "approved", - "published" - ] - }, - "public.enum_articles_information_gain_decision": { - "name": "enum_articles_information_gain_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_cost_log_stage": { - "name": "enum_cost_log_stage", - "schema": "public", - "values": [ - "generate", - "factCheck", - "qualitativeReview", - "claimExtraction", - "informationGainJudge", - "evidenceVerification", - "evidenceCheck", - "briefAngle", - "brandVoiceExtract", - "setupAssist", - "topicRelevance" - ] - }, - "public.enum_article_audit_actor_type": { - "name": "enum_article_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_brand_voices_status": { - "name": "enum_brand_voices_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_brand_voices_source": { - "name": "enum_brand_voices_source", - "schema": "public", - "values": [ - "onboarding", - "upload" - ] - }, - "public.enum_brand_voices_audience_language_level": { - "name": "enum_brand_voices_audience_language_level", - "schema": "public", - "values": [ - "plain", - "general", - "professional", - "expert" - ] - }, - "public.enum_icps_pains_confidence": { - "name": "enum_icps_pains_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_competition_confidence": { - "name": "enum_icps_competition_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_channels_confidence": { - "name": "enum_icps_channels_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_status": { - "name": "enum_icps_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_icps_motivation_confidence": { - "name": "enum_icps_motivation_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_solution_confidence": { - "name": "enum_icps_solution_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_why_us_confidence": { - "name": "enum_icps_why_us_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_governance_audit_actor_type": { - "name": "enum_governance_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_evidence_sources_quality_class": { - "name": "enum_evidence_sources_quality_class", - "schema": "public", - "values": [ - "first_party_dataset", - "primary", - "official_docs", - "secondary", - "unverified", - "blocked" - ] - }, - "public.enum_evidence_source_candidates_status": { - "name": "enum_evidence_source_candidates_status", - "schema": "public", - "values": [ - "pending", - "approved", - "dismissed" - ] - }, - "public.enum_evidence_source_candidates_suggested_class": { - "name": "enum_evidence_source_candidates_suggested_class", - "schema": "public", - "values": [ - "primary", - "official_docs", - "secondary", - "unverified" - ] - }, - "public.enum_corpus_snapshots_pages_fetch_status": { - "name": "enum_corpus_snapshots_pages_fetch_status", - "schema": "public", - "values": [ - "ok", - "failed", - "skipped" - ] - }, - "public.enum_corpus_snapshots_status": { - "name": "enum_corpus_snapshots_status", - "schema": "public", - "values": [ - "complete", - "partial", - "empty" - ] - }, - "public.enum_information_gain_runs_decision": { - "name": "enum_information_gain_runs_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_pipeline_runs_source": { - "name": "enum_pipeline_runs_source", - "schema": "public", - "values": [ - "admin", - "cli", - "selected" - ] - }, - "public.enum_pipeline_runs_status": { - "name": "enum_pipeline_runs_status", - "schema": "public", - "values": [ - "queued", - "running", - "succeeded", - "failed" - ] - }, - "public.enum_pipeline_runs_mode": { - "name": "enum_pipeline_runs_mode", - "schema": "public", - "values": [ - "mock", - "live" - ] - }, - "public.enum_payload_jobs_log_task_slug": { - "name": "enum_payload_jobs_log_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due" - ] - }, - "public.enum_payload_jobs_log_state": { - "name": "enum_payload_jobs_log_state", - "schema": "public", - "values": [ - "failed", - "succeeded" - ] - }, - "public.enum_payload_jobs_task_slug": { - "name": "enum_payload_jobs_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due" - ] - }, - "public.enum_positioning_open_rulings_status": { - "name": "enum_positioning_open_rulings_status", - "schema": "public", - "values": [ - "open", - "ruled" - ] - }, - "public.enum_evidence_bank_verified_claims_cleared_surfaces": { - "name": "enum_evidence_bank_verified_claims_cleared_surfaces", - "schema": "public", - "values": [ - "web", - "blog", - "ads", - "sales", - "social", - "pr" - ] - }, - "public.enum_evidence_bank_verified_claims_verification_depth": { - "name": "enum_evidence_bank_verified_claims_verification_depth", - "schema": "public", - "values": [ - "primary_document", - "reproduced", - "third_party_audit", - "self_reported" - ] - }, - "public.enum_evidence_bank_rejected_claims_status": { - "name": "enum_evidence_bank_rejected_claims_status", - "schema": "public", - "values": [ - "rejected", - "expired" - ] - }, - "public.enum_llm_settings_topic_relevance_model": { - "name": "enum_llm_settings_topic_relevance_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_brief_angle_model": { - "name": "enum_llm_settings_brief_angle_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_generate_model": { - "name": "enum_llm_settings_generate_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_fact_check_model": { - "name": "enum_llm_settings_fact_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_qualitative_review_model": { - "name": "enum_llm_settings_qualitative_review_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_claim_extraction_model": { - "name": "enum_llm_settings_claim_extraction_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_information_gain_judge_model": { - "name": "enum_llm_settings_information_gain_judge_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_verification_model": { - "name": "enum_llm_settings_evidence_verification_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_check_model": { - "name": "enum_llm_settings_evidence_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_brand_voice_extract_model": { - "name": "enum_llm_settings_brand_voice_extract_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_setup_assist_model": { - "name": "enum_llm_settings_setup_assist_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_information_gain_policy_require_exact_value_match": { - "name": "enum_information_gain_policy_require_exact_value_match", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_require_evidence_lineage": { - "name": "enum_information_gain_policy_require_evidence_lineage", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_block_first_party_measurements": { - "name": "enum_information_gain_policy_block_first_party_measurements", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "9273d269-c89d-486f-9226-4348108324ca", - "prevId": "00000000-0000-0000-0000-000000000000" -} \ No newline at end of file diff --git a/cms/src/migrations/20261007_134746_setup_suggestions.json b/cms/src/migrations/20261007_134746_setup_suggestions.json deleted file mode 100644 index a6ed23b7..00000000 --- a/cms/src/migrations/20261007_134746_setup_suggestions.json +++ /dev/null @@ -1,9765 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "tables": { - "public.setup_suggestions": { - "name": "setup_suggestions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "kind": { - "name": "kind", - "type": "enum_setup_suggestions_kind", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'banned_word'" - }, - "signature": { - "name": "signature", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "target": { - "name": "target", - "type": "enum_setup_suggestions_target", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'brand-voice'" - }, - "proposal": { - "name": "proposal", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "occurrences": { - "name": "occurrences", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "count": { - "name": "count", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "status": { - "name": "status", - "type": "enum_setup_suggestions_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'open'" - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "last_seen_at": { - "name": "last_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "decided_by": { - "name": "decided_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "decided_at": { - "name": "decided_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "decision_reason": { - "name": "decision_reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "setup_suggestions_signature_idx": { - "name": "setup_suggestions_signature_idx", - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "setup_suggestions_status_idx": { - "name": "setup_suggestions_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "setup_suggestions_updated_at_idx": { - "name": "setup_suggestions_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "setup_suggestions_created_at_idx": { - "name": "setup_suggestions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.users_sessions": { - "name": "users_sessions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "users_sessions_order_idx": { - "name": "users_sessions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_sessions_parent_id_idx": { - "name": "users_sessions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "users_sessions_parent_id_fk": { - "name": "users_sessions_parent_id_fk", - "tableFrom": "users_sessions", - "tableTo": "users", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "email": { - "name": "email", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "reset_password_token": { - "name": "reset_password_token", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "reset_password_expiration": { - "name": "reset_password_expiration", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "salt": { - "name": "salt", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "hash": { - "name": "hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "login_attempts": { - "name": "login_attempts", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "lock_until": { - "name": "lock_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "users_updated_at_idx": { - "name": "users_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_created_at_idx": { - "name": "users_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_email_idx": { - "name": "users_email_idx", - "columns": [ - { - "expression": "email", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.media": { - "name": "media", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "media_updated_at_idx": { - "name": "media_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_created_at_idx": { - "name": "media_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_filename_idx": { - "name": "media_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_dos": { - "name": "templates_dos", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_dos_order_idx": { - "name": "templates_dos_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_dos_parent_id_idx": { - "name": "templates_dos_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_dos_parent_id_fk": { - "name": "templates_dos_parent_id_fk", - "tableFrom": "templates_dos", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_donts": { - "name": "templates_donts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_donts_order_idx": { - "name": "templates_donts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_donts_parent_id_idx": { - "name": "templates_donts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_donts_parent_id_fk": { - "name": "templates_donts_parent_id_fk", - "tableFrom": "templates_donts", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_required_sections": { - "name": "templates_required_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_required_sections_order_idx": { - "name": "templates_required_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_required_sections_parent_id_idx": { - "name": "templates_required_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_required_sections_parent_id_fk": { - "name": "templates_required_sections_parent_id_fk", - "tableFrom": "templates_required_sections", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates": { - "name": "templates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "intent": { - "name": "intent", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "company_mentions": { - "name": "company_mentions", - "type": "enum_templates_company_mentions", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'mention'" - }, - "outline": { - "name": "outline", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "example": { - "name": "example", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "seo_spec_title_tag_max_length": { - "name": "seo_spec_title_tag_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 60 - }, - "seo_spec_meta_description_max_length": { - "name": "seo_spec_meta_description_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 160 - }, - "seo_spec_heading_structure_rules": { - "name": "seo_spec_heading_structure_rules", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_required": { - "name": "seo_spec_faq_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_min_questions": { - "name": "seo_spec_faq_min_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_max_questions": { - "name": "seo_spec_faq_max_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_og_tags_required": { - "name": "seo_spec_og_tags_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "templates_name_idx": { - "name": "templates_name_idx", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_updated_at_idx": { - "name": "templates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_created_at_idx": { - "name": "templates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_secondary_keywords": { - "name": "articles_secondary_keywords", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_secondary_keywords_order_idx": { - "name": "articles_secondary_keywords_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_secondary_keywords_parent_id_idx": { - "name": "articles_secondary_keywords_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_secondary_keywords_parent_id_fk": { - "name": "articles_secondary_keywords_parent_id_fk", - "tableFrom": "articles_secondary_keywords", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_common_subtopics": { - "name": "articles_research_common_subtopics", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_common_subtopics_order_idx": { - "name": "articles_research_common_subtopics_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_common_subtopics_parent_id_idx": { - "name": "articles_research_common_subtopics_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_common_subtopics_parent_id_fk": { - "name": "articles_research_common_subtopics_parent_id_fk", - "tableFrom": "articles_research_common_subtopics", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_related_questions": { - "name": "articles_research_related_questions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_related_questions_order_idx": { - "name": "articles_research_related_questions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_related_questions_parent_id_idx": { - "name": "articles_research_related_questions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_related_questions_parent_id_fk": { - "name": "articles_research_related_questions_parent_id_fk", - "tableFrom": "articles_research_related_questions", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_brief_sections": { - "name": "articles_brief_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "enum_articles_brief_sections_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "articles_brief_sections_order_idx": { - "name": "articles_brief_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_brief_sections_parent_id_idx": { - "name": "articles_brief_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_brief_sections_parent_id_fk": { - "name": "articles_brief_sections_parent_id_fk", - "tableFrom": "articles_brief_sections", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_faq_items": { - "name": "articles_faq_items", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "answer": { - "name": "answer", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_faq_items_order_idx": { - "name": "articles_faq_items_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_faq_items_parent_id_idx": { - "name": "articles_faq_items_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_faq_items_parent_id_fk": { - "name": "articles_faq_items_parent_id_fk", - "tableFrom": "articles_faq_items", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "archived": { - "name": "archived", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "slug": { - "name": "slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icp_id": { - "name": "icp_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_ranking_pages_summary": { - "name": "research_ranking_pages_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "research_snapshot_id": { - "name": "research_snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_query_cluster": { - "name": "research_query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_facets": { - "name": "research_facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_gaps": { - "name": "research_gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_angle": { - "name": "brief_angle", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_angle_options": { - "name": "brief_angle_options", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_audience": { - "name": "brief_audience", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_must_cover": { - "name": "brief_must_cover", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_opportunities": { - "name": "brief_opportunities", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_notes": { - "name": "brief_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_approved_at": { - "name": "brief_approved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "brief_approved_by": { - "name": "brief_approved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "body": { - "name": "body", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "title_tag": { - "name": "title_tag", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta_description": { - "name": "meta_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_title": { - "name": "og_title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_description": { - "name": "og_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_image": { - "name": "og_image", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "enum_articles_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'topic_selected'" - }, - "publish_at": { - "name": "publish_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "evidence_citations": { - "name": "evidence_citations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_passed": { - "name": "qa_results_structural_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_violations": { - "name": "qa_results_structural_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_passed": { - "name": "qa_results_fact_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_notes": { - "name": "qa_results_fact_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_sources": { - "name": "qa_results_fact_check_sources", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_passed": { - "name": "qa_results_qualitative_review_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_notes": { - "name": "qa_results_qualitative_review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_score": { - "name": "qa_results_qualitative_review_voice_score", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_notes": { - "name": "qa_results_qualitative_review_voice_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_not_trait_violations": { - "name": "qa_results_qualitative_review_not_trait_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_passed": { - "name": "qa_results_evidence_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_notes": { - "name": "qa_results_evidence_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_claims": { - "name": "qa_results_evidence_check_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "information_gain_run_id": { - "name": "information_gain_run_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_decision": { - "name": "information_gain_decision", - "type": "enum_articles_information_gain_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_policy_version": { - "name": "information_gain_policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "information_gain_consensus_coverage": { - "name": "information_gain_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_gain_units": { - "name": "information_gain_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verification_ratio": { - "name": "information_gain_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_internal_duplication_rate": { - "name": "information_gain_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_novel_claims": { - "name": "information_gain_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_scored_at": { - "name": "information_gain_scored_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "generation_model": { - "name": "generation_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_models": { - "name": "qa_models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "total_cost_usd": { - "name": "total_cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_notes": { - "name": "review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_justification": { - "name": "review_justification", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_notes": { - "name": "revision_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_count": { - "name": "revision_count", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "published_at": { - "name": "published_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "articles_archived_idx": { - "name": "articles_archived_idx", - "columns": [ - { - "expression": "archived", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_slug_idx": { - "name": "articles_slug_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_keyword_idx": { - "name": "articles_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_template_idx": { - "name": "articles_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_icp_idx": { - "name": "articles_icp_idx", - "columns": [ - { - "expression": "icp_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_research_snapshot_idx": { - "name": "articles_research_research_snapshot_idx", - "columns": [ - { - "expression": "research_snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_status_idx": { - "name": "articles_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_publish_at_idx": { - "name": "articles_publish_at_idx", - "columns": [ - { - "expression": "publish_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_information_gain_information_gain_run_idx": { - "name": "articles_information_gain_information_gain_run_idx", - "columns": [ - { - "expression": "information_gain_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_updated_at_idx": { - "name": "articles_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_created_at_idx": { - "name": "articles_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_template_id_templates_id_fk": { - "name": "articles_template_id_templates_id_fk", - "tableFrom": "articles", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_icp_id_icps_id_fk": { - "name": "articles_icp_id_icps_id_fk", - "tableFrom": "articles", - "tableTo": "icps", - "columnsFrom": [ - "icp_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_research_snapshot_id_corpus_snapshots_id_fk": { - "name": "articles_research_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "articles", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "research_snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_information_gain_run_id_information_gain_runs_id_fk": { - "name": "articles_information_gain_run_id_information_gain_runs_id_fk", - "tableFrom": "articles", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_run_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cost_log": { - "name": "cost_log", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "enum_cost_log_stage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "provider": { - "name": "provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "model": { - "name": "model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "input_tokens": { - "name": "input_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "output_tokens": { - "name": "output_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "web_search_requests": { - "name": "web_search_requests", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "request": { - "name": "request", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cost_log_pipeline_run_id_idx": { - "name": "cost_log_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_article_idx": { - "name": "cost_log_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_updated_at_idx": { - "name": "cost_log_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_created_at_idx": { - "name": "cost_log_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "cost_log_article_id_articles_id_fk": { - "name": "cost_log_article_id_articles_id_fk", - "tableFrom": "cost_log", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.article_audit": { - "name": "article_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_article_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "article_audit_article_idx": { - "name": "article_audit_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_event_idx": { - "name": "article_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_pipeline_run_id_idx": { - "name": "article_audit_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_updated_at_idx": { - "name": "article_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_created_at_idx": { - "name": "article_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "article_audit_article_id_articles_id_fk": { - "name": "article_audit_article_id_articles_id_fk", - "tableFrom": "article_audit", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_core_values": { - "name": "brand_voices_core_values", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "value": { - "name": "value", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_core_values_order_idx": { - "name": "brand_voices_core_values_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_core_values_parent_id_idx": { - "name": "brand_voices_core_values_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_core_values_parent_id_fk": { - "name": "brand_voices_core_values_parent_id_fk", - "tableFrom": "brand_voices_core_values", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_voice_adjectives": { - "name": "brand_voices_voice_adjectives", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "adjective": { - "name": "adjective", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "do_example": { - "name": "do_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "dont_example": { - "name": "dont_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_voice_adjectives_order_idx": { - "name": "brand_voices_voice_adjectives_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_voice_adjectives_parent_id_idx": { - "name": "brand_voices_voice_adjectives_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_voice_adjectives_parent_id_fk": { - "name": "brand_voices_voice_adjectives_parent_id_fk", - "tableFrom": "brand_voices_voice_adjectives", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_not_traits": { - "name": "brand_voices_not_traits", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "trait": { - "name": "trait", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "boundary_note": { - "name": "boundary_note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_not_traits_order_idx": { - "name": "brand_voices_not_traits_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_not_traits_parent_id_idx": { - "name": "brand_voices_not_traits_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_not_traits_parent_id_fk": { - "name": "brand_voices_not_traits_parent_id_fk", - "tableFrom": "brand_voices_not_traits", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_preferred_words": { - "name": "brand_voices_preferred_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_preferred_words_order_idx": { - "name": "brand_voices_preferred_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_preferred_words_parent_id_idx": { - "name": "brand_voices_preferred_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_preferred_words_parent_id_fk": { - "name": "brand_voices_preferred_words_parent_id_fk", - "tableFrom": "brand_voices_preferred_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_banned_words": { - "name": "brand_voices_banned_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_banned_words_order_idx": { - "name": "brand_voices_banned_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_banned_words_parent_id_idx": { - "name": "brand_voices_banned_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_banned_words_parent_id_fk": { - "name": "brand_voices_banned_words_parent_id_fk", - "tableFrom": "brand_voices_banned_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_samples": { - "name": "brand_voices_samples", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "brand_voices_samples_order_idx": { - "name": "brand_voices_samples_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_samples_parent_id_idx": { - "name": "brand_voices_samples_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_samples_parent_id_fk": { - "name": "brand_voices_samples_parent_id_fk", - "tableFrom": "brand_voices_samples", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices": { - "name": "brand_voices", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_brand_voices_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "source": { - "name": "source", - "type": "enum_brand_voices_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'onboarding'" - }, - "source_file_id": { - "name": "source_file_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "onboarding_step": { - "name": "onboarding_step", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_one_liner": { - "name": "essence_one_liner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_mission": { - "name": "essence_mission", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_description": { - "name": "audience_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_language_level": { - "name": "audience_language_level", - "type": "enum_brand_voices_audience_language_level", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "audience_interests": { - "name": "audience_interests", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_needs": { - "name": "audience_needs", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "persona": { - "name": "persona", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "voice_in_own_words": { - "name": "voice_in_own_words", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "tone_formality": { - "name": "tone_formality", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_warmth": { - "name": "tone_warmth", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_boldness": { - "name": "tone_boldness", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_energy": { - "name": "tone_energy", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "extraction_model": { - "name": "extraction_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_provider": { - "name": "extraction_provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_extracted_at": { - "name": "extraction_extracted_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "extraction_source_chars": { - "name": "extraction_source_chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "extraction_warnings": { - "name": "extraction_warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "brand_voices_status_idx": { - "name": "brand_voices_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_source_file_idx": { - "name": "brand_voices_source_file_idx", - "columns": [ - { - "expression": "source_file_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_updated_at_idx": { - "name": "brand_voices_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_created_at_idx": { - "name": "brand_voices_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_source_file_id_brand_voice_files_id_fk": { - "name": "brand_voices_source_file_id_brand_voice_files_id_fk", - "tableFrom": "brand_voices", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "source_file_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voice_files": { - "name": "brand_voice_files", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voice_files_updated_at_idx": { - "name": "brand_voice_files_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_created_at_idx": { - "name": "brand_voice_files_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_filename_idx": { - "name": "brand_voice_files_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains_evidence": { - "name": "icps_pains_evidence", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_evidence_order_idx": { - "name": "icps_pains_evidence_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_evidence_parent_id_idx": { - "name": "icps_pains_evidence_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_evidence_parent_id_fk": { - "name": "icps_pains_evidence_parent_id_fk", - "tableFrom": "icps_pains_evidence", - "tableTo": "icps_pains", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains": { - "name": "icps_pains", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_pains_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_order_idx": { - "name": "icps_pains_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_parent_id_idx": { - "name": "icps_pains_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_parent_id_fk": { - "name": "icps_pains_parent_id_fk", - "tableFrom": "icps_pains", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_solution_sample_lines": { - "name": "icps_solution_sample_lines", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_solution_sample_lines_order_idx": { - "name": "icps_solution_sample_lines_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_solution_sample_lines_parent_id_idx": { - "name": "icps_solution_sample_lines_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_solution_sample_lines_parent_id_fk": { - "name": "icps_solution_sample_lines_parent_id_fk", - "tableFrom": "icps_solution_sample_lines", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_competition": { - "name": "icps_competition", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "competitor": { - "name": "competitor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claimed_at": { - "name": "claimed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_competition_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_competition_order_idx": { - "name": "icps_competition_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_competition_parent_id_idx": { - "name": "icps_competition_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_competition_parent_id_fk": { - "name": "icps_competition_parent_id_fk", - "tableFrom": "icps_competition", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_channels": { - "name": "icps_channels", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "channel": { - "name": "channel", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_channels_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_channels_order_idx": { - "name": "icps_channels_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_channels_parent_id_idx": { - "name": "icps_channels_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_channels_parent_id_fk": { - "name": "icps_channels_parent_id_fk", - "tableFrom": "icps_channels", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_churn_triggers": { - "name": "icps_churn_triggers", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_churn_triggers_order_idx": { - "name": "icps_churn_triggers_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_churn_triggers_parent_id_idx": { - "name": "icps_churn_triggers_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_churn_triggers_parent_id_fk": { - "name": "icps_churn_triggers_parent_id_fk", - "tableFrom": "icps_churn_triggers", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_not_our_user": { - "name": "icps_not_our_user", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_not_our_user_order_idx": { - "name": "icps_not_our_user_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_not_our_user_parent_id_idx": { - "name": "icps_not_our_user_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_not_our_user_parent_id_fk": { - "name": "icps_not_our_user_parent_id_fk", - "tableFrom": "icps_not_our_user", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps": { - "name": "icps", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_icps_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "primary": { - "name": "primary", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "who": { - "name": "who", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_text": { - "name": "motivation_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_hypothesis": { - "name": "motivation_hypothesis", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "motivation_confidence": { - "name": "motivation_confidence", - "type": "enum_icps_motivation_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "solution_mechanism": { - "name": "solution_mechanism", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "solution_confidence": { - "name": "solution_confidence", - "type": "enum_icps_solution_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "why_us_text": { - "name": "why_us_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "why_us_confidence": { - "name": "why_us_confidence", - "type": "enum_icps_why_us_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "icps_status_idx": { - "name": "icps_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_primary_idx": { - "name": "icps_primary_idx", - "columns": [ - { - "expression": "primary", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_updated_at_idx": { - "name": "icps_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_created_at_idx": { - "name": "icps_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit": { - "name": "governance_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "subject_global": { - "name": "subject_global", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_governance_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "governance_audit_subject_global_idx": { - "name": "governance_audit_subject_global_idx", - "columns": [ - { - "expression": "subject_global", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_event_idx": { - "name": "governance_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_updated_at_idx": { - "name": "governance_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_created_at_idx": { - "name": "governance_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit_rels": { - "name": "governance_audit_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "governance_audit_rels_order_idx": { - "name": "governance_audit_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_parent_idx": { - "name": "governance_audit_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_path_idx": { - "name": "governance_audit_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_brand_voices_id_idx": { - "name": "governance_audit_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_evidence_sources_id_idx": { - "name": "governance_audit_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_icps_id_idx": { - "name": "governance_audit_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "governance_audit_rels_parent_fk": { - "name": "governance_audit_rels_parent_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_brand_voices_fk": { - "name": "governance_audit_rels_brand_voices_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_evidence_sources_fk": { - "name": "governance_audit_rels_evidence_sources_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_icps_fk": { - "name": "governance_audit_rels_icps_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_sources": { - "name": "evidence_sources", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "quality_class": { - "name": "quality_class", - "type": "enum_evidence_sources_quality_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active": { - "name": "active", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_sources_domain_idx": { - "name": "evidence_sources_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_updated_at_idx": { - "name": "evidence_sources_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_created_at_idx": { - "name": "evidence_sources_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_source_candidates": { - "name": "evidence_source_candidates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_source_candidates_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "suggested_class": { - "name": "suggested_class", - "type": "enum_evidence_source_candidates_suggested_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "citation_count": { - "name": "citation_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "serp_count": { - "name": "serp_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "last_seen_at": { - "name": "last_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sightings": { - "name": "sightings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "resolved_source_id": { - "name": "resolved_source_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_source_candidates_domain_idx": { - "name": "evidence_source_candidates_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_status_idx": { - "name": "evidence_source_candidates_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_last_seen_at_idx": { - "name": "evidence_source_candidates_last_seen_at_idx", - "columns": [ - { - "expression": "last_seen_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_resolved_source_idx": { - "name": "evidence_source_candidates_resolved_source_idx", - "columns": [ - { - "expression": "resolved_source_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_updated_at_idx": { - "name": "evidence_source_candidates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_created_at_idx": { - "name": "evidence_source_candidates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk": { - "name": "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk", - "tableFrom": "evidence_source_candidates", - "tableTo": "evidence_sources", - "columnsFrom": [ - "resolved_source_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_pages": { - "name": "corpus_snapshots_pages", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "position": { - "name": "position", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "fetch_status": { - "name": "fetch_status", - "type": "enum_corpus_snapshots_pages_fetch_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "failure_reason": { - "name": "failure_reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "chars": { - "name": "chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "text_hash": { - "name": "text_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "unverified_excerpt_count": { - "name": "unverified_excerpt_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_pages_order_idx": { - "name": "corpus_snapshots_pages_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pages_parent_id_idx": { - "name": "corpus_snapshots_pages_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_pages_parent_id_fk": { - "name": "corpus_snapshots_pages_parent_id_fk", - "tableFrom": "corpus_snapshots_pages", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_internal_corpus": { - "name": "corpus_snapshots_internal_corpus", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "article_updated_at": { - "name": "article_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_internal_corpus_order_idx": { - "name": "corpus_snapshots_internal_corpus_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_parent_id_idx": { - "name": "corpus_snapshots_internal_corpus_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_article_idx": { - "name": "corpus_snapshots_internal_corpus_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_internal_corpus_article_id_articles_id_fk": { - "name": "corpus_snapshots_internal_corpus_article_id_articles_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "corpus_snapshots_internal_corpus_parent_id_fk": { - "name": "corpus_snapshots_internal_corpus_parent_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots": { - "name": "corpus_snapshots", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "keyword_key": { - "name": "keyword_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "captured_at": { - "name": "captured_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_corpus_snapshots_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "snapshot_hash": { - "name": "snapshot_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "query_cluster": { - "name": "query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_claims": { - "name": "baseline_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "facets": { - "name": "facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "gaps": { - "name": "gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_doc_count": { - "name": "baseline_doc_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "failed_page_count": { - "name": "failed_page_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "corpus_snapshots_keyword_idx": { - "name": "corpus_snapshots_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_keyword_key_idx": { - "name": "corpus_snapshots_keyword_key_idx", - "columns": [ - { - "expression": "keyword_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pipeline_run_id_idx": { - "name": "corpus_snapshots_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_updated_at_idx": { - "name": "corpus_snapshots_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_created_at_idx": { - "name": "corpus_snapshots_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topic_searches": { - "name": "topic_searches", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "relevance": { - "name": "relevance", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "relevance_fingerprint": { - "name": "relevance_fingerprint", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "relevance_model": { - "name": "relevance_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "seed": { - "name": "seed", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "seed_key": { - "name": "seed_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "fetched_at": { - "name": "fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "result_count": { - "name": "result_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "candidates": { - "name": "candidates", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "topic_searches_seed_key_idx": { - "name": "topic_searches_seed_key_idx", - "columns": [ - { - "expression": "seed_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_fetched_at_idx": { - "name": "topic_searches_fetched_at_idx", - "columns": [ - { - "expression": "fetched_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_updated_at_idx": { - "name": "topic_searches_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_created_at_idx": { - "name": "topic_searches_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_runs": { - "name": "information_gain_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "snapshot_id": { - "name": "snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "policy_version": { - "name": "policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "policy": { - "name": "policy", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "decision": { - "name": "decision", - "type": "enum_information_gain_runs_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "reasons": { - "name": "reasons", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_available": { - "name": "baseline_available", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "calibrated": { - "name": "calibrated", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "scores_consensus_coverage": { - "name": "scores_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_potential_gain_units": { - "name": "scores_potential_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_units": { - "name": "scores_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verification_ratio": { - "name": "scores_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_density": { - "name": "scores_verified_gain_density", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_facet_gain_coverage": { - "name": "scores_facet_gain_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_internal_duplication_rate": { - "name": "scores_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_total_claims": { - "name": "claim_summary_total_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_materially_novel_claims": { - "name": "claim_summary_materially_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_verified_novel_claims": { - "name": "claim_summary_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_unsupported_novel_claims": { - "name": "claim_summary_unsupported_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_contradictory_claims": { - "name": "claim_summary_contradictory_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_first_party_claims": { - "name": "claim_summary_first_party_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_ids_blocked": { - "name": "claim_ids_blocked", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_review": { - "name": "claim_ids_review", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_materially_novel": { - "name": "claim_ids_materially_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_verified_novel": { - "name": "claim_ids_verified_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claims": { - "name": "claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "token_count": { - "name": "token_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "draft_updated_at": { - "name": "draft_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "information_gain_runs_article_idx": { - "name": "information_gain_runs_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_pipeline_run_id_idx": { - "name": "information_gain_runs_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_snapshot_idx": { - "name": "information_gain_runs_snapshot_idx", - "columns": [ - { - "expression": "snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_decision_idx": { - "name": "information_gain_runs_decision_idx", - "columns": [ - { - "expression": "decision", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_updated_at_idx": { - "name": "information_gain_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_created_at_idx": { - "name": "information_gain_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "information_gain_runs_article_id_articles_id_fk": { - "name": "information_gain_runs_article_id_articles_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "information_gain_runs_snapshot_id_corpus_snapshots_id_fk": { - "name": "information_gain_runs_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs": { - "name": "pipeline_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "run_id": { - "name": "run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "enum_pipeline_runs_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_pipeline_runs_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "mode": { - "name": "mode", - "type": "enum_pipeline_runs_mode", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "requested_count": { - "name": "requested_count", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "config_fingerprint": { - "name": "config_fingerprint", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "config_snapshot": { - "name": "config_snapshot", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "final_statuses": { - "name": "final_statuses", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "warnings": { - "name": "warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "error_summary": { - "name": "error_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "requested_by": { - "name": "requested_by", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "started_at": { - "name": "started_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "pipeline_runs_run_id_idx": { - "name": "pipeline_runs_run_id_idx", - "columns": [ - { - "expression": "run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_status_idx": { - "name": "pipeline_runs_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_template_idx": { - "name": "pipeline_runs_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_config_fingerprint_idx": { - "name": "pipeline_runs_config_fingerprint_idx", - "columns": [ - { - "expression": "config_fingerprint", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_updated_at_idx": { - "name": "pipeline_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_created_at_idx": { - "name": "pipeline_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_template_id_templates_id_fk": { - "name": "pipeline_runs_template_id_templates_id_fk", - "tableFrom": "pipeline_runs", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs_rels": { - "name": "pipeline_runs_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "pipeline_runs_rels_order_idx": { - "name": "pipeline_runs_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_parent_idx": { - "name": "pipeline_runs_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_path_idx": { - "name": "pipeline_runs_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_articles_id_idx": { - "name": "pipeline_runs_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_rels_parent_fk": { - "name": "pipeline_runs_rels_parent_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "pipeline_runs_rels_articles_fk": { - "name": "pipeline_runs_rels_articles_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_kv": { - "name": "payload_kv", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "data": { - "name": "data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "payload_kv_key_idx": { - "name": "payload_kv_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_log": { - "name": "payload_jobs_log", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "executed_at": { - "name": "executed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_log_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "task_i_d": { - "name": "task_i_d", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "output": { - "name": "output", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "state": { - "name": "state", - "type": "enum_payload_jobs_log_state", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_jobs_log_order_idx": { - "name": "payload_jobs_log_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_log_parent_id_idx": { - "name": "payload_jobs_log_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_jobs_log_parent_id_fk": { - "name": "payload_jobs_log_parent_id_fk", - "tableFrom": "payload_jobs_log", - "tableTo": "payload_jobs", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs": { - "name": "payload_jobs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "total_tried": { - "name": "total_tried", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "has_error": { - "name": "has_error", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "queue": { - "name": "queue", - "type": "varchar", - "primaryKey": false, - "notNull": false, - "default": "'default'" - }, - "wait_until": { - "name": "wait_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "processing": { - "name": "processing", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "concurrency_key": { - "name": "concurrency_key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta": { - "name": "meta", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_jobs_completed_at_idx": { - "name": "payload_jobs_completed_at_idx", - "columns": [ - { - "expression": "completed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_total_tried_idx": { - "name": "payload_jobs_total_tried_idx", - "columns": [ - { - "expression": "total_tried", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_has_error_idx": { - "name": "payload_jobs_has_error_idx", - "columns": [ - { - "expression": "has_error", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_task_slug_idx": { - "name": "payload_jobs_task_slug_idx", - "columns": [ - { - "expression": "task_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_queue_idx": { - "name": "payload_jobs_queue_idx", - "columns": [ - { - "expression": "queue", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_wait_until_idx": { - "name": "payload_jobs_wait_until_idx", - "columns": [ - { - "expression": "wait_until", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_processing_idx": { - "name": "payload_jobs_processing_idx", - "columns": [ - { - "expression": "processing", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_concurrency_key_idx": { - "name": "payload_jobs_concurrency_key_idx", - "columns": [ - { - "expression": "concurrency_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_updated_at_idx": { - "name": "payload_jobs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_created_at_idx": { - "name": "payload_jobs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents": { - "name": "payload_locked_documents", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "global_slug": { - "name": "global_slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_locked_documents_global_slug_idx": { - "name": "payload_locked_documents_global_slug_idx", - "columns": [ - { - "expression": "global_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_updated_at_idx": { - "name": "payload_locked_documents_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_created_at_idx": { - "name": "payload_locked_documents_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents_rels": { - "name": "payload_locked_documents_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "setup_suggestions_id": { - "name": "setup_suggestions_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "media_id": { - "name": "media_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "templates_id": { - "name": "templates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "cost_log_id": { - "name": "cost_log_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "article_audit_id": { - "name": "article_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voice_files_id": { - "name": "brand_voice_files_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "governance_audit_id": { - "name": "governance_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_source_candidates_id": { - "name": "evidence_source_candidates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "corpus_snapshots_id": { - "name": "corpus_snapshots_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "topic_searches_id": { - "name": "topic_searches_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_runs_id": { - "name": "information_gain_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "pipeline_runs_id": { - "name": "pipeline_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_locked_documents_rels_order_idx": { - "name": "payload_locked_documents_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_parent_idx": { - "name": "payload_locked_documents_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_path_idx": { - "name": "payload_locked_documents_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_setup_suggestions_id_idx": { - "name": "payload_locked_documents_rels_setup_suggestions_id_idx", - "columns": [ - { - "expression": "setup_suggestions_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_users_id_idx": { - "name": "payload_locked_documents_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_media_id_idx": { - "name": "payload_locked_documents_rels_media_id_idx", - "columns": [ - { - "expression": "media_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_templates_id_idx": { - "name": "payload_locked_documents_rels_templates_id_idx", - "columns": [ - { - "expression": "templates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_articles_id_idx": { - "name": "payload_locked_documents_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_cost_log_id_idx": { - "name": "payload_locked_documents_rels_cost_log_id_idx", - "columns": [ - { - "expression": "cost_log_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_article_audit_id_idx": { - "name": "payload_locked_documents_rels_article_audit_id_idx", - "columns": [ - { - "expression": "article_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voices_id_idx": { - "name": "payload_locked_documents_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voice_files_id_idx": { - "name": "payload_locked_documents_rels_brand_voice_files_id_idx", - "columns": [ - { - "expression": "brand_voice_files_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_icps_id_idx": { - "name": "payload_locked_documents_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_governance_audit_id_idx": { - "name": "payload_locked_documents_rels_governance_audit_id_idx", - "columns": [ - { - "expression": "governance_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_sources_id_idx": { - "name": "payload_locked_documents_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_source_candidates_idx": { - "name": "payload_locked_documents_rels_evidence_source_candidates_idx", - "columns": [ - { - "expression": "evidence_source_candidates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_corpus_snapshots_id_idx": { - "name": "payload_locked_documents_rels_corpus_snapshots_id_idx", - "columns": [ - { - "expression": "corpus_snapshots_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_topic_searches_id_idx": { - "name": "payload_locked_documents_rels_topic_searches_id_idx", - "columns": [ - { - "expression": "topic_searches_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_information_gain_runs_id_idx": { - "name": "payload_locked_documents_rels_information_gain_runs_id_idx", - "columns": [ - { - "expression": "information_gain_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_pipeline_runs_id_idx": { - "name": "payload_locked_documents_rels_pipeline_runs_id_idx", - "columns": [ - { - "expression": "pipeline_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_locked_documents_rels_parent_fk": { - "name": "payload_locked_documents_rels_parent_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "payload_locked_documents", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_setup_suggestions_fk": { - "name": "payload_locked_documents_rels_setup_suggestions_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "setup_suggestions", - "columnsFrom": [ - "setup_suggestions_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_users_fk": { - "name": "payload_locked_documents_rels_users_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_media_fk": { - "name": "payload_locked_documents_rels_media_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "media", - "columnsFrom": [ - "media_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_templates_fk": { - "name": "payload_locked_documents_rels_templates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "templates", - "columnsFrom": [ - "templates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_articles_fk": { - "name": "payload_locked_documents_rels_articles_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_cost_log_fk": { - "name": "payload_locked_documents_rels_cost_log_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "cost_log", - "columnsFrom": [ - "cost_log_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_article_audit_fk": { - "name": "payload_locked_documents_rels_article_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "article_audit", - "columnsFrom": [ - "article_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voices_fk": { - "name": "payload_locked_documents_rels_brand_voices_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voice_files_fk": { - "name": "payload_locked_documents_rels_brand_voice_files_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "brand_voice_files_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_icps_fk": { - "name": "payload_locked_documents_rels_icps_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_governance_audit_fk": { - "name": "payload_locked_documents_rels_governance_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "governance_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_sources_fk": { - "name": "payload_locked_documents_rels_evidence_sources_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_source_candidates_fk": { - "name": "payload_locked_documents_rels_evidence_source_candidates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_source_candidates", - "columnsFrom": [ - "evidence_source_candidates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_corpus_snapshots_fk": { - "name": "payload_locked_documents_rels_corpus_snapshots_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "corpus_snapshots_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_topic_searches_fk": { - "name": "payload_locked_documents_rels_topic_searches_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "topic_searches", - "columnsFrom": [ - "topic_searches_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_information_gain_runs_fk": { - "name": "payload_locked_documents_rels_information_gain_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_pipeline_runs_fk": { - "name": "payload_locked_documents_rels_pipeline_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "pipeline_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences": { - "name": "payload_preferences", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "value": { - "name": "value", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_preferences_key_idx": { - "name": "payload_preferences_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_updated_at_idx": { - "name": "payload_preferences_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_created_at_idx": { - "name": "payload_preferences_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences_rels": { - "name": "payload_preferences_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_preferences_rels_order_idx": { - "name": "payload_preferences_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_parent_idx": { - "name": "payload_preferences_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_path_idx": { - "name": "payload_preferences_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_users_id_idx": { - "name": "payload_preferences_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_preferences_rels_parent_fk": { - "name": "payload_preferences_rels_parent_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "payload_preferences", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_preferences_rels_users_fk": { - "name": "payload_preferences_rels_users_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_migrations": { - "name": "payload_migrations", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "batch": { - "name": "batch", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_migrations_updated_at_idx": { - "name": "payload_migrations_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_migrations_created_at_idx": { - "name": "payload_migrations_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.setup_suggestion_scan": { - "name": "setup_suggestion_scan", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "audit_cursor": { - "name": "audit_cursor", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audit_cursor_id": { - "name": "audit_cursor_id", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile_competitors": { - "name": "workspace_profile_competitors", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "workspace_profile_competitors_order_idx": { - "name": "workspace_profile_competitors_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "workspace_profile_competitors_parent_id_idx": { - "name": "workspace_profile_competitors_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "workspace_profile_competitors_parent_id_fk": { - "name": "workspace_profile_competitors_parent_id_fk", - "tableFrom": "workspace_profile_competitors", - "tableTo": "workspace_profile", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile": { - "name": "workspace_profile", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "company_name": { - "name": "company_name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "target_domain": { - "name": "target_domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_notes": { - "name": "site_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_pages": { - "name": "site_pages", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "site_pages_fetched_at": { - "name": "site_pages_fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_core_claims": { - "name": "positioning_core_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "evidence_ref": { - "name": "evidence_ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_core_claims_order_idx": { - "name": "positioning_core_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_core_claims_parent_id_idx": { - "name": "positioning_core_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_core_claims_parent_id_fk": { - "name": "positioning_core_claims_parent_id_fk", - "tableFrom": "positioning_core_claims", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_pillars": { - "name": "positioning_pillars", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "one_line": { - "name": "one_line", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "carries": { - "name": "carries", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_pillars_order_idx": { - "name": "positioning_pillars_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_pillars_parent_id_idx": { - "name": "positioning_pillars_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_pillars_parent_id_fk": { - "name": "positioning_pillars_parent_id_fk", - "tableFrom": "positioning_pillars", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_descriptor_ladder": { - "name": "positioning_descriptor_ladder", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "descriptor": { - "name": "descriptor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_descriptor_ladder_order_idx": { - "name": "positioning_descriptor_ladder_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_descriptor_ladder_parent_id_idx": { - "name": "positioning_descriptor_ladder_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_descriptor_ladder_parent_id_fk": { - "name": "positioning_descriptor_ladder_parent_id_fk", - "tableFrom": "positioning_descriptor_ladder", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_reach_for": { - "name": "positioning_vocabulary_reach_for", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_reach_for_order_idx": { - "name": "positioning_vocabulary_reach_for_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_reach_for_parent_id_idx": { - "name": "positioning_vocabulary_reach_for_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_reach_for_parent_id_fk": { - "name": "positioning_vocabulary_reach_for_parent_id_fk", - "tableFrom": "positioning_vocabulary_reach_for", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_avoid": { - "name": "positioning_vocabulary_avoid", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_avoid_order_idx": { - "name": "positioning_vocabulary_avoid_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_avoid_parent_id_idx": { - "name": "positioning_vocabulary_avoid_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_avoid_parent_id_fk": { - "name": "positioning_vocabulary_avoid_parent_id_fk", - "tableFrom": "positioning_vocabulary_avoid", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_open_rulings": { - "name": "positioning_open_rulings", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_positioning_open_rulings_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'open'" - }, - "ruling": { - "name": "ruling", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "ruled_at": { - "name": "ruled_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_open_rulings_order_idx": { - "name": "positioning_open_rulings_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_open_rulings_parent_id_idx": { - "name": "positioning_open_rulings_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_open_rulings_parent_id_fk": { - "name": "positioning_open_rulings_parent_id_fk", - "tableFrom": "positioning_open_rulings", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning": { - "name": "positioning", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "category": { - "name": "category", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "goal": { - "name": "goal", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "promise": { - "name": "promise", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active_position": { - "name": "active_position", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "macro_frame": { - "name": "macro_frame", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "landscape": { - "name": "landscape", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "enemy": { - "name": "enemy", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "archetype": { - "name": "archetype", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence": { - "name": "essence", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims_cleared_surfaces": { - "name": "evidence_bank_verified_claims_cleared_surfaces", - "schema": "", - "columns": { - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "parent_id": { - "name": "parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "enum_evidence_bank_verified_claims_cleared_surfaces", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - } - }, - "indexes": { - "evidence_bank_verified_claims_cleared_surfaces_order_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_cleared_surfaces_parent_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_cleared_surfaces_parent_fk": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_fk", - "tableFrom": "evidence_bank_verified_claims_cleared_surfaces", - "tableTo": "evidence_bank_verified_claims", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims": { - "name": "evidence_bank_verified_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "primary_source": { - "name": "primary_source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_url": { - "name": "source_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_date": { - "name": "source_date", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sample_or_method": { - "name": "sample_or_method", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "verification_depth": { - "name": "verification_depth", - "type": "enum_evidence_bank_verified_claims_verification_depth", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "limits": { - "name": "limits", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "recheck_at": { - "name": "recheck_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_verified_claims_order_idx": { - "name": "evidence_bank_verified_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_parent_id_idx": { - "name": "evidence_bank_verified_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_parent_id_fk": { - "name": "evidence_bank_verified_claims_parent_id_fk", - "tableFrom": "evidence_bank_verified_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_facts": { - "name": "evidence_bank_facts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "fact": { - "name": "fact", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "owner": { - "name": "owner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "last_confirmed_at": { - "name": "last_confirmed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_facts_order_idx": { - "name": "evidence_bank_facts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_facts_parent_id_idx": { - "name": "evidence_bank_facts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_facts_parent_id_fk": { - "name": "evidence_bank_facts_parent_id_fk", - "tableFrom": "evidence_bank_facts", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_rejected_claims": { - "name": "evidence_bank_rejected_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_bank_rejected_claims_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'rejected'" - }, - "reason": { - "name": "reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "replacement": { - "name": "replacement", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_rejected_claims_order_idx": { - "name": "evidence_bank_rejected_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_rejected_claims_parent_id_idx": { - "name": "evidence_bank_rejected_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_rejected_claims_parent_id_fk": { - "name": "evidence_bank_rejected_claims_parent_id_fk", - "tableFrom": "evidence_bank_rejected_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank": { - "name": "evidence_bank", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "ref_counter": { - "name": "ref_counter", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.llm_settings": { - "name": "llm_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "topic_relevance_model": { - "name": "topic_relevance_model", - "type": "enum_llm_settings_topic_relevance_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "brief_angle_model": { - "name": "brief_angle_model", - "type": "enum_llm_settings_brief_angle_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "generate_model": { - "name": "generate_model", - "type": "enum_llm_settings_generate_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "fact_check_model": { - "name": "fact_check_model", - "type": "enum_llm_settings_fact_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "qualitative_review_model": { - "name": "qualitative_review_model", - "type": "enum_llm_settings_qualitative_review_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "claim_extraction_model": { - "name": "claim_extraction_model", - "type": "enum_llm_settings_claim_extraction_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_judge_model": { - "name": "information_gain_judge_model", - "type": "enum_llm_settings_information_gain_judge_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_verification_model": { - "name": "evidence_verification_model", - "type": "enum_llm_settings_evidence_verification_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_check_model": { - "name": "evidence_check_model", - "type": "enum_llm_settings_evidence_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "brand_voice_extract_model": { - "name": "brand_voice_extract_model", - "type": "enum_llm_settings_brand_voice_extract_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "setup_assist_model": { - "name": "setup_assist_model", - "type": "enum_llm_settings_setup_assist_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_policy": { - "name": "information_gain_policy", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "min_consensus_coverage": { - "name": "min_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verification_ratio": { - "name": "min_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_novel_factual_integrity": { - "name": "min_novel_factual_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_numeric_temporal_integrity": { - "name": "min_numeric_temporal_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "require_exact_value_match": { - "name": "require_exact_value_match", - "type": "enum_information_gain_policy_require_exact_value_match", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "require_evidence_lineage": { - "name": "require_evidence_lineage", - "type": "enum_information_gain_policy_require_evidence_lineage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "block_first_party_measurements": { - "name": "block_first_party_measurements", - "type": "enum_information_gain_policy_block_first_party_measurements", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "max_contradiction_probability": { - "name": "max_contradiction_probability", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "material_novelty_threshold": { - "name": "material_novelty_threshold", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "max_internal_duplication_rate": { - "name": "max_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verified_novel_claims": { - "name": "min_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.webhook_settings": { - "name": "webhook_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "secret": { - "name": "secret", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_stats": { - "name": "payload_jobs_stats", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "stats": { - "name": "stats", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": { - "public.enum_setup_suggestions_kind": { - "name": "enum_setup_suggestions_kind", - "schema": "public", - "values": [ - "banned_word", - "not_trait", - "unbacked_claim", - "rejected_ref" - ] - }, - "public.enum_setup_suggestions_target": { - "name": "enum_setup_suggestions_target", - "schema": "public", - "values": [ - "brand-voice", - "evidence-bank" - ] - }, - "public.enum_setup_suggestions_status": { - "name": "enum_setup_suggestions_status", - "schema": "public", - "values": [ - "open", - "accepted", - "dismissed", - "obsolete" - ] - }, - "public.enum_templates_company_mentions": { - "name": "enum_templates_company_mentions", - "schema": "public", - "values": [ - "none", - "mention", - "feature" - ] - }, - "public.enum_articles_brief_sections_source": { - "name": "enum_articles_brief_sections_source", - "schema": "public", - "values": [ - "template", - "research", - "editor" - ] - }, - "public.enum_articles_status": { - "name": "enum_articles_status", - "schema": "public", - "values": [ - "topic_selected", - "brief_review", - "researched", - "drafted", - "qa_passed", - "verified", - "needs_review", - "blocked", - "needs_revision", - "approved", - "published" - ] - }, - "public.enum_articles_information_gain_decision": { - "name": "enum_articles_information_gain_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_cost_log_stage": { - "name": "enum_cost_log_stage", - "schema": "public", - "values": [ - "generate", - "factCheck", - "qualitativeReview", - "claimExtraction", - "informationGainJudge", - "evidenceVerification", - "evidenceCheck", - "briefAngle", - "brandVoiceExtract", - "setupAssist", - "topicRelevance" - ] - }, - "public.enum_article_audit_actor_type": { - "name": "enum_article_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_brand_voices_status": { - "name": "enum_brand_voices_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_brand_voices_source": { - "name": "enum_brand_voices_source", - "schema": "public", - "values": [ - "onboarding", - "upload" - ] - }, - "public.enum_brand_voices_audience_language_level": { - "name": "enum_brand_voices_audience_language_level", - "schema": "public", - "values": [ - "plain", - "general", - "professional", - "expert" - ] - }, - "public.enum_icps_pains_confidence": { - "name": "enum_icps_pains_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_competition_confidence": { - "name": "enum_icps_competition_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_channels_confidence": { - "name": "enum_icps_channels_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_status": { - "name": "enum_icps_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_icps_motivation_confidence": { - "name": "enum_icps_motivation_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_solution_confidence": { - "name": "enum_icps_solution_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_why_us_confidence": { - "name": "enum_icps_why_us_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_governance_audit_actor_type": { - "name": "enum_governance_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_evidence_sources_quality_class": { - "name": "enum_evidence_sources_quality_class", - "schema": "public", - "values": [ - "first_party_dataset", - "primary", - "official_docs", - "secondary", - "unverified", - "blocked" - ] - }, - "public.enum_evidence_source_candidates_status": { - "name": "enum_evidence_source_candidates_status", - "schema": "public", - "values": [ - "pending", - "approved", - "dismissed" - ] - }, - "public.enum_evidence_source_candidates_suggested_class": { - "name": "enum_evidence_source_candidates_suggested_class", - "schema": "public", - "values": [ - "primary", - "official_docs", - "secondary", - "unverified" - ] - }, - "public.enum_corpus_snapshots_pages_fetch_status": { - "name": "enum_corpus_snapshots_pages_fetch_status", - "schema": "public", - "values": [ - "ok", - "failed", - "skipped" - ] - }, - "public.enum_corpus_snapshots_status": { - "name": "enum_corpus_snapshots_status", - "schema": "public", - "values": [ - "complete", - "partial", - "empty" - ] - }, - "public.enum_information_gain_runs_decision": { - "name": "enum_information_gain_runs_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_pipeline_runs_source": { - "name": "enum_pipeline_runs_source", - "schema": "public", - "values": [ - "admin", - "cli", - "selected" - ] - }, - "public.enum_pipeline_runs_status": { - "name": "enum_pipeline_runs_status", - "schema": "public", - "values": [ - "queued", - "running", - "succeeded", - "failed" - ] - }, - "public.enum_pipeline_runs_mode": { - "name": "enum_pipeline_runs_mode", - "schema": "public", - "values": [ - "mock", - "live" - ] - }, - "public.enum_payload_jobs_log_task_slug": { - "name": "enum_payload_jobs_log_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due", - "collect-setup-suggestions" - ] - }, - "public.enum_payload_jobs_log_state": { - "name": "enum_payload_jobs_log_state", - "schema": "public", - "values": [ - "failed", - "succeeded" - ] - }, - "public.enum_payload_jobs_task_slug": { - "name": "enum_payload_jobs_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due", - "collect-setup-suggestions" - ] - }, - "public.enum_positioning_open_rulings_status": { - "name": "enum_positioning_open_rulings_status", - "schema": "public", - "values": [ - "open", - "ruled" - ] - }, - "public.enum_evidence_bank_verified_claims_cleared_surfaces": { - "name": "enum_evidence_bank_verified_claims_cleared_surfaces", - "schema": "public", - "values": [ - "web", - "blog", - "ads", - "sales", - "social", - "pr" - ] - }, - "public.enum_evidence_bank_verified_claims_verification_depth": { - "name": "enum_evidence_bank_verified_claims_verification_depth", - "schema": "public", - "values": [ - "primary_document", - "reproduced", - "third_party_audit", - "self_reported" - ] - }, - "public.enum_evidence_bank_rejected_claims_status": { - "name": "enum_evidence_bank_rejected_claims_status", - "schema": "public", - "values": [ - "rejected", - "expired" - ] - }, - "public.enum_llm_settings_topic_relevance_model": { - "name": "enum_llm_settings_topic_relevance_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_brief_angle_model": { - "name": "enum_llm_settings_brief_angle_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_generate_model": { - "name": "enum_llm_settings_generate_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_fact_check_model": { - "name": "enum_llm_settings_fact_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_qualitative_review_model": { - "name": "enum_llm_settings_qualitative_review_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_claim_extraction_model": { - "name": "enum_llm_settings_claim_extraction_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_information_gain_judge_model": { - "name": "enum_llm_settings_information_gain_judge_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_verification_model": { - "name": "enum_llm_settings_evidence_verification_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_check_model": { - "name": "enum_llm_settings_evidence_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_brand_voice_extract_model": { - "name": "enum_llm_settings_brand_voice_extract_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_setup_assist_model": { - "name": "enum_llm_settings_setup_assist_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_information_gain_policy_require_exact_value_match": { - "name": "enum_information_gain_policy_require_exact_value_match", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_require_evidence_lineage": { - "name": "enum_information_gain_policy_require_evidence_lineage", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_block_first_party_measurements": { - "name": "enum_information_gain_policy_block_first_party_measurements", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "2a155271-c349-480e-9b9c-1a631f811784", - "prevId": "00000000-0000-0000-0000-000000000000" -} \ No newline at end of file diff --git a/cms/src/migrations/20261021_145609_article_content_updated_at.json b/cms/src/migrations/20261021_145609_article_content_updated_at.json deleted file mode 100644 index e00df487..00000000 --- a/cms/src/migrations/20261021_145609_article_content_updated_at.json +++ /dev/null @@ -1,9771 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "tables": { - "public.setup_suggestions": { - "name": "setup_suggestions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "kind": { - "name": "kind", - "type": "enum_setup_suggestions_kind", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'banned_word'" - }, - "signature": { - "name": "signature", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "target": { - "name": "target", - "type": "enum_setup_suggestions_target", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'brand-voice'" - }, - "proposal": { - "name": "proposal", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "occurrences": { - "name": "occurrences", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "count": { - "name": "count", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "status": { - "name": "status", - "type": "enum_setup_suggestions_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'open'" - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "last_seen_at": { - "name": "last_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "decided_by": { - "name": "decided_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "decided_at": { - "name": "decided_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "decision_reason": { - "name": "decision_reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "setup_suggestions_signature_idx": { - "name": "setup_suggestions_signature_idx", - "columns": [ - { - "expression": "signature", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "setup_suggestions_status_idx": { - "name": "setup_suggestions_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "setup_suggestions_updated_at_idx": { - "name": "setup_suggestions_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "setup_suggestions_created_at_idx": { - "name": "setup_suggestions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.users_sessions": { - "name": "users_sessions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "users_sessions_order_idx": { - "name": "users_sessions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_sessions_parent_id_idx": { - "name": "users_sessions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "users_sessions_parent_id_fk": { - "name": "users_sessions_parent_id_fk", - "tableFrom": "users_sessions", - "tableTo": "users", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "email": { - "name": "email", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "reset_password_token": { - "name": "reset_password_token", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "reset_password_expiration": { - "name": "reset_password_expiration", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "salt": { - "name": "salt", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "hash": { - "name": "hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "login_attempts": { - "name": "login_attempts", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "lock_until": { - "name": "lock_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "users_updated_at_idx": { - "name": "users_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_created_at_idx": { - "name": "users_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_email_idx": { - "name": "users_email_idx", - "columns": [ - { - "expression": "email", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.media": { - "name": "media", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "media_updated_at_idx": { - "name": "media_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_created_at_idx": { - "name": "media_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "media_filename_idx": { - "name": "media_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_dos": { - "name": "templates_dos", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_dos_order_idx": { - "name": "templates_dos_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_dos_parent_id_idx": { - "name": "templates_dos_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_dos_parent_id_fk": { - "name": "templates_dos_parent_id_fk", - "tableFrom": "templates_dos", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_donts": { - "name": "templates_donts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_donts_order_idx": { - "name": "templates_donts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_donts_parent_id_idx": { - "name": "templates_donts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_donts_parent_id_fk": { - "name": "templates_donts_parent_id_fk", - "tableFrom": "templates_donts", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates_required_sections": { - "name": "templates_required_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "templates_required_sections_order_idx": { - "name": "templates_required_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_required_sections_parent_id_idx": { - "name": "templates_required_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "templates_required_sections_parent_id_fk": { - "name": "templates_required_sections_parent_id_fk", - "tableFrom": "templates_required_sections", - "tableTo": "templates", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.templates": { - "name": "templates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "intent": { - "name": "intent", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "company_mentions": { - "name": "company_mentions", - "type": "enum_templates_company_mentions", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'mention'" - }, - "outline": { - "name": "outline", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "example": { - "name": "example", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "seo_spec_title_tag_max_length": { - "name": "seo_spec_title_tag_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 60 - }, - "seo_spec_meta_description_max_length": { - "name": "seo_spec_meta_description_max_length", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 160 - }, - "seo_spec_heading_structure_rules": { - "name": "seo_spec_heading_structure_rules", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_required": { - "name": "seo_spec_faq_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_min_questions": { - "name": "seo_spec_faq_min_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_faq_max_questions": { - "name": "seo_spec_faq_max_questions", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "seo_spec_og_tags_required": { - "name": "seo_spec_og_tags_required", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "templates_name_idx": { - "name": "templates_name_idx", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_updated_at_idx": { - "name": "templates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "templates_created_at_idx": { - "name": "templates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_secondary_keywords": { - "name": "articles_secondary_keywords", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_secondary_keywords_order_idx": { - "name": "articles_secondary_keywords_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_secondary_keywords_parent_id_idx": { - "name": "articles_secondary_keywords_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_secondary_keywords_parent_id_fk": { - "name": "articles_secondary_keywords_parent_id_fk", - "tableFrom": "articles_secondary_keywords", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_common_subtopics": { - "name": "articles_research_common_subtopics", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_common_subtopics_order_idx": { - "name": "articles_research_common_subtopics_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_common_subtopics_parent_id_idx": { - "name": "articles_research_common_subtopics_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_common_subtopics_parent_id_fk": { - "name": "articles_research_common_subtopics_parent_id_fk", - "tableFrom": "articles_research_common_subtopics", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_research_related_questions": { - "name": "articles_research_related_questions", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_research_related_questions_order_idx": { - "name": "articles_research_related_questions_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_related_questions_parent_id_idx": { - "name": "articles_research_related_questions_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_research_related_questions_parent_id_fk": { - "name": "articles_research_related_questions_parent_id_fk", - "tableFrom": "articles_research_related_questions", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_brief_sections": { - "name": "articles_brief_sections", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "heading": { - "name": "heading", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "enum_articles_brief_sections_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "articles_brief_sections_order_idx": { - "name": "articles_brief_sections_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_brief_sections_parent_id_idx": { - "name": "articles_brief_sections_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_brief_sections_parent_id_fk": { - "name": "articles_brief_sections_parent_id_fk", - "tableFrom": "articles_brief_sections", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles_faq_items": { - "name": "articles_faq_items", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "answer": { - "name": "answer", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "articles_faq_items_order_idx": { - "name": "articles_faq_items_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_faq_items_parent_id_idx": { - "name": "articles_faq_items_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_faq_items_parent_id_fk": { - "name": "articles_faq_items_parent_id_fk", - "tableFrom": "articles_faq_items", - "tableTo": "articles", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "archived": { - "name": "archived", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "slug": { - "name": "slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icp_id": { - "name": "icp_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_ranking_pages_summary": { - "name": "research_ranking_pages_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "research_snapshot_id": { - "name": "research_snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "research_query_cluster": { - "name": "research_query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_facets": { - "name": "research_facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "research_gaps": { - "name": "research_gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_angle": { - "name": "brief_angle", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_angle_options": { - "name": "brief_angle_options", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_audience": { - "name": "brief_audience", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_must_cover": { - "name": "brief_must_cover", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_opportunities": { - "name": "brief_opportunities", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "brief_notes": { - "name": "brief_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "brief_approved_at": { - "name": "brief_approved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "brief_approved_by": { - "name": "brief_approved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "body": { - "name": "body", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "title_tag": { - "name": "title_tag", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta_description": { - "name": "meta_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_title": { - "name": "og_title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_description": { - "name": "og_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "og_image": { - "name": "og_image", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "enum_articles_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'topic_selected'" - }, - "publish_at": { - "name": "publish_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "evidence_citations": { - "name": "evidence_citations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_passed": { - "name": "qa_results_structural_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_structural_violations": { - "name": "qa_results_structural_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_passed": { - "name": "qa_results_fact_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_notes": { - "name": "qa_results_fact_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_fact_check_sources": { - "name": "qa_results_fact_check_sources", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_passed": { - "name": "qa_results_qualitative_review_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_notes": { - "name": "qa_results_qualitative_review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_score": { - "name": "qa_results_qualitative_review_voice_score", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_voice_notes": { - "name": "qa_results_qualitative_review_voice_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_qualitative_review_not_trait_violations": { - "name": "qa_results_qualitative_review_not_trait_violations", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_passed": { - "name": "qa_results_evidence_check_passed", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_notes": { - "name": "qa_results_evidence_check_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_results_evidence_check_claims": { - "name": "qa_results_evidence_check_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "information_gain_run_id": { - "name": "information_gain_run_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_decision": { - "name": "information_gain_decision", - "type": "enum_articles_information_gain_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_policy_version": { - "name": "information_gain_policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "information_gain_consensus_coverage": { - "name": "information_gain_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_gain_units": { - "name": "information_gain_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verification_ratio": { - "name": "information_gain_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_internal_duplication_rate": { - "name": "information_gain_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_verified_novel_claims": { - "name": "information_gain_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "information_gain_scored_at": { - "name": "information_gain_scored_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "generation_model": { - "name": "generation_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "qa_models": { - "name": "qa_models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "total_cost_usd": { - "name": "total_cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_notes": { - "name": "review_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "review_justification": { - "name": "review_justification", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_notes": { - "name": "revision_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "revision_count": { - "name": "revision_count", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "content_updated_at": { - "name": "content_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "published_at": { - "name": "published_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "articles_archived_idx": { - "name": "articles_archived_idx", - "columns": [ - { - "expression": "archived", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_slug_idx": { - "name": "articles_slug_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_keyword_idx": { - "name": "articles_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_template_idx": { - "name": "articles_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_icp_idx": { - "name": "articles_icp_idx", - "columns": [ - { - "expression": "icp_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_research_research_snapshot_idx": { - "name": "articles_research_research_snapshot_idx", - "columns": [ - { - "expression": "research_snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_status_idx": { - "name": "articles_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_publish_at_idx": { - "name": "articles_publish_at_idx", - "columns": [ - { - "expression": "publish_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_information_gain_information_gain_run_idx": { - "name": "articles_information_gain_information_gain_run_idx", - "columns": [ - { - "expression": "information_gain_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_updated_at_idx": { - "name": "articles_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "articles_created_at_idx": { - "name": "articles_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "articles_template_id_templates_id_fk": { - "name": "articles_template_id_templates_id_fk", - "tableFrom": "articles", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_icp_id_icps_id_fk": { - "name": "articles_icp_id_icps_id_fk", - "tableFrom": "articles", - "tableTo": "icps", - "columnsFrom": [ - "icp_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_research_snapshot_id_corpus_snapshots_id_fk": { - "name": "articles_research_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "articles", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "research_snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "articles_information_gain_run_id_information_gain_runs_id_fk": { - "name": "articles_information_gain_run_id_information_gain_runs_id_fk", - "tableFrom": "articles", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_run_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cost_log": { - "name": "cost_log", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "enum_cost_log_stage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "provider": { - "name": "provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "model": { - "name": "model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "input_tokens": { - "name": "input_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "output_tokens": { - "name": "output_tokens", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "web_search_requests": { - "name": "web_search_requests", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "request": { - "name": "request", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cost_log_pipeline_run_id_idx": { - "name": "cost_log_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_article_idx": { - "name": "cost_log_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_updated_at_idx": { - "name": "cost_log_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cost_log_created_at_idx": { - "name": "cost_log_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "cost_log_article_id_articles_id_fk": { - "name": "cost_log_article_id_articles_id_fk", - "tableFrom": "cost_log", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.article_audit": { - "name": "article_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_article_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "stage": { - "name": "stage", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "article_audit_article_idx": { - "name": "article_audit_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_event_idx": { - "name": "article_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_pipeline_run_id_idx": { - "name": "article_audit_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_updated_at_idx": { - "name": "article_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "article_audit_created_at_idx": { - "name": "article_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "article_audit_article_id_articles_id_fk": { - "name": "article_audit_article_id_articles_id_fk", - "tableFrom": "article_audit", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_core_values": { - "name": "brand_voices_core_values", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "value": { - "name": "value", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_core_values_order_idx": { - "name": "brand_voices_core_values_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_core_values_parent_id_idx": { - "name": "brand_voices_core_values_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_core_values_parent_id_fk": { - "name": "brand_voices_core_values_parent_id_fk", - "tableFrom": "brand_voices_core_values", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_voice_adjectives": { - "name": "brand_voices_voice_adjectives", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "adjective": { - "name": "adjective", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "do_example": { - "name": "do_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "dont_example": { - "name": "dont_example", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_voice_adjectives_order_idx": { - "name": "brand_voices_voice_adjectives_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_voice_adjectives_parent_id_idx": { - "name": "brand_voices_voice_adjectives_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_voice_adjectives_parent_id_fk": { - "name": "brand_voices_voice_adjectives_parent_id_fk", - "tableFrom": "brand_voices_voice_adjectives", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_not_traits": { - "name": "brand_voices_not_traits", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "trait": { - "name": "trait", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "boundary_note": { - "name": "boundary_note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_not_traits_order_idx": { - "name": "brand_voices_not_traits_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_not_traits_parent_id_idx": { - "name": "brand_voices_not_traits_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_not_traits_parent_id_fk": { - "name": "brand_voices_not_traits_parent_id_fk", - "tableFrom": "brand_voices_not_traits", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_preferred_words": { - "name": "brand_voices_preferred_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_preferred_words_order_idx": { - "name": "brand_voices_preferred_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_preferred_words_parent_id_idx": { - "name": "brand_voices_preferred_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_preferred_words_parent_id_fk": { - "name": "brand_voices_preferred_words_parent_id_fk", - "tableFrom": "brand_voices_preferred_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_banned_words": { - "name": "brand_voices_banned_words", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "word": { - "name": "word", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voices_banned_words_order_idx": { - "name": "brand_voices_banned_words_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_banned_words_parent_id_idx": { - "name": "brand_voices_banned_words_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_banned_words_parent_id_fk": { - "name": "brand_voices_banned_words_parent_id_fk", - "tableFrom": "brand_voices_banned_words", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices_samples": { - "name": "brand_voices_samples", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "brand_voices_samples_order_idx": { - "name": "brand_voices_samples_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_samples_parent_id_idx": { - "name": "brand_voices_samples_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_samples_parent_id_fk": { - "name": "brand_voices_samples_parent_id_fk", - "tableFrom": "brand_voices_samples", - "tableTo": "brand_voices", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voices": { - "name": "brand_voices", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_brand_voices_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "source": { - "name": "source", - "type": "enum_brand_voices_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'onboarding'" - }, - "source_file_id": { - "name": "source_file_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "onboarding_step": { - "name": "onboarding_step", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_one_liner": { - "name": "essence_one_liner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence_mission": { - "name": "essence_mission", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_description": { - "name": "audience_description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_language_level": { - "name": "audience_language_level", - "type": "enum_brand_voices_audience_language_level", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "audience_interests": { - "name": "audience_interests", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audience_needs": { - "name": "audience_needs", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "persona": { - "name": "persona", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "voice_in_own_words": { - "name": "voice_in_own_words", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "tone_formality": { - "name": "tone_formality", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_warmth": { - "name": "tone_warmth", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_boldness": { - "name": "tone_boldness", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "tone_energy": { - "name": "tone_energy", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 3 - }, - "extraction_model": { - "name": "extraction_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_provider": { - "name": "extraction_provider", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "extraction_extracted_at": { - "name": "extraction_extracted_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "extraction_source_chars": { - "name": "extraction_source_chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "extraction_warnings": { - "name": "extraction_warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "brand_voices_status_idx": { - "name": "brand_voices_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_source_file_idx": { - "name": "brand_voices_source_file_idx", - "columns": [ - { - "expression": "source_file_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_updated_at_idx": { - "name": "brand_voices_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voices_created_at_idx": { - "name": "brand_voices_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "brand_voices_source_file_id_brand_voice_files_id_fk": { - "name": "brand_voices_source_file_id_brand_voice_files_id_fk", - "tableFrom": "brand_voices", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "source_file_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.brand_voice_files": { - "name": "brand_voice_files", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "thumbnail_u_r_l": { - "name": "thumbnail_u_r_l", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filename": { - "name": "filename", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "filesize": { - "name": "filesize", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_x": { - "name": "focal_x", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "focal_y": { - "name": "focal_y", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "brand_voice_files_updated_at_idx": { - "name": "brand_voice_files_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_created_at_idx": { - "name": "brand_voice_files_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "brand_voice_files_filename_idx": { - "name": "brand_voice_files_filename_idx", - "columns": [ - { - "expression": "filename", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains_evidence": { - "name": "icps_pains_evidence", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_evidence_order_idx": { - "name": "icps_pains_evidence_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_evidence_parent_id_idx": { - "name": "icps_pains_evidence_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_evidence_parent_id_fk": { - "name": "icps_pains_evidence_parent_id_fk", - "tableFrom": "icps_pains_evidence", - "tableTo": "icps_pains", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_pains": { - "name": "icps_pains", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_pains_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_pains_order_idx": { - "name": "icps_pains_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_pains_parent_id_idx": { - "name": "icps_pains_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_pains_parent_id_fk": { - "name": "icps_pains_parent_id_fk", - "tableFrom": "icps_pains", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_solution_sample_lines": { - "name": "icps_solution_sample_lines", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_solution_sample_lines_order_idx": { - "name": "icps_solution_sample_lines_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_solution_sample_lines_parent_id_idx": { - "name": "icps_solution_sample_lines_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_solution_sample_lines_parent_id_fk": { - "name": "icps_solution_sample_lines_parent_id_fk", - "tableFrom": "icps_solution_sample_lines", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_competition": { - "name": "icps_competition", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "competitor": { - "name": "competitor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claimed_at": { - "name": "claimed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_competition_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_competition_order_idx": { - "name": "icps_competition_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_competition_parent_id_idx": { - "name": "icps_competition_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_competition_parent_id_fk": { - "name": "icps_competition_parent_id_fk", - "tableFrom": "icps_competition", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_channels": { - "name": "icps_channels", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "channel": { - "name": "channel", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "confidence": { - "name": "confidence", - "type": "enum_icps_channels_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "icps_channels_order_idx": { - "name": "icps_channels_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_channels_parent_id_idx": { - "name": "icps_channels_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_channels_parent_id_fk": { - "name": "icps_channels_parent_id_fk", - "tableFrom": "icps_channels", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_churn_triggers": { - "name": "icps_churn_triggers", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_churn_triggers_order_idx": { - "name": "icps_churn_triggers_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_churn_triggers_parent_id_idx": { - "name": "icps_churn_triggers_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_churn_triggers_parent_id_fk": { - "name": "icps_churn_triggers_parent_id_fk", - "tableFrom": "icps_churn_triggers", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps_not_our_user": { - "name": "icps_not_our_user", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "icps_not_our_user_order_idx": { - "name": "icps_not_our_user_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_not_our_user_parent_id_idx": { - "name": "icps_not_our_user_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "icps_not_our_user_parent_id_fk": { - "name": "icps_not_our_user_parent_id_fk", - "tableFrom": "icps_not_our_user", - "tableTo": "icps", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.icps": { - "name": "icps", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_icps_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'draft'" - }, - "primary": { - "name": "primary", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "activated_at": { - "name": "activated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "activated_by": { - "name": "activated_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "who": { - "name": "who", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_text": { - "name": "motivation_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "motivation_hypothesis": { - "name": "motivation_hypothesis", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "motivation_confidence": { - "name": "motivation_confidence", - "type": "enum_icps_motivation_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "solution_mechanism": { - "name": "solution_mechanism", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "solution_confidence": { - "name": "solution_confidence", - "type": "enum_icps_solution_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "why_us_text": { - "name": "why_us_text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "why_us_confidence": { - "name": "why_us_confidence", - "type": "enum_icps_why_us_confidence", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "icps_status_idx": { - "name": "icps_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_primary_idx": { - "name": "icps_primary_idx", - "columns": [ - { - "expression": "primary", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_updated_at_idx": { - "name": "icps_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "icps_created_at_idx": { - "name": "icps_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit": { - "name": "governance_audit", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "subject_global": { - "name": "subject_global", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "event": { - "name": "event", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "summary": { - "name": "summary", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "actor_type": { - "name": "actor_type", - "type": "enum_governance_audit_actor_type", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "actor": { - "name": "actor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "from_status": { - "name": "from_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "to_status": { - "name": "to_status", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "details": { - "name": "details", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "governance_audit_subject_global_idx": { - "name": "governance_audit_subject_global_idx", - "columns": [ - { - "expression": "subject_global", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_event_idx": { - "name": "governance_audit_event_idx", - "columns": [ - { - "expression": "event", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_updated_at_idx": { - "name": "governance_audit_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_created_at_idx": { - "name": "governance_audit_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.governance_audit_rels": { - "name": "governance_audit_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "governance_audit_rels_order_idx": { - "name": "governance_audit_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_parent_idx": { - "name": "governance_audit_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_path_idx": { - "name": "governance_audit_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_brand_voices_id_idx": { - "name": "governance_audit_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_evidence_sources_id_idx": { - "name": "governance_audit_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "governance_audit_rels_icps_id_idx": { - "name": "governance_audit_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "governance_audit_rels_parent_fk": { - "name": "governance_audit_rels_parent_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_brand_voices_fk": { - "name": "governance_audit_rels_brand_voices_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_evidence_sources_fk": { - "name": "governance_audit_rels_evidence_sources_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "governance_audit_rels_icps_fk": { - "name": "governance_audit_rels_icps_fk", - "tableFrom": "governance_audit_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_sources": { - "name": "evidence_sources", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "quality_class": { - "name": "quality_class", - "type": "enum_evidence_sources_quality_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active": { - "name": "active", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_sources_domain_idx": { - "name": "evidence_sources_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_updated_at_idx": { - "name": "evidence_sources_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_sources_created_at_idx": { - "name": "evidence_sources_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_source_candidates": { - "name": "evidence_source_candidates", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_source_candidates_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "suggested_class": { - "name": "suggested_class", - "type": "enum_evidence_source_candidates_suggested_class", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "citation_count": { - "name": "citation_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "serp_count": { - "name": "serp_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "last_seen_at": { - "name": "last_seen_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sightings": { - "name": "sightings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "resolved_source_id": { - "name": "resolved_source_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "evidence_source_candidates_domain_idx": { - "name": "evidence_source_candidates_domain_idx", - "columns": [ - { - "expression": "domain", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_status_idx": { - "name": "evidence_source_candidates_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_last_seen_at_idx": { - "name": "evidence_source_candidates_last_seen_at_idx", - "columns": [ - { - "expression": "last_seen_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_resolved_source_idx": { - "name": "evidence_source_candidates_resolved_source_idx", - "columns": [ - { - "expression": "resolved_source_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_updated_at_idx": { - "name": "evidence_source_candidates_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_source_candidates_created_at_idx": { - "name": "evidence_source_candidates_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk": { - "name": "evidence_source_candidates_resolved_source_id_evidence_sources_id_fk", - "tableFrom": "evidence_source_candidates", - "tableTo": "evidence_sources", - "columnsFrom": [ - "resolved_source_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_pages": { - "name": "corpus_snapshots_pages", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "position": { - "name": "position", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "domain_rating": { - "name": "domain_rating", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "fetch_status": { - "name": "fetch_status", - "type": "enum_corpus_snapshots_pages_fetch_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "failure_reason": { - "name": "failure_reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "chars": { - "name": "chars", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "text_hash": { - "name": "text_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "text": { - "name": "text", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "unverified_excerpt_count": { - "name": "unverified_excerpt_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_pages_order_idx": { - "name": "corpus_snapshots_pages_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pages_parent_id_idx": { - "name": "corpus_snapshots_pages_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_pages_parent_id_fk": { - "name": "corpus_snapshots_pages_parent_id_fk", - "tableFrom": "corpus_snapshots_pages", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots_internal_corpus": { - "name": "corpus_snapshots_internal_corpus", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "article_updated_at": { - "name": "article_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "claim_count": { - "name": "claim_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "corpus_snapshots_internal_corpus_order_idx": { - "name": "corpus_snapshots_internal_corpus_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_parent_id_idx": { - "name": "corpus_snapshots_internal_corpus_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_internal_corpus_article_idx": { - "name": "corpus_snapshots_internal_corpus_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "corpus_snapshots_internal_corpus_article_id_articles_id_fk": { - "name": "corpus_snapshots_internal_corpus_article_id_articles_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "corpus_snapshots_internal_corpus_parent_id_fk": { - "name": "corpus_snapshots_internal_corpus_parent_id_fk", - "tableFrom": "corpus_snapshots_internal_corpus", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.corpus_snapshots": { - "name": "corpus_snapshots", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "keyword_key": { - "name": "keyword_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "captured_at": { - "name": "captured_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_corpus_snapshots_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "snapshot_hash": { - "name": "snapshot_hash", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "query_cluster": { - "name": "query_cluster", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_claims": { - "name": "baseline_claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "facets": { - "name": "facets", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "gaps": { - "name": "gaps", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_doc_count": { - "name": "baseline_doc_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "failed_page_count": { - "name": "failed_page_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "corpus_snapshots_keyword_idx": { - "name": "corpus_snapshots_keyword_idx", - "columns": [ - { - "expression": "keyword", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_keyword_key_idx": { - "name": "corpus_snapshots_keyword_key_idx", - "columns": [ - { - "expression": "keyword_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_pipeline_run_id_idx": { - "name": "corpus_snapshots_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_updated_at_idx": { - "name": "corpus_snapshots_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "corpus_snapshots_created_at_idx": { - "name": "corpus_snapshots_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topic_searches": { - "name": "topic_searches", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "relevance": { - "name": "relevance", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "relevance_fingerprint": { - "name": "relevance_fingerprint", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "relevance_model": { - "name": "relevance_model", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "seed": { - "name": "seed", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "seed_key": { - "name": "seed_key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country": { - "name": "country", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "fetched_at": { - "name": "fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "result_count": { - "name": "result_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "candidates": { - "name": "candidates", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "topic_searches_seed_key_idx": { - "name": "topic_searches_seed_key_idx", - "columns": [ - { - "expression": "seed_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_fetched_at_idx": { - "name": "topic_searches_fetched_at_idx", - "columns": [ - { - "expression": "fetched_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_updated_at_idx": { - "name": "topic_searches_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topic_searches_created_at_idx": { - "name": "topic_searches_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_runs": { - "name": "information_gain_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "article_id": { - "name": "article_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "pipeline_run_id": { - "name": "pipeline_run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "snapshot_id": { - "name": "snapshot_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "policy_version": { - "name": "policy_version", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "policy": { - "name": "policy", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "models": { - "name": "models", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "decision": { - "name": "decision", - "type": "enum_information_gain_runs_decision", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "reasons": { - "name": "reasons", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "baseline_available": { - "name": "baseline_available", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "calibrated": { - "name": "calibrated", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "scores_consensus_coverage": { - "name": "scores_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_potential_gain_units": { - "name": "scores_potential_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_units": { - "name": "scores_verified_gain_units", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verification_ratio": { - "name": "scores_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_verified_gain_density": { - "name": "scores_verified_gain_density", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_facet_gain_coverage": { - "name": "scores_facet_gain_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "scores_internal_duplication_rate": { - "name": "scores_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_total_claims": { - "name": "claim_summary_total_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_materially_novel_claims": { - "name": "claim_summary_materially_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_verified_novel_claims": { - "name": "claim_summary_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_unsupported_novel_claims": { - "name": "claim_summary_unsupported_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_contradictory_claims": { - "name": "claim_summary_contradictory_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_summary_first_party_claims": { - "name": "claim_summary_first_party_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "claim_ids_blocked": { - "name": "claim_ids_blocked", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_review": { - "name": "claim_ids_review", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_materially_novel": { - "name": "claim_ids_materially_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claim_ids_verified_novel": { - "name": "claim_ids_verified_novel", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "claims": { - "name": "claims", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "token_count": { - "name": "token_count", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "cost_usd": { - "name": "cost_usd", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "draft_updated_at": { - "name": "draft_updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "information_gain_runs_article_idx": { - "name": "information_gain_runs_article_idx", - "columns": [ - { - "expression": "article_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_pipeline_run_id_idx": { - "name": "information_gain_runs_pipeline_run_id_idx", - "columns": [ - { - "expression": "pipeline_run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_snapshot_idx": { - "name": "information_gain_runs_snapshot_idx", - "columns": [ - { - "expression": "snapshot_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_decision_idx": { - "name": "information_gain_runs_decision_idx", - "columns": [ - { - "expression": "decision", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_updated_at_idx": { - "name": "information_gain_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "information_gain_runs_created_at_idx": { - "name": "information_gain_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "information_gain_runs_article_id_articles_id_fk": { - "name": "information_gain_runs_article_id_articles_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "articles", - "columnsFrom": [ - "article_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - }, - "information_gain_runs_snapshot_id_corpus_snapshots_id_fk": { - "name": "information_gain_runs_snapshot_id_corpus_snapshots_id_fk", - "tableFrom": "information_gain_runs", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "snapshot_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs": { - "name": "pipeline_runs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "run_id": { - "name": "run_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "enum_pipeline_runs_source", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_pipeline_runs_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "mode": { - "name": "mode", - "type": "enum_pipeline_runs_mode", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "template_id": { - "name": "template_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "requested_count": { - "name": "requested_count", - "type": "numeric", - "primaryKey": false, - "notNull": true - }, - "config_fingerprint": { - "name": "config_fingerprint", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "config_snapshot": { - "name": "config_snapshot", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "final_statuses": { - "name": "final_statuses", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "warnings": { - "name": "warnings", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "error_summary": { - "name": "error_summary", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "requested_by": { - "name": "requested_by", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "started_at": { - "name": "started_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "pipeline_runs_run_id_idx": { - "name": "pipeline_runs_run_id_idx", - "columns": [ - { - "expression": "run_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_status_idx": { - "name": "pipeline_runs_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_template_idx": { - "name": "pipeline_runs_template_idx", - "columns": [ - { - "expression": "template_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_config_fingerprint_idx": { - "name": "pipeline_runs_config_fingerprint_idx", - "columns": [ - { - "expression": "config_fingerprint", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_updated_at_idx": { - "name": "pipeline_runs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_created_at_idx": { - "name": "pipeline_runs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_template_id_templates_id_fk": { - "name": "pipeline_runs_template_id_templates_id_fk", - "tableFrom": "pipeline_runs", - "tableTo": "templates", - "columnsFrom": [ - "template_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pipeline_runs_rels": { - "name": "pipeline_runs_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "pipeline_runs_rels_order_idx": { - "name": "pipeline_runs_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_parent_idx": { - "name": "pipeline_runs_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_path_idx": { - "name": "pipeline_runs_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "pipeline_runs_rels_articles_id_idx": { - "name": "pipeline_runs_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "pipeline_runs_rels_parent_fk": { - "name": "pipeline_runs_rels_parent_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "pipeline_runs_rels_articles_fk": { - "name": "pipeline_runs_rels_articles_fk", - "tableFrom": "pipeline_runs_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_kv": { - "name": "payload_kv", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "data": { - "name": "data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "payload_kv_key_idx": { - "name": "payload_kv_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_log": { - "name": "payload_jobs_log", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "executed_at": { - "name": "executed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_log_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "task_i_d": { - "name": "task_i_d", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "output": { - "name": "output", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "state": { - "name": "state", - "type": "enum_payload_jobs_log_state", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_jobs_log_order_idx": { - "name": "payload_jobs_log_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_log_parent_id_idx": { - "name": "payload_jobs_log_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_jobs_log_parent_id_fk": { - "name": "payload_jobs_log_parent_id_fk", - "tableFrom": "payload_jobs_log", - "tableTo": "payload_jobs", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs": { - "name": "payload_jobs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "input": { - "name": "input", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "total_tried": { - "name": "total_tried", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "has_error": { - "name": "has_error", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "error": { - "name": "error", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "task_slug": { - "name": "task_slug", - "type": "enum_payload_jobs_task_slug", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "queue": { - "name": "queue", - "type": "varchar", - "primaryKey": false, - "notNull": false, - "default": "'default'" - }, - "wait_until": { - "name": "wait_until", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "processing": { - "name": "processing", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "concurrency_key": { - "name": "concurrency_key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "meta": { - "name": "meta", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_jobs_completed_at_idx": { - "name": "payload_jobs_completed_at_idx", - "columns": [ - { - "expression": "completed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_total_tried_idx": { - "name": "payload_jobs_total_tried_idx", - "columns": [ - { - "expression": "total_tried", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_has_error_idx": { - "name": "payload_jobs_has_error_idx", - "columns": [ - { - "expression": "has_error", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_task_slug_idx": { - "name": "payload_jobs_task_slug_idx", - "columns": [ - { - "expression": "task_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_queue_idx": { - "name": "payload_jobs_queue_idx", - "columns": [ - { - "expression": "queue", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_wait_until_idx": { - "name": "payload_jobs_wait_until_idx", - "columns": [ - { - "expression": "wait_until", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_processing_idx": { - "name": "payload_jobs_processing_idx", - "columns": [ - { - "expression": "processing", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_concurrency_key_idx": { - "name": "payload_jobs_concurrency_key_idx", - "columns": [ - { - "expression": "concurrency_key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_updated_at_idx": { - "name": "payload_jobs_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_jobs_created_at_idx": { - "name": "payload_jobs_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents": { - "name": "payload_locked_documents", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "global_slug": { - "name": "global_slug", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_locked_documents_global_slug_idx": { - "name": "payload_locked_documents_global_slug_idx", - "columns": [ - { - "expression": "global_slug", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_updated_at_idx": { - "name": "payload_locked_documents_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_created_at_idx": { - "name": "payload_locked_documents_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_locked_documents_rels": { - "name": "payload_locked_documents_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "setup_suggestions_id": { - "name": "setup_suggestions_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "media_id": { - "name": "media_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "templates_id": { - "name": "templates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "articles_id": { - "name": "articles_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "cost_log_id": { - "name": "cost_log_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "article_audit_id": { - "name": "article_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voices_id": { - "name": "brand_voices_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "brand_voice_files_id": { - "name": "brand_voice_files_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "icps_id": { - "name": "icps_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "governance_audit_id": { - "name": "governance_audit_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_sources_id": { - "name": "evidence_sources_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "evidence_source_candidates_id": { - "name": "evidence_source_candidates_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "corpus_snapshots_id": { - "name": "corpus_snapshots_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "topic_searches_id": { - "name": "topic_searches_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "information_gain_runs_id": { - "name": "information_gain_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "pipeline_runs_id": { - "name": "pipeline_runs_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_locked_documents_rels_order_idx": { - "name": "payload_locked_documents_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_parent_idx": { - "name": "payload_locked_documents_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_path_idx": { - "name": "payload_locked_documents_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_setup_suggestions_id_idx": { - "name": "payload_locked_documents_rels_setup_suggestions_id_idx", - "columns": [ - { - "expression": "setup_suggestions_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_users_id_idx": { - "name": "payload_locked_documents_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_media_id_idx": { - "name": "payload_locked_documents_rels_media_id_idx", - "columns": [ - { - "expression": "media_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_templates_id_idx": { - "name": "payload_locked_documents_rels_templates_id_idx", - "columns": [ - { - "expression": "templates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_articles_id_idx": { - "name": "payload_locked_documents_rels_articles_id_idx", - "columns": [ - { - "expression": "articles_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_cost_log_id_idx": { - "name": "payload_locked_documents_rels_cost_log_id_idx", - "columns": [ - { - "expression": "cost_log_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_article_audit_id_idx": { - "name": "payload_locked_documents_rels_article_audit_id_idx", - "columns": [ - { - "expression": "article_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voices_id_idx": { - "name": "payload_locked_documents_rels_brand_voices_id_idx", - "columns": [ - { - "expression": "brand_voices_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_brand_voice_files_id_idx": { - "name": "payload_locked_documents_rels_brand_voice_files_id_idx", - "columns": [ - { - "expression": "brand_voice_files_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_icps_id_idx": { - "name": "payload_locked_documents_rels_icps_id_idx", - "columns": [ - { - "expression": "icps_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_governance_audit_id_idx": { - "name": "payload_locked_documents_rels_governance_audit_id_idx", - "columns": [ - { - "expression": "governance_audit_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_sources_id_idx": { - "name": "payload_locked_documents_rels_evidence_sources_id_idx", - "columns": [ - { - "expression": "evidence_sources_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_evidence_source_candidates_idx": { - "name": "payload_locked_documents_rels_evidence_source_candidates_idx", - "columns": [ - { - "expression": "evidence_source_candidates_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_corpus_snapshots_id_idx": { - "name": "payload_locked_documents_rels_corpus_snapshots_id_idx", - "columns": [ - { - "expression": "corpus_snapshots_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_topic_searches_id_idx": { - "name": "payload_locked_documents_rels_topic_searches_id_idx", - "columns": [ - { - "expression": "topic_searches_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_information_gain_runs_id_idx": { - "name": "payload_locked_documents_rels_information_gain_runs_id_idx", - "columns": [ - { - "expression": "information_gain_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_locked_documents_rels_pipeline_runs_id_idx": { - "name": "payload_locked_documents_rels_pipeline_runs_id_idx", - "columns": [ - { - "expression": "pipeline_runs_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_locked_documents_rels_parent_fk": { - "name": "payload_locked_documents_rels_parent_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "payload_locked_documents", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_setup_suggestions_fk": { - "name": "payload_locked_documents_rels_setup_suggestions_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "setup_suggestions", - "columnsFrom": [ - "setup_suggestions_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_users_fk": { - "name": "payload_locked_documents_rels_users_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_media_fk": { - "name": "payload_locked_documents_rels_media_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "media", - "columnsFrom": [ - "media_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_templates_fk": { - "name": "payload_locked_documents_rels_templates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "templates", - "columnsFrom": [ - "templates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_articles_fk": { - "name": "payload_locked_documents_rels_articles_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "articles", - "columnsFrom": [ - "articles_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_cost_log_fk": { - "name": "payload_locked_documents_rels_cost_log_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "cost_log", - "columnsFrom": [ - "cost_log_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_article_audit_fk": { - "name": "payload_locked_documents_rels_article_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "article_audit", - "columnsFrom": [ - "article_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voices_fk": { - "name": "payload_locked_documents_rels_brand_voices_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voices", - "columnsFrom": [ - "brand_voices_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_brand_voice_files_fk": { - "name": "payload_locked_documents_rels_brand_voice_files_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "brand_voice_files", - "columnsFrom": [ - "brand_voice_files_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_icps_fk": { - "name": "payload_locked_documents_rels_icps_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "icps", - "columnsFrom": [ - "icps_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_governance_audit_fk": { - "name": "payload_locked_documents_rels_governance_audit_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "governance_audit", - "columnsFrom": [ - "governance_audit_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_sources_fk": { - "name": "payload_locked_documents_rels_evidence_sources_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_sources", - "columnsFrom": [ - "evidence_sources_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_evidence_source_candidates_fk": { - "name": "payload_locked_documents_rels_evidence_source_candidates_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "evidence_source_candidates", - "columnsFrom": [ - "evidence_source_candidates_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_corpus_snapshots_fk": { - "name": "payload_locked_documents_rels_corpus_snapshots_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "corpus_snapshots", - "columnsFrom": [ - "corpus_snapshots_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_topic_searches_fk": { - "name": "payload_locked_documents_rels_topic_searches_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "topic_searches", - "columnsFrom": [ - "topic_searches_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_information_gain_runs_fk": { - "name": "payload_locked_documents_rels_information_gain_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "information_gain_runs", - "columnsFrom": [ - "information_gain_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_locked_documents_rels_pipeline_runs_fk": { - "name": "payload_locked_documents_rels_pipeline_runs_fk", - "tableFrom": "payload_locked_documents_rels", - "tableTo": "pipeline_runs", - "columnsFrom": [ - "pipeline_runs_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences": { - "name": "payload_preferences", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "value": { - "name": "value", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_preferences_key_idx": { - "name": "payload_preferences_key_idx", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_updated_at_idx": { - "name": "payload_preferences_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_created_at_idx": { - "name": "payload_preferences_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_preferences_rels": { - "name": "payload_preferences_rels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "path": { - "name": "path", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "users_id": { - "name": "users_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "payload_preferences_rels_order_idx": { - "name": "payload_preferences_rels_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_parent_idx": { - "name": "payload_preferences_rels_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_path_idx": { - "name": "payload_preferences_rels_path_idx", - "columns": [ - { - "expression": "path", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_preferences_rels_users_id_idx": { - "name": "payload_preferences_rels_users_id_idx", - "columns": [ - { - "expression": "users_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "payload_preferences_rels_parent_fk": { - "name": "payload_preferences_rels_parent_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "payload_preferences", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "payload_preferences_rels_users_fk": { - "name": "payload_preferences_rels_users_fk", - "tableFrom": "payload_preferences_rels", - "tableTo": "users", - "columnsFrom": [ - "users_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_migrations": { - "name": "payload_migrations", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "batch": { - "name": "batch", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "payload_migrations_updated_at_idx": { - "name": "payload_migrations_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "payload_migrations_created_at_idx": { - "name": "payload_migrations_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.setup_suggestion_scan": { - "name": "setup_suggestion_scan", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "audit_cursor": { - "name": "audit_cursor", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "audit_cursor_id": { - "name": "audit_cursor_id", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile_competitors": { - "name": "workspace_profile_competitors", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "workspace_profile_competitors_order_idx": { - "name": "workspace_profile_competitors_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "workspace_profile_competitors_parent_id_idx": { - "name": "workspace_profile_competitors_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "workspace_profile_competitors_parent_id_fk": { - "name": "workspace_profile_competitors_parent_id_fk", - "tableFrom": "workspace_profile_competitors", - "tableTo": "workspace_profile", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.workspace_profile": { - "name": "workspace_profile", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "company_name": { - "name": "company_name", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "target_domain": { - "name": "target_domain", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_notes": { - "name": "site_notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "site_pages": { - "name": "site_pages", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "site_pages_fetched_at": { - "name": "site_pages_fetched_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_core_claims": { - "name": "positioning_core_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "evidence_ref": { - "name": "evidence_ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_core_claims_order_idx": { - "name": "positioning_core_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_core_claims_parent_id_idx": { - "name": "positioning_core_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_core_claims_parent_id_fk": { - "name": "positioning_core_claims_parent_id_fk", - "tableFrom": "positioning_core_claims", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_pillars": { - "name": "positioning_pillars", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "one_line": { - "name": "one_line", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "carries": { - "name": "carries", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_pillars_order_idx": { - "name": "positioning_pillars_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_pillars_parent_id_idx": { - "name": "positioning_pillars_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_pillars_parent_id_fk": { - "name": "positioning_pillars_parent_id_fk", - "tableFrom": "positioning_pillars", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_descriptor_ladder": { - "name": "positioning_descriptor_ladder", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "descriptor": { - "name": "descriptor", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_descriptor_ladder_order_idx": { - "name": "positioning_descriptor_ladder_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_descriptor_ladder_parent_id_idx": { - "name": "positioning_descriptor_ladder_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_descriptor_ladder_parent_id_fk": { - "name": "positioning_descriptor_ladder_parent_id_fk", - "tableFrom": "positioning_descriptor_ladder", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_reach_for": { - "name": "positioning_vocabulary_reach_for", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_reach_for_order_idx": { - "name": "positioning_vocabulary_reach_for_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_reach_for_parent_id_idx": { - "name": "positioning_vocabulary_reach_for_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_reach_for_parent_id_fk": { - "name": "positioning_vocabulary_reach_for_parent_id_fk", - "tableFrom": "positioning_vocabulary_reach_for", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_vocabulary_avoid": { - "name": "positioning_vocabulary_avoid", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "term": { - "name": "term", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_vocabulary_avoid_order_idx": { - "name": "positioning_vocabulary_avoid_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_vocabulary_avoid_parent_id_idx": { - "name": "positioning_vocabulary_avoid_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_vocabulary_avoid_parent_id_fk": { - "name": "positioning_vocabulary_avoid_parent_id_fk", - "tableFrom": "positioning_vocabulary_avoid", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning_open_rulings": { - "name": "positioning_open_rulings", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "question": { - "name": "question", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_positioning_open_rulings_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'open'" - }, - "ruling": { - "name": "ruling", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "ruled_at": { - "name": "ruled_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "positioning_open_rulings_order_idx": { - "name": "positioning_open_rulings_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "positioning_open_rulings_parent_id_idx": { - "name": "positioning_open_rulings_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "positioning_open_rulings_parent_id_fk": { - "name": "positioning_open_rulings_parent_id_fk", - "tableFrom": "positioning_open_rulings", - "tableTo": "positioning", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.positioning": { - "name": "positioning", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "category": { - "name": "category", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "goal": { - "name": "goal", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "promise": { - "name": "promise", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "active_position": { - "name": "active_position", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "statement": { - "name": "statement", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "macro_frame": { - "name": "macro_frame", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "landscape": { - "name": "landscape", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "enemy": { - "name": "enemy", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "archetype": { - "name": "archetype", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "essence": { - "name": "essence", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims_cleared_surfaces": { - "name": "evidence_bank_verified_claims_cleared_surfaces", - "schema": "", - "columns": { - "order": { - "name": "order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "parent_id": { - "name": "parent_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "enum_evidence_bank_verified_claims_cleared_surfaces", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - } - }, - "indexes": { - "evidence_bank_verified_claims_cleared_surfaces_order_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_order_idx", - "columns": [ - { - "expression": "order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_cleared_surfaces_parent_idx": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_cleared_surfaces_parent_fk": { - "name": "evidence_bank_verified_claims_cleared_surfaces_parent_fk", - "tableFrom": "evidence_bank_verified_claims_cleared_surfaces", - "tableTo": "evidence_bank_verified_claims", - "columnsFrom": [ - "parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_verified_claims": { - "name": "evidence_bank_verified_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "primary_source": { - "name": "primary_source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_url": { - "name": "source_url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "source_date": { - "name": "source_date", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "sample_or_method": { - "name": "sample_or_method", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "verification_depth": { - "name": "verification_depth", - "type": "enum_evidence_bank_verified_claims_verification_depth", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "limits": { - "name": "limits", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "recheck_at": { - "name": "recheck_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_verified_claims_order_idx": { - "name": "evidence_bank_verified_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_verified_claims_parent_id_idx": { - "name": "evidence_bank_verified_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_verified_claims_parent_id_fk": { - "name": "evidence_bank_verified_claims_parent_id_fk", - "tableFrom": "evidence_bank_verified_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_facts": { - "name": "evidence_bank_facts", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "fact": { - "name": "fact", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "owner": { - "name": "owner", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "last_confirmed_at": { - "name": "last_confirmed_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_facts_order_idx": { - "name": "evidence_bank_facts_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_facts_parent_id_idx": { - "name": "evidence_bank_facts_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_facts_parent_id_fk": { - "name": "evidence_bank_facts_parent_id_fk", - "tableFrom": "evidence_bank_facts", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank_rejected_claims": { - "name": "evidence_bank_rejected_claims", - "schema": "", - "columns": { - "_order": { - "name": "_order", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "_parent_id": { - "name": "_parent_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "id": { - "name": "id", - "type": "varchar", - "primaryKey": true, - "notNull": true - }, - "ref": { - "name": "ref", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "claim": { - "name": "claim", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "enum_evidence_bank_rejected_claims_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'rejected'" - }, - "reason": { - "name": "reason", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "replacement": { - "name": "replacement", - "type": "varchar", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "evidence_bank_rejected_claims_order_idx": { - "name": "evidence_bank_rejected_claims_order_idx", - "columns": [ - { - "expression": "_order", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "evidence_bank_rejected_claims_parent_id_idx": { - "name": "evidence_bank_rejected_claims_parent_id_idx", - "columns": [ - { - "expression": "_parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "evidence_bank_rejected_claims_parent_id_fk": { - "name": "evidence_bank_rejected_claims_parent_id_fk", - "tableFrom": "evidence_bank_rejected_claims", - "tableTo": "evidence_bank", - "columnsFrom": [ - "_parent_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.evidence_bank": { - "name": "evidence_bank", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "ref_counter": { - "name": "ref_counter", - "type": "numeric", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "notes": { - "name": "notes", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.llm_settings": { - "name": "llm_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "generate_model": { - "name": "generate_model", - "type": "enum_llm_settings_generate_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "fact_check_model": { - "name": "fact_check_model", - "type": "enum_llm_settings_fact_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "qualitative_review_model": { - "name": "qualitative_review_model", - "type": "enum_llm_settings_qualitative_review_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "claim_extraction_model": { - "name": "claim_extraction_model", - "type": "enum_llm_settings_claim_extraction_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "information_gain_judge_model": { - "name": "information_gain_judge_model", - "type": "enum_llm_settings_information_gain_judge_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_verification_model": { - "name": "evidence_verification_model", - "type": "enum_llm_settings_evidence_verification_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "evidence_check_model": { - "name": "evidence_check_model", - "type": "enum_llm_settings_evidence_check_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "brief_angle_model": { - "name": "brief_angle_model", - "type": "enum_llm_settings_brief_angle_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "topic_relevance_model": { - "name": "topic_relevance_model", - "type": "enum_llm_settings_topic_relevance_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "brand_voice_extract_model": { - "name": "brand_voice_extract_model", - "type": "enum_llm_settings_brand_voice_extract_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "setup_assist_model": { - "name": "setup_assist_model", - "type": "enum_llm_settings_setup_assist_model", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.information_gain_policy": { - "name": "information_gain_policy", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "min_consensus_coverage": { - "name": "min_consensus_coverage", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verification_ratio": { - "name": "min_verification_ratio", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_novel_factual_integrity": { - "name": "min_novel_factual_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_numeric_temporal_integrity": { - "name": "min_numeric_temporal_integrity", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "require_exact_value_match": { - "name": "require_exact_value_match", - "type": "enum_information_gain_policy_require_exact_value_match", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "require_evidence_lineage": { - "name": "require_evidence_lineage", - "type": "enum_information_gain_policy_require_evidence_lineage", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "block_first_party_measurements": { - "name": "block_first_party_measurements", - "type": "enum_information_gain_policy_block_first_party_measurements", - "typeSchema": "public", - "primaryKey": false, - "notNull": false - }, - "max_contradiction_probability": { - "name": "max_contradiction_probability", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "material_novelty_threshold": { - "name": "material_novelty_threshold", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "max_internal_duplication_rate": { - "name": "max_internal_duplication_rate", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "min_verified_novel_claims": { - "name": "min_verified_novel_claims", - "type": "numeric", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.webhook_settings": { - "name": "webhook_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "url": { - "name": "url", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "secret": { - "name": "secret", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.payload_jobs_stats": { - "name": "payload_jobs_stats", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "stats": { - "name": "stats", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3) with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": { - "public.enum_setup_suggestions_kind": { - "name": "enum_setup_suggestions_kind", - "schema": "public", - "values": [ - "banned_word", - "not_trait", - "unbacked_claim", - "rejected_ref" - ] - }, - "public.enum_setup_suggestions_target": { - "name": "enum_setup_suggestions_target", - "schema": "public", - "values": [ - "brand-voice", - "evidence-bank" - ] - }, - "public.enum_setup_suggestions_status": { - "name": "enum_setup_suggestions_status", - "schema": "public", - "values": [ - "open", - "accepted", - "dismissed", - "obsolete" - ] - }, - "public.enum_templates_company_mentions": { - "name": "enum_templates_company_mentions", - "schema": "public", - "values": [ - "none", - "mention", - "feature" - ] - }, - "public.enum_articles_brief_sections_source": { - "name": "enum_articles_brief_sections_source", - "schema": "public", - "values": [ - "template", - "research", - "editor" - ] - }, - "public.enum_articles_status": { - "name": "enum_articles_status", - "schema": "public", - "values": [ - "topic_selected", - "brief_review", - "researched", - "drafted", - "qa_passed", - "verified", - "needs_review", - "blocked", - "needs_revision", - "approved", - "published" - ] - }, - "public.enum_articles_information_gain_decision": { - "name": "enum_articles_information_gain_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_cost_log_stage": { - "name": "enum_cost_log_stage", - "schema": "public", - "values": [ - "generate", - "factCheck", - "qualitativeReview", - "claimExtraction", - "informationGainJudge", - "evidenceVerification", - "evidenceCheck", - "briefAngle", - "brandVoiceExtract", - "setupAssist", - "topicRelevance" - ] - }, - "public.enum_article_audit_actor_type": { - "name": "enum_article_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_brand_voices_status": { - "name": "enum_brand_voices_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_brand_voices_source": { - "name": "enum_brand_voices_source", - "schema": "public", - "values": [ - "onboarding", - "upload" - ] - }, - "public.enum_brand_voices_audience_language_level": { - "name": "enum_brand_voices_audience_language_level", - "schema": "public", - "values": [ - "plain", - "general", - "professional", - "expert" - ] - }, - "public.enum_icps_pains_confidence": { - "name": "enum_icps_pains_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_competition_confidence": { - "name": "enum_icps_competition_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_channels_confidence": { - "name": "enum_icps_channels_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_status": { - "name": "enum_icps_status", - "schema": "public", - "values": [ - "draft", - "active", - "archived" - ] - }, - "public.enum_icps_motivation_confidence": { - "name": "enum_icps_motivation_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_solution_confidence": { - "name": "enum_icps_solution_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_icps_why_us_confidence": { - "name": "enum_icps_why_us_confidence", - "schema": "public", - "values": [ - "verified", - "strong_directional", - "qualitative_pattern", - "cultural_signal", - "inference", - "hypothesis" - ] - }, - "public.enum_governance_audit_actor_type": { - "name": "enum_governance_audit_actor_type", - "schema": "public", - "values": [ - "pipeline", - "user", - "system" - ] - }, - "public.enum_evidence_sources_quality_class": { - "name": "enum_evidence_sources_quality_class", - "schema": "public", - "values": [ - "first_party_dataset", - "primary", - "official_docs", - "secondary", - "unverified", - "blocked" - ] - }, - "public.enum_evidence_source_candidates_status": { - "name": "enum_evidence_source_candidates_status", - "schema": "public", - "values": [ - "pending", - "approved", - "dismissed" - ] - }, - "public.enum_evidence_source_candidates_suggested_class": { - "name": "enum_evidence_source_candidates_suggested_class", - "schema": "public", - "values": [ - "primary", - "official_docs", - "secondary", - "unverified" - ] - }, - "public.enum_corpus_snapshots_pages_fetch_status": { - "name": "enum_corpus_snapshots_pages_fetch_status", - "schema": "public", - "values": [ - "ok", - "failed", - "skipped" - ] - }, - "public.enum_corpus_snapshots_status": { - "name": "enum_corpus_snapshots_status", - "schema": "public", - "values": [ - "complete", - "partial", - "empty" - ] - }, - "public.enum_information_gain_runs_decision": { - "name": "enum_information_gain_runs_decision", - "schema": "public", - "values": [ - "PASS", - "REVISE", - "HUMAN_REVIEW", - "BLOCK" - ] - }, - "public.enum_pipeline_runs_source": { - "name": "enum_pipeline_runs_source", - "schema": "public", - "values": [ - "admin", - "cli", - "selected" - ] - }, - "public.enum_pipeline_runs_status": { - "name": "enum_pipeline_runs_status", - "schema": "public", - "values": [ - "queued", - "running", - "succeeded", - "failed" - ] - }, - "public.enum_pipeline_runs_mode": { - "name": "enum_pipeline_runs_mode", - "schema": "public", - "values": [ - "mock", - "live" - ] - }, - "public.enum_payload_jobs_log_task_slug": { - "name": "enum_payload_jobs_log_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due", - "collect-setup-suggestions" - ] - }, - "public.enum_payload_jobs_log_state": { - "name": "enum_payload_jobs_log_state", - "schema": "public", - "values": [ - "failed", - "succeeded" - ] - }, - "public.enum_payload_jobs_task_slug": { - "name": "enum_payload_jobs_task_slug", - "schema": "public", - "values": [ - "inline", - "content-run", - "webhook-deliver", - "publish-due", - "collect-setup-suggestions" - ] - }, - "public.enum_positioning_open_rulings_status": { - "name": "enum_positioning_open_rulings_status", - "schema": "public", - "values": [ - "open", - "ruled" - ] - }, - "public.enum_evidence_bank_verified_claims_cleared_surfaces": { - "name": "enum_evidence_bank_verified_claims_cleared_surfaces", - "schema": "public", - "values": [ - "web", - "blog", - "ads", - "sales", - "social", - "pr" - ] - }, - "public.enum_evidence_bank_verified_claims_verification_depth": { - "name": "enum_evidence_bank_verified_claims_verification_depth", - "schema": "public", - "values": [ - "primary_document", - "reproduced", - "third_party_audit", - "self_reported" - ] - }, - "public.enum_evidence_bank_rejected_claims_status": { - "name": "enum_evidence_bank_rejected_claims_status", - "schema": "public", - "values": [ - "rejected", - "expired" - ] - }, - "public.enum_llm_settings_generate_model": { - "name": "enum_llm_settings_generate_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_fact_check_model": { - "name": "enum_llm_settings_fact_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_qualitative_review_model": { - "name": "enum_llm_settings_qualitative_review_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_claim_extraction_model": { - "name": "enum_llm_settings_claim_extraction_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_information_gain_judge_model": { - "name": "enum_llm_settings_information_gain_judge_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_verification_model": { - "name": "enum_llm_settings_evidence_verification_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_evidence_check_model": { - "name": "enum_llm_settings_evidence_check_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_brief_angle_model": { - "name": "enum_llm_settings_brief_angle_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_topic_relevance_model": { - "name": "enum_llm_settings_topic_relevance_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_brand_voice_extract_model": { - "name": "enum_llm_settings_brand_voice_extract_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_llm_settings_setup_assist_model": { - "name": "enum_llm_settings_setup_assist_model", - "schema": "public", - "values": [ - "claude-fable-5", - "claude-opus-5", - "claude-sonnet-5", - "claude-haiku-4-5", - "gpt-5.6-sol", - "gpt-5.6-terra", - "gpt-5.6-luna", - "gpt-5.5", - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano" - ] - }, - "public.enum_information_gain_policy_require_exact_value_match": { - "name": "enum_information_gain_policy_require_exact_value_match", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_require_evidence_lineage": { - "name": "enum_information_gain_policy_require_evidence_lineage", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - }, - "public.enum_information_gain_policy_block_first_party_measurements": { - "name": "enum_information_gain_policy_block_first_party_measurements", - "schema": "public", - "values": [ - "enabled", - "disabled" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "cbde4c04-72a1-4a84-afad-5cdd92d81310", - "prevId": "00000000-0000-0000-0000-000000000000" -} \ No newline at end of file diff --git a/cms/src/payload-types.ts b/cms/src/payload-types.ts index 70072cca..7b212429 100644 --- a/cms/src/payload-types.ts +++ b/cms/src/payload-types.ts @@ -3003,7 +3003,7 @@ export interface LlmSetting { ) | null; /** - * Drafts and refines onboarding steps (audiences, positioning, evidence bank) from your notes and site. Leave blank to use SETUP_ASSIST_MODEL from the environment, or the platform default (Claude Opus 5). + * Drafts and refines onboarding steps (audiences, positioning, evidence bank) from your notes and site. Leave blank to use SETUP_ASSIST_MODEL from the environment, or the brand voice extraction model above. */ setupAssistModel?: | ( diff --git a/cms/src/payload.config.ts b/cms/src/payload.config.ts index 7c55f07c..2fea3f10 100644 --- a/cms/src/payload.config.ts +++ b/cms/src/payload.config.ts @@ -223,9 +223,11 @@ export default buildConfig({ // DROP + ADD of the same constraint. One process survives that; two vitest // workers booting together do not (the second DROP finds nothing). Turning // push off in tests also removes the interactive "create enum?" prompt that - // used to hang the suite after a schema change. Playwright has the same - // problem doubled: parallel e2e workers each boot Payload for seeding, so - // the test:e2e script sets DISABLE_DEV_PUSH to keep them out of the race. + // used to hang the suite after a schema change. Playwright runs on a + // migration-built database too, and both its dev server and the test + // process boot Payload, so the test:e2e script sets DISABLE_DEV_PUSH. The + // `jobs:run` script sets it as well: a production worker started without + // NODE_ENV=production would otherwise push the dev schema on every run. push: process.env.VITEST !== 'true' && process.env.DISABLE_DEV_PUSH !== 'true', }), sharp, diff --git a/cms/src/seed.ts b/cms/src/seed.ts index d50804bc..0a6fb53d 100644 --- a/cms/src/seed.ts +++ b/cms/src/seed.ts @@ -346,19 +346,39 @@ const upsertEvidenceSources = async (payload: Payload): Promise => { const upsertAdminUser = async (payload: Payload): Promise => { const email = 'admin@datum.local' - const password = process.env.SEED_ADMIN_PASSWORD || 'datum-dev-password' + // Seeding is also how templates are installed and updated, so it is re-run on + // instances that are in use. An existing admin keeps their password unless + // SEED_ADMIN_PASSWORD asks for a specific one, and the documented default is + // never given to a production instance. + const requested = process.env.SEED_ADMIN_PASSWORD || undefined const existing = await payload.find({ collection: 'users', where: { email: { equals: email } }, limit: 1, }) if (existing.docs.length > 0) { - await payload.update({ collection: 'users', id: existing.docs[0].id, data: { password } }) - payload.logger.info(`Updated user ${email}`) - } else { - await payload.create({ collection: 'users', data: { email, password } }) - payload.logger.info(`Created user ${email}`) + if (!requested) { + payload.logger.info(`User ${email} exists; password left unchanged`) + return + } + await payload.update({ + collection: 'users', + id: existing.docs[0].id, + data: { password: requested }, + }) + payload.logger.info(`Set the password for ${email} from SEED_ADMIN_PASSWORD`) + return } + if (!requested && process.env.NODE_ENV === 'production') { + throw new Error( + `Set SEED_ADMIN_PASSWORD to create ${email}: the default password is public and is not used in production.`, + ) + } + await payload.create({ + collection: 'users', + data: { email, password: requested ?? 'datum-dev-password' }, + }) + payload.logger.info(`Created user ${email}`) } /** diff --git a/cms/tests/e2e/dirtyGuard.e2e.spec.ts b/cms/tests/e2e/dirtyGuard.e2e.spec.ts index 6305873a..5d2143ec 100644 --- a/cms/tests/e2e/dirtyGuard.e2e.spec.ts +++ b/cms/tests/e2e/dirtyGuard.e2e.spec.ts @@ -3,7 +3,6 @@ import { expect, test, type Page } from '@playwright/test' import { evidenceBankFixtureDoc } from '../../src/lib/tenant/fixtures' import { cleanupOpsUser, opsPayload, opsTestUser, seedOpsUser } from '../helpers/seedContentOps' -const serverURL = process.env.TEST_BASE_URL || 'http://127.0.0.1:3101' /** * F5: the unsaved-change guard on the editors that were silently losing edits. @@ -20,7 +19,7 @@ test.describe('Unsaved-change guard', () => { }) test.beforeEach(async ({ page }) => { - await page.goto(`${serverURL}/admin/login`) + await page.goto('/admin/login') await page.fill('#field-email', opsTestUser.email) await page.fill('#field-password', opsTestUser.password) await page.click('button[type="submit"]') @@ -36,7 +35,7 @@ test.describe('Unsaved-change guard', () => { const nav = (page: Page) => page.locator('a[href="/admin/ops/content"]').first() async function openTemplates(page: Page) { - await page.goto(`${serverURL}/admin/ops/templates`) + await page.goto('/admin/ops/templates') await expect(outline(page)).toBeVisible() // Hydrated: the Save button is a real button and starts disabled. await expect(page.getByRole('button', { name: 'Save', exact: true })).toBeDisabled() @@ -107,7 +106,7 @@ test.describe('Unsaved-change guard', () => { await page.getByRole('alertdialog').getByRole('button', { name: 'Leave', exact: true }).click() await expect(page).toHaveURL(/\/admin\/ops\/content/) - await page.goto(`${serverURL}/admin/ops/templates`) + await page.goto('/admin/ops/templates') await expect(page.getByText(/Restored the edit you hadn't saved, from \d+ minutes? ago/)).toBeVisible() await expect(outline(page)).toHaveValue(`${before} left behind`) await page.getByRole('button', { name: 'Discard' }).first().click() @@ -127,7 +126,7 @@ test.describe('Unsaved-change guard', () => { .click() await expect(page).toHaveURL(/\/admin\/ops\/content/) - await page.goto(`${serverURL}/admin/ops/templates`) + await page.goto('/admin/ops/templates') await expect(outline(page)).toHaveValue(`${before} saved on the way out`) // Saved for real, so there is nothing to restore. await expect(page.getByText(/Restored the edit/)).toHaveCount(0) @@ -189,7 +188,7 @@ test.describe('Unsaved-change guard', () => { }) async function evidenceRestore(page: Page) { - await page.goto(`${serverURL}/admin/ops/setup/evidence`) + await page.goto('/admin/ops/setup/evidence') const claim = page.locator('#eb-claims-0-claim') await expect(claim).toBeVisible() // Hydrated before typing: on a cold dev server, text typed into the @@ -218,7 +217,7 @@ test.describe('Unsaved-change guard', () => { test('workspace: saving with an invalid competitor says what was kept and what was removed', async ({ page, }) => { - await page.goto(`${serverURL}/admin/ops/setup/workspace`) + await page.goto('/admin/ops/setup/workspace') await expect(page.getByRole('heading', { name: 'Workspace', level: 1 })).toBeVisible() const original = await page.locator('#ws-companyName').inputValue() try { diff --git a/cms/tests/e2e/keyboard.e2e.spec.ts b/cms/tests/e2e/keyboard.e2e.spec.ts index 4ab016cf..7e19aad9 100644 --- a/cms/tests/e2e/keyboard.e2e.spec.ts +++ b/cms/tests/e2e/keyboard.e2e.spec.ts @@ -2,7 +2,6 @@ import { test, expect, type Locator } from '@playwright/test' import { cleanupOpsUser, opsPayload, opsTestUser, seedOpsUser } from '../helpers/seedContentOps' -const serverURL = process.env.TEST_BASE_URL || 'http://127.0.0.1:3101' test.describe('Keyboard access: skip link and focus ring', () => { test.beforeAll(async () => { @@ -14,7 +13,7 @@ test.describe('Keyboard access: skip link and focus ring', () => { }) test.beforeEach(async ({ page }) => { - await page.goto(`${serverURL}/admin/login`) + await page.goto('/admin/login') await page.fill('#field-email', opsTestUser.email) await page.fill('#field-password', opsTestUser.password) await page.click('button[type="submit"]') @@ -22,7 +21,7 @@ test.describe('Keyboard access: skip link and focus ring', () => { }) test('first Tab lands on "Skip to content", which moves focus to #ops-main', async ({ page }) => { - await page.goto(`${serverURL}/admin/ops/content`) + await page.goto('/admin/ops/content') await expect(page.locator('#ops-main')).toBeVisible() // The link mounts after hydration; wait for it before pressing Tab. const skip = page.getByRole('link', { name: 'Skip to content' }) @@ -44,14 +43,14 @@ test.describe('Keyboard access: skip link and focus ring', () => { }) test('skip link is off screen until focused', async ({ page }) => { - await page.goto(`${serverURL}/admin/ops/content`) + await page.goto('/admin/ops/content') const skip = page.getByRole('link', { name: 'Skip to content' }) await expect(skip).toBeAttached() await expect(skip).not.toBeInViewport() }) test('skip link falls back to the template content on non-ops pages', async ({ page }) => { - await page.goto(`${serverURL}/admin/collections/templates`) + await page.goto('/admin/collections/templates') const skip = page.getByRole('link', { name: 'Skip to content' }) await expect(skip).toBeAttached() await page.keyboard.press('Tab') @@ -66,7 +65,7 @@ test.describe('Keyboard access: skip link and focus ring', () => { }) test('a keyboard-focused ops link and button show the focus ring', async ({ page }) => { - await page.goto(`${serverURL}/admin/ops/content`) + await page.goto('/admin/ops/content') await expect(page.locator('#ops-main')).toBeVisible() await expectRingOnKeyboardFocus(page.locator('#ops-main a').first()) @@ -77,7 +76,7 @@ test.describe('Keyboard access: skip link and focus ring', () => { test('a selected template card keeps the focus ring over its selected shadow', async ({ page, }) => { - await page.goto(`${serverURL}/admin/ops/new`) + await page.goto('/admin/ops/new') // With more than one template nothing starts selected; pick the first. await page.locator('.datum-new__card[role="radio"]').first().click() const selected = page.locator('.datum-new__card.is-selected') @@ -86,7 +85,7 @@ test.describe('Keyboard access: skip link and focus ring', () => { }) test('the webhook secret field, outside any ops view, shows the focus ring', async ({ page }) => { - await page.goto(`${serverURL}/admin/globals/webhook-settings`) + await page.goto('/admin/globals/webhook-settings') const input = page.locator('.datum-secret-field__input') await expect(input).toBeVisible() await expectRingOnKeyboardFocus(input) diff --git a/cms/tests/helpers/login.ts b/cms/tests/helpers/login.ts index 27e8ec7a..1ab0716c 100644 --- a/cms/tests/helpers/login.ts +++ b/cms/tests/helpers/login.ts @@ -4,7 +4,6 @@ import { expect } from '@playwright/test' export interface LoginOptions { dashboardPath?: '/admin' | '/admin/ops/content' page: Page - serverURL?: string user: { email: string password: string @@ -13,20 +12,18 @@ export interface LoginOptions { /** * Logs the user into the admin panel via the login page. + * + * Paths are relative so Playwright resolves them against the configured + * `baseURL`, which is the one place that knows `TEST_BASE_URL` and `TEST_PORT`. */ -export async function login({ - dashboardPath = '/admin', - page, - serverURL = process.env.TEST_BASE_URL || 'http://127.0.0.1:3101', - user, -}: LoginOptions): Promise { - await page.goto(`${serverURL}/admin/login`) +export async function login({ dashboardPath = '/admin', page, user }: LoginOptions): Promise { + await page.goto('/admin/login') await page.fill('#field-email', user.email) await page.fill('#field-password', user.password) await page.click('button[type="submit"]') - await page.waitForURL(`${serverURL}${dashboardPath}`) + await page.waitForURL(dashboardPath) const dashboardArtifact = page.locator('span[title="Dashboard"]') await expect(dashboardArtifact).toBeVisible() diff --git a/cms/tests/int/accessBoundaries.int.spec.ts b/cms/tests/int/accessBoundaries.int.spec.ts index cb4843d1..5690da23 100644 --- a/cms/tests/int/accessBoundaries.int.spec.ts +++ b/cms/tests/int/accessBoundaries.int.spec.ts @@ -59,6 +59,72 @@ describe('application access boundaries', () => { }, ) + // `informationGain` is the scoring stage's to write. The update half of that + // was already closed; on create the group was writable, and the verified gate + // reads the incoming decision when there is no stored document to read. + it('refuses a signed-in create that hands itself a PASS and a verified status', async () => { + await expect( + payload.create({ + collection: 'articles', + overrideAccess: false, + user, + data: { + keyword: `self-scored ${randomUUID()}`, + status: 'verified', + informationGain: { decision: 'PASS' }, + } as never, + }), + ).rejects.toThrow(/reaches verified only/) + }) + + // The whole hook chain, through the collection, as a signed-in person. + it('refuses a signed-in jump from a draft to published, and a create at published', async () => { + const article = await payload.create({ + collection: 'articles', + data: { keyword: `unreviewed ${randomUUID()}`, status: 'drafted' } as never, + }) + try { + for (const status of ['approved', 'published'] as const) { + await expect( + payload.update({ + collection: 'articles', + id: article.id, + overrideAccess: false, + user, + data: { status }, + }), + ).rejects.toThrow(`cannot move from drafted to ${status}`) + } + await expect( + payload.create({ + collection: 'articles', + overrideAccess: false, + user, + data: { keyword: `born published ${randomUUID()}`, status: 'published' } as never, + }), + ).rejects.toThrow('cannot be created as published') + } finally { + await payload.update({ collection: 'articles', id: article.id, data: { archived: true } }) + } + }) + + // Every article has audit rows, and `article_audit.article_id` is NOT NULL + // with ON DELETE SET NULL, so a delete could only ever fail in the database. + // Archiving is how a piece is set aside. + it('refuses to delete an article instead of failing in the database', async () => { + const article = await payload.create({ + collection: 'articles', + data: { keyword: `undeletable ${randomUUID()}` } as never, + }) + try { + await expect( + payload.delete({ collection: 'articles', id: article.id, overrideAccess: false, user }), + ).rejects.toMatchObject({ status: 403 }) + } finally { + await payload.update({ collection: 'articles', id: article.id, data: { archived: true } }) + } + }) + it('preserves cost rows when a caller attempts to bypass collection access', async () => { const row = await payload.create({ collection: 'cost-log', diff --git a/cms/tests/int/api.int.spec.ts b/cms/tests/int/api.int.spec.ts deleted file mode 100644 index 9bd5adb1..00000000 --- a/cms/tests/int/api.int.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { getPayload, Payload } from 'payload' -import config from '@/payload.config' - -import { describe, it, beforeAll, expect } from 'vitest' - -let payload: Payload - -describe('API', () => { - beforeAll(async () => { - const payloadConfig = await config - payload = await getPayload({ config: payloadConfig }) - }) - - it('fetches users', async () => { - const users = await payload.find({ - collection: 'users', - }) - expect(users).toBeDefined() - }) -}) diff --git a/cms/tests/int/articleActions.int.spec.ts b/cms/tests/int/articleActions.int.spec.ts index 8e20ebdf..48613d89 100644 --- a/cms/tests/int/articleActions.int.spec.ts +++ b/cms/tests/int/articleActions.int.spec.ts @@ -89,6 +89,7 @@ const { ActivePipelineRunError } = await import('@/lib/createPipelineRun') const { approveArticleAction, archiveArticleAction, + overrideReviewAction, publishArticleAction, regenerateArticleAction, resetToDraftedAction, @@ -286,6 +287,135 @@ describe('the three send-back-for-rework actions null informationGain identicall }) }) +// A reset or regenerate throws the draft away, so every QA verdict about that +// draft has to go with it. `evidenceCheck` was the group the constant missed. +describe('reset and regenerate clear every QA result group', () => { + const EXPECTED_QA_GROUPS = ['structural', 'factCheck', 'qualitativeReview', 'evidenceCheck'] + + beforeEach(() => { + vi.clearAllMocks() + authMock.mockResolvedValue({ user: { id: 7, email: 'reviewer@example.com' } } as never) + findByIDMock.mockResolvedValue({ + id: 1, + status: 'needs_revision', + qaResults: undefined, + revisionCount: 0, + } as never) + findMock.mockResolvedValue({ docs: [] } as never) + }) + + const writtenQaResults = () => + (updateMock.mock.calls[0]?.[0]?.data as { qaResults: Record> }) + .qaResults + + for (const [name, run] of [ + ['resetToDraftedAction', () => resetToDraftedAction(1, 'fixed the intro')], + ['regenerateArticleAction', () => regenerateArticleAction(1, 'add a table')], + ] as const) { + it(`${name} nulls every field of every group`, async () => { + await run() + const qaResults = writtenQaResults() + expect(Object.keys(qaResults).sort()).toEqual([...EXPECTED_QA_GROUPS].sort()) + for (const group of Object.values(qaResults)) { + expect(Object.values(group).every((value) => value === null)).toBe(true) + } + }) + } +}) + +// Send-back writes its own QA verdict (the reviewer's reason, as a failed +// qualitative review), but the evidence verdict belongs to the draft being +// sent back and must not survive it either. +describe('sendBackAction clears the evidence verdict it does not replace', () => { + beforeEach(() => { + vi.clearAllMocks() + authMock.mockResolvedValue({ user: { id: 7, email: 'reviewer@example.com' } } as never) + findMock.mockResolvedValue({ docs: [] } as never) + }) + + it('names all four QA groups and nulls evidenceCheck', async () => { + await sendBackAction(1, 'not on brand') + const { qaResults } = updateMock.mock.calls[0]?.[0]?.data as { + qaResults: Record> + } + expect(Object.keys(qaResults).sort()).toEqual( + ['evidenceCheck', 'factCheck', 'qualitativeReview', 'structural'], + ) + expect(qaResults.evidenceCheck).toEqual({ passed: null, notes: null, claims: null }) + }) +}) + +// "Only approval moves an article to researched." Regenerate writes +// `researched` and reset writes `drafted`; before a brief is approved either +// one would start the writing without that approval. +describe('reset and regenerate refuse an article whose brief was never approved', () => { + beforeEach(() => { + vi.clearAllMocks() + authMock.mockResolvedValue({ user: { id: 7, email: 'reviewer@example.com' } } as never) + findMock.mockResolvedValue({ docs: [] } as never) + }) + + for (const status of ['topic_selected', 'brief_review'] as const) { + it(`refuses both at ${status} without writing anything`, async () => { + findByIDMock.mockResolvedValue({ id: 1, status, revisionCount: 0 } as never) + await expect(regenerateArticleAction(1, 'again')).rejects.toThrow( + 'no approved brief yet, so it cannot be regenerated', + ) + await expect(resetToDraftedAction(1, 'again')).rejects.toThrow( + 'no approved brief yet, so it cannot be reset', + ) + expect(updateMock).not.toHaveBeenCalled() + }) + } + + // A stale page on a later status still works, and still clears what it should. + it('still acts on an article that has a draft', async () => { + findByIDMock.mockResolvedValue({ id: 1, status: 'approved', revisionCount: 0 } as never) + await regenerateArticleAction(1, 'again') + await resetToDraftedAction(1, 'again') + expect(updateMock).toHaveBeenCalledTimes(2) + }) +}) + +describe('overrideReviewAction only overrides a decision that is waiting for one', () => { + beforeEach(() => { + vi.clearAllMocks() + authMock.mockResolvedValue({ user: { id: 7, email: 'reviewer@example.com' } } as never) + findMock.mockResolvedValue({ docs: [] } as never) + }) + + for (const status of ['needs_review', 'blocked'] as const) { + it(`overrides ${status} and records which decision it overrode`, async () => { + findByIDMock.mockResolvedValue({ id: 1, status } as never) + await overrideReviewAction(1, 'checked the sources by hand') + expect(updateMock).toHaveBeenCalledWith( + expect.objectContaining({ + data: expect.objectContaining({ status: 'verified' }), + overrideAccess: false, + context: expect.objectContaining({ + articleAudit: expect.objectContaining({ + event: status === 'blocked' ? 'block_overridden' : 'review_overridden', + }), + }), + }), + ) + }) + } + + // The gates let these through (they only judge a move out of the two statuses + // above), so without the action's own check a stale page wrote a second + // "overrode needs_review" audit row for an override that never happened. + for (const status of ['verified', 'approved', 'published', 'drafted'] as const) { + it(`refuses ${status} without writing anything`, async () => { + findByIDMock.mockResolvedValue({ id: 1, status } as never) + await expect(overrideReviewAction(1, 'checked the sources by hand')).rejects.toThrow( + 'Only an article in Needs review or Blocked can be overridden.', + ) + expect(updateMock).not.toHaveBeenCalled() + }) + } +}) + /** * Which run's reasons the next generate prompt gets. `regenerateArticleAction` * must read the article's *current* `informationGain.run` pointer, because the diff --git a/cms/tests/int/articleReviewGate.int.spec.ts b/cms/tests/int/articleReviewGate.int.spec.ts index 6c690f43..3abca8c1 100644 --- a/cms/tests/int/articleReviewGate.int.spec.ts +++ b/cms/tests/int/articleReviewGate.int.spec.ts @@ -4,11 +4,13 @@ import type { ArticleAuditContext } from '@/lib/articleAudit' import { CLEARED_INFORMATION_GAIN, gateArchivedStatus, + gatePublicationPath, gateReviewOverride, gateVerifiedStatus, invalidateStaleInformationGain, OVERRIDABLE_STATUSES, PASSING_DECISION, + PUBLICATION_PREDECESSORS, SCORED_CONTENT_FIELDS, UNGATED_OVERRIDE_TARGETS, } from '@/lib/articleReviewGate' @@ -901,6 +903,83 @@ describe('stale information-gain invalidation', () => { * gate refuses status and schedule changes while `archived` holds, from every * writer at once — the ops actions, the raw doc view and the API. */ +describe('approved and published are reachable by a person only through review', () => { + const person = { user: { id: 7, email: 'reviewer@example.com' } } + const move = (from: string | undefined, to: string, req: unknown = person) => + gatePublicationPath({ + data: { status: to }, + originalDoc: from ? { status: from } : undefined, + req, + context: {}, + } as never) + + // The statuses the other gates never judged a forward jump out of. + const unreviewed = [ + 'topic_selected', + 'brief_review', + 'researched', + 'drafted', + 'qa_passed', + 'needs_revision', + ] + + for (const to of ['approved', 'published'] as const) { + for (const from of unreviewed) { + it(`refuses ${from} to ${to}`, () => { + expect(() => move(from, to)).toThrow(`cannot move from ${from} to ${to}`) + }) + } + + it(`refuses a create at ${to}`, () => { + expect(() => move(undefined, to)).toThrow(`cannot be created as ${to}`) + }) + + for (const from of PUBLICATION_PREDECESSORS[to]) { + it(`allows ${from} to ${to}`, () => { + expect(move(from, to)).toEqual({ status: to }) + }) + } + + it(`lets a re-save at ${to} through`, () => { + expect(move(to, to)).toEqual({ status: to }) + }) + + // The publish-due job, the seed and scripts: the application's own writes. + it(`does not judge a write with no user (${to})`, () => { + expect(move('drafted', to, { user: null })).toEqual({ status: to }) + expect(move(undefined, to, {})).toEqual({ status: to }) + }) + } + + it('leaves every other target alone', () => { + for (const to of ['drafted', 'needs_revision', 'verified', 'qa_passed']) { + expect(move('topic_selected', to)).toEqual({ status: to }) + } + expect( + gatePublicationPath({ + data: { title: 'no status in this write' }, + originalDoc: { status: 'drafted' }, + req: person, + context: {}, + } as never), + ).toEqual({ title: 'no status in this write' }) + }) + + // The review statuses stay on the list because `gateReviewOverride` owns + // them: the jump is allowed here and still needs a fresh justification there. + it('keeps the justified override path, and only with its justification', () => { + expect(move('blocked', 'published')).toEqual({ status: 'published' }) + expect(() => + gateReviewOverride({ + data: { status: 'published' }, + originalDoc: { status: 'blocked' }, + req: person, + context: {}, + } as never), + ).toThrow('reviewJustification') + }) +}) + describe('archived articles refuse status and schedule changes', () => { const hook = (data: Record, originalDoc: Record) => gateArchivedStatus({ data, originalDoc, req: { user: null }, context: {} } as never) diff --git a/cms/tests/int/assetStepper.int.spec.ts b/cms/tests/int/assetStepper.int.spec.ts index 2ffe2600..2acdd1d6 100644 --- a/cms/tests/int/assetStepper.int.spec.ts +++ b/cms/tests/int/assetStepper.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { cleanup, render, screen } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/boardActions.int.spec.ts b/cms/tests/int/boardActions.int.spec.ts index b82fb85b..e12b9241 100644 --- a/cms/tests/int/boardActions.int.spec.ts +++ b/cms/tests/int/boardActions.int.spec.ts @@ -12,6 +12,7 @@ import type { WorkspaceReadiness } from '@/lib/workspaceReadiness' // real: `runSelectedArticlesAction` branches on `instanceof`. const authMock = vi.fn(async () => ({ user: { id: 7, email: 'reviewer@example.com' } })) const findMock = vi.fn(async (_args: { collection?: string }) => ({ docs: [] }) as never) +const updateMock = vi.fn(async (_args: { id?: number; data?: Record }) => ({}) as never) const { createPipelineRunMock, loadWorkspaceSetupMock } = vi.hoisted(() => ({ createPipelineRunMock: vi.fn(), @@ -32,7 +33,7 @@ vi.mock('payload', async (importOriginal) => { const actual = await importOriginal() return { ...actual, - getPayload: vi.fn(async () => ({ auth: authMock, find: findMock })), + getPayload: vi.fn(async () => ({ auth: authMock, find: findMock, update: updateMock })), } }) @@ -54,7 +55,7 @@ const readySetup = (overrides: Record = {}) => }) as never const { ActivePipelineRunError } = await import('@/lib/createPipelineRun') -const { latestRunAction, runSelectedArticlesAction } = await import( +const { latestRunAction, removeTopicsAction, runSelectedArticlesAction } = await import( '@/components/ops/boardActions' ) @@ -124,6 +125,15 @@ describe('runSelectedArticlesAction', () => { }) describe('latestRunAction', () => { + // The run bar polls this from every admin route, the login page included. + it('answers null for a signed-out caller and reads nothing', async () => { + vi.clearAllMocks() + authMock.mockResolvedValueOnce({ user: null } as never) + expect(await latestRunAction()).toBeNull() + expect(findMock).not.toHaveBeenCalled() + authMock.mockResolvedValue({ user: { id: 7, email: 'reviewer@example.com' } } as never) + }) + it('says what actually went wrong instead of a fixed sentence', async () => { findMock.mockRejectedValueOnce(new Error('connection terminated unexpectedly')) await expect(latestRunAction()).rejects.toThrow( @@ -131,3 +141,39 @@ describe('latestRunAction', () => { ) }) }) + +describe('removeTopicsAction', () => { + const topic = { id: 1, status: 'topic_selected', keyword: 'espresso grinders' } + + /** `articles` returns the topic; `pipeline-runs` returns whatever is active. */ + const withActiveRuns = (runs: { runId: string }[]) => + findMock.mockImplementation( + async (args: { collection?: string }) => + ({ docs: args.collection === 'pipeline-runs' ? runs : [topic] }) as never, + ) + + beforeEach(() => { + vi.clearAllMocks() + authMock.mockResolvedValue({ user: { id: 7, email: 'reviewer@example.com' } } as never) + }) + + it('archives a topic no run is carrying', async () => { + withActiveRuns([]) + expect(await removeTopicsAction([1])).toMatchObject({ ok: true }) + expect(updateMock).toHaveBeenCalledWith( + expect.objectContaining({ id: 1, data: { archived: true }, overrideAccess: false }), + ) + }) + + // An archived article refuses every status change, so removing a topic while + // research is running throws that research away after it has been paid for. + // `archiveArticleAction` refuses the same thing on the article page. + it('refuses a topic an active run is carrying', async () => { + withActiveRuns([{ runId: 'run-9' }]) + expect(await removeTopicsAction([1])).toEqual({ + ok: false, + error: 'This topic is in an active run. Wait for the run to finish before removing it.', + }) + expect(updateMock).not.toHaveBeenCalled() + }) +}) diff --git a/cms/tests/int/brandVoice.int.spec.ts b/cms/tests/int/brandVoice.int.spec.ts index 0de54568..cded47a4 100644 --- a/cms/tests/int/brandVoice.int.spec.ts +++ b/cms/tests/int/brandVoice.int.spec.ts @@ -43,7 +43,12 @@ describe('brand voice content helpers', () => { expect(content.tone).toEqual({ formality: 5, warmth: 1, boldness: 3, energy: 3 }) expect(content.voiceAdjectives.map((a) => a.adjective)).toEqual(['a', 'b', 'c']) expect(content.bannedWords.map((w) => w.word)).toEqual(['Synergy', 'hype']) - expect(content.samples[0].text.length).toBeLessThanOrEqual(MAX_SAMPLE_CHARS + 1) + // Exactly the cap, ellipsis included, so parsing the result again is a no-op. + expect(content.samples[0].text).toHaveLength(MAX_SAMPLE_CHARS) + expect(content.samples[0].text.endsWith('…')).toBe(true) + const again = parseBrandVoiceContent(content) + expect(again.content.samples[0].text).toBe(content.samples[0].text) + expect(again.warnings.join('\n')).not.toMatch(/truncated/) expect(content.audience.languageLevel).toBe('professional') expect(warnings.join('\n')).toMatch(/adjectives/) expect(warnings.join('\n')).toMatch(/truncated/) diff --git a/cms/tests/int/brandVoiceEditor.int.spec.ts b/cms/tests/int/brandVoiceEditor.int.spec.ts index 0cfe34a7..d6bbc783 100644 --- a/cms/tests/int/brandVoiceEditor.int.spec.ts +++ b/cms/tests/int/brandVoiceEditor.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react' import { afterEach, beforeEach, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/briefAngles.int.spec.ts b/cms/tests/int/briefAngles.int.spec.ts index 637489a7..46d2b97c 100644 --- a/cms/tests/int/briefAngles.int.spec.ts +++ b/cms/tests/int/briefAngles.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { act, cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/contentRunForm.int.spec.ts b/cms/tests/int/contentRunForm.int.spec.ts index f47fa4c2..f9b245c3 100644 --- a/cms/tests/int/contentRunForm.int.spec.ts +++ b/cms/tests/int/contentRunForm.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { cleanup, render, screen } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/dirtyGuard.int.spec.ts b/cms/tests/int/dirtyGuard.int.spec.ts index a30f3e5c..9faeb526 100644 --- a/cms/tests/int/dirtyGuard.int.spec.ts +++ b/cms/tests/int/dirtyGuard.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React, { useState } from 'react' import { act, cleanup, fireEvent, render, screen, within } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/evidenceBank.int.spec.ts b/cms/tests/int/evidenceBank.int.spec.ts index c2ec1aa7..4ce1ab0b 100644 --- a/cms/tests/int/evidenceBank.int.spec.ts +++ b/cms/tests/int/evidenceBank.int.spec.ts @@ -292,7 +292,8 @@ describe('evidence bank global', () => { const empty = await loadTenantContext(payload, { mode: 'mock', asOf: '2026-09-02' }) expect(empty.evidenceBank).toBeNull() - await write(evidenceBankFixtureDoc()) + // Pinned, so the stored dates are the fixture's own whatever today is. + await write(evidenceBankFixtureDoc(new Date('2026-09-02T00:00:00Z'))) const filled = await loadTenantContext(payload, { mode: 'mock', asOf: '2026-09-02' }) expect(filled.evidenceBank?.verifiedClaims).toHaveLength(4) // And it reaches the writer: the loader and the renderer are only useful @@ -320,6 +321,26 @@ describe('evidence bank global', () => { expect(filled.evidenceBank).not.toHaveProperty('notes') }) + // The fixture's dates are fixed in 2027. A demo bank installed after them + // must not arrive already expired. + it('keeps the demo bank usable however late it is installed', async () => { + await startFresh() + const late = new Date('2029-03-01T00:00:00Z') + const doc = evidenceBankFixtureDoc(late) as { verifiedClaims: { recheckAt: string | null }[] } + expect(doc.verifiedClaims.map((claim) => claim.recheckAt)).toEqual([ + '2029-08-28', + '2029-08-28', + '2029-08-28', + null, + ]) + await write(doc) + const context = await loadTenantContext(payload, { mode: 'mock', asOf: '2029-03-01' }) + const usable = context.evidenceBank?.verifiedClaims.filter( + (claim) => claim.recheckAt !== '' && claim.recheckAt >= '2029-03-01', + ) + expect(usable).toHaveLength(3) + }) + it('is a recommendation in readiness, never a blocker', async () => { await startFresh() const missing = await loadWorkspaceSetup(payload) diff --git a/cms/tests/int/evidenceSources.int.spec.ts b/cms/tests/int/evidenceSources.int.spec.ts index 4aad005a..e9b09413 100644 --- a/cms/tests/int/evidenceSources.int.spec.ts +++ b/cms/tests/int/evidenceSources.int.spec.ts @@ -34,7 +34,7 @@ describe('evidence sources collection', () => { }) it('is readable and writable only when authenticated', async () => { - for (const operation of ['read', 'create', 'update', 'delete'] as const) { + for (const operation of ['read', 'create', 'update'] as const) { expect(await EvidenceSources.access?.[operation]?.({ req: { user: null } } as never)).toBe( false, ) @@ -44,6 +44,14 @@ describe('evidence sources collection', () => { } }) + // A rule is retired with `active: false`. Deleting one changed scoring with + // no audit row and cascaded away the subject of the rule's past audit rows. + it('cannot be deleted by anyone', async () => { + for (const req of [{ user: null }, { user: { id: 1 } }]) { + expect(await EvidenceSources.access?.delete?.({ req } as never)).toBe(false) + } + }) + it.each(['create', 'update'] as const)('audits a source %s with its actor and changed fields', async (operation) => { const create = vi.fn().mockResolvedValue({ id: 99 }) const req = { user: { id: 7, email: 'editor@example.com' }, payload: { create } } diff --git a/cms/tests/int/graphqlSchema.int.spec.ts b/cms/tests/int/graphqlSchema.int.spec.ts index 9fb7ca1e..2a2eb39f 100644 --- a/cms/tests/int/graphqlSchema.int.spec.ts +++ b/cms/tests/int/graphqlSchema.int.spec.ts @@ -48,4 +48,20 @@ describe('GraphQL application schema', () => { }) } }) + + // The resolver ignores a fractional count and falls back to env or default, + // so the admin must not be able to save one and see it "set". + it('refuses a fractional or negative count and accepts a whole one', async () => { + const payload = await getPayload({ config: await config }) + const previous = await payload.findGlobal({ slug: 'information-gain-policy' }) + const save = (minVerifiedNovelClaims: number | null) => + payload.updateGlobal({ slug: 'information-gain-policy', data: { minVerifiedNovelClaims } }) + try { + await expect(save(1.5)).rejects.toThrow(/Minimum verified novel claims/) + await expect(save(-1)).rejects.toThrow(/Minimum verified novel claims/) + expect((await save(2)).minVerifiedNovelClaims).toBe(2) + } finally { + await save(previous.minVerifiedNovelClaims ?? null) + } + }) }) diff --git a/cms/tests/int/icpEditor.int.spec.ts b/cms/tests/int/icpEditor.int.spec.ts index f7cd4242..8a80ab06 100644 --- a/cms/tests/int/icpEditor.int.spec.ts +++ b/cms/tests/int/icpEditor.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { cleanup, fireEvent, render, screen, within } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/newContentCreate.int.spec.ts b/cms/tests/int/newContentCreate.int.spec.ts index aa50c0b8..fd8aa079 100644 --- a/cms/tests/int/newContentCreate.int.spec.ts +++ b/cms/tests/int/newContentCreate.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { act, cleanup, fireEvent, render, screen } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/newContentGates.int.spec.ts b/cms/tests/int/newContentGates.int.spec.ts index 9f59220c..dff82fe4 100644 --- a/cms/tests/int/newContentGates.int.spec.ts +++ b/cms/tests/int/newContentGates.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { cleanup, fireEvent, render, screen } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/newContentKeyboard.int.spec.ts b/cms/tests/int/newContentKeyboard.int.spec.ts index e7ccf100..39ed909d 100644 --- a/cms/tests/int/newContentKeyboard.int.spec.ts +++ b/cms/tests/int/newContentKeyboard.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { cleanup, fireEvent, render, screen } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/opsNav.int.spec.ts b/cms/tests/int/opsNav.int.spec.ts index fd25b02a..f967a615 100644 --- a/cms/tests/int/opsNav.int.spec.ts +++ b/cms/tests/int/opsNav.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { cleanup, render, screen } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/pipelineReportCli.int.spec.ts b/cms/tests/int/pipelineReportCli.int.spec.ts index 4f45f15e..bd11991d 100644 --- a/cms/tests/int/pipelineReportCli.int.spec.ts +++ b/cms/tests/int/pipelineReportCli.int.spec.ts @@ -1,16 +1,23 @@ import { execFile } from 'node:child_process' +import { createRequire } from 'node:module' import path from 'node:path' +import { pathToFileURL } from 'node:url' import { promisify } from 'node:util' import { describe, expect, it } from 'vitest' const execute = promisify(execFile) +// The child runs from the repo root, which declares no `tsx`: a bare `--import +// tsx` only resolved there through whatever copy another package happened to +// hoist. Resolve the one this workspace depends on instead. +const tsxLoader = pathToFileURL(createRequire(import.meta.url).resolve('tsx')).href + describe('pipeline report command', () => { it('prints stored results without requiring a live research target', async () => { const { stdout } = await execute( process.execPath, - ['--import', 'tsx', 'pipeline/src/index.ts', 'report', '--period', 'week'], + ['--import', tsxLoader, 'pipeline/src/index.ts', 'report', '--period', 'week'], { cwd: path.resolve(process.cwd(), '..'), timeout: 15_000, @@ -28,5 +35,7 @@ describe('pipeline report command', () => { expect(stdout).toContain('PIPELINE REPORT') expect(stdout).toContain('Failure digest') expect(stdout).not.toContain('[pipeline] workspace:') - }) + // Longer than the child's own 15 s limit, so a slow boot reports the + // child's error and not Vitest's default 5 s timeout. + }, 20_000) }) diff --git a/cms/tests/int/publishDue.int.spec.ts b/cms/tests/int/publishDue.int.spec.ts index bc1a1382..71f50f63 100644 --- a/cms/tests/int/publishDue.int.spec.ts +++ b/cms/tests/int/publishDue.int.spec.ts @@ -45,6 +45,9 @@ describe('publish-due task', () => { }) expect(after.status).toBe('published') expect(after.publishedAt).toBeTruthy() + // The schedule is used up: left behind, it would republish the piece the + // moment it was approved a second time. + expect(after.publishAt).toBeNull() const audit = await payload.find({ collection: 'article-audit', @@ -93,4 +96,47 @@ describe('publish-due task', () => { await runTask() expect(await runTask()).not.toContain(due.id) }) + + // A publish from the raw document view or the API carries no `publishedAt`. + it('stamps publishedAt on any transition into published, and only then', async () => { + const article = await makeArticle({ status: 'approved' }) + const published = await payload.update({ + collection: 'articles', + id: article.id, + overrideAccess: true, + data: { status: 'published' }, + }) + expect(published.publishedAt).toBeTruthy() + + // An ordinary save of a published piece keeps the date it went live. + const resaved = await payload.update({ + collection: 'articles', + id: article.id, + overrideAccess: true, + data: { reviewNotes: 'typo fixed' }, + }) + expect(resaved.publishedAt).toBe(published.publishedAt) + + // Unpublished and published again: a new date, and a date the write + // supplies itself is kept. + const back = { collection: 'articles', id: article.id, overrideAccess: true } as const + await payload.update({ ...back, data: { status: 'approved' } }) + await new Promise((resolve) => setTimeout(resolve, 5)) + const republished = await payload.update({ ...back, data: { status: 'published' } }) + expect(new Date(String(republished.publishedAt)).getTime()).toBeGreaterThan( + new Date(String(published.publishedAt)).getTime(), + ) + await payload.update({ ...back, data: { status: 'approved' } }) + const supplied = await payload.update({ + ...back, + data: { status: 'published', publishedAt: '2030-01-02T03:04:05.000Z' }, + }) + expect(supplied.publishedAt).toBe('2030-01-02T03:04:05.000Z') + await payload.update({ + collection: 'articles', + id: article.id, + overrideAccess: true, + data: { archived: true }, + }) + }) }) diff --git a/cms/tests/int/qaTriage.int.spec.ts b/cms/tests/int/qaTriage.int.spec.ts index 15b28891..0b9c851b 100644 --- a/cms/tests/int/qaTriage.int.spec.ts +++ b/cms/tests/int/qaTriage.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { cleanup, render, screen } from '@testing-library/react' import { afterEach, expect, it } from 'vitest' diff --git a/cms/tests/int/reviewFeedback.int.spec.ts b/cms/tests/int/reviewFeedback.int.spec.ts index b21358da..ddb2c1ae 100644 --- a/cms/tests/int/reviewFeedback.int.spec.ts +++ b/cms/tests/int/reviewFeedback.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { act, cleanup, fireEvent, render, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/reviewPanels.int.spec.ts b/cms/tests/int/reviewPanels.int.spec.ts index ff2f2c5f..85ee21dc 100644 --- a/cms/tests/int/reviewPanels.int.spec.ts +++ b/cms/tests/int/reviewPanels.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { render, screen } from '@testing-library/react' import { expect, it, vi } from 'vitest' diff --git a/cms/tests/int/runBar.int.spec.ts b/cms/tests/int/runBar.int.spec.ts index d0fd8ced..67630b51 100644 --- a/cms/tests/int/runBar.int.spec.ts +++ b/cms/tests/int/runBar.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { act, cleanup, render, screen, within } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/runtimeBanner.int.spec.ts b/cms/tests/int/runtimeBanner.int.spec.ts index c3e0087d..87c8884f 100644 --- a/cms/tests/int/runtimeBanner.int.spec.ts +++ b/cms/tests/int/runtimeBanner.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { act, cleanup, render, screen } from '@testing-library/react' import { afterEach, beforeEach, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/setupSuggestions.int.spec.ts b/cms/tests/int/setupSuggestions.int.spec.ts index 12d74399..ad4a1479 100644 --- a/cms/tests/int/setupSuggestions.int.spec.ts +++ b/cms/tests/int/setupSuggestions.int.spec.ts @@ -245,6 +245,18 @@ it('an open suggestion whose signal disappears becomes obsolete on the next scan }) await collectSetupSuggestions(payload) expect((await find(signature))?.status).toBe('obsolete') + + // And it comes back when the signal does. `signature` is unique, so the + // obsolete row is the only row this suggestion can ever have: if a scan does + // not reopen it, the suggestion is gone for good. + await payload.update({ + collection: 'articles', + id: kept.id, + overrideAccess: true, + data: { body: plainTextToLexical('Ordinary guidance.') as never }, + }) + await collectSetupSuggestions(payload) + expect((await find(signature))?.status).toBe('open') }) it('a satisfied open suggestion becomes obsolete even with no new history', async () => { diff --git a/cms/tests/int/templateConfigEditor.int.spec.ts b/cms/tests/int/templateConfigEditor.int.spec.ts index ca044bb9..bde5bf16 100644 --- a/cms/tests/int/templateConfigEditor.int.spec.ts +++ b/cms/tests/int/templateConfigEditor.int.spec.ts @@ -1,3 +1,4 @@ +// @vitest-environment jsdom import React from 'react' import { act, cleanup, fireEvent, render, screen } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' diff --git a/cms/tests/int/webhookDeliver.int.spec.ts b/cms/tests/int/webhookDeliver.int.spec.ts index 1a9d8c2a..2e87f423 100644 --- a/cms/tests/int/webhookDeliver.int.spec.ts +++ b/cms/tests/int/webhookDeliver.int.spec.ts @@ -8,6 +8,7 @@ import { TIMESTAMP_HEADER, WebhookDeliverTask, verifyWebhookSignature, + redactDeliveryError, } from '@/jobs/webhookDeliver' import { resolveWebhookSettings } from '@/lib/webhookSettings' import { getPayload, type Payload } from 'payload' @@ -103,6 +104,32 @@ describe('webhook delivery task', () => { }) }) +describe('redactDeliveryError', () => { + // The message lands on the job row and in logs; the URL can carry a token. + it('removes a scheme-less URL that fetch quotes back verbatim', () => { + const url = 'hooks.example.com/x?token=SECRETTOKEN' + const out = redactDeliveryError(`Failed to parse URL from ${url}`, url, 'shh') + expect(out).toBe('Failed to parse URL from [webhook url]') + }) + + it('removes the normalised form and a bare query string too', () => { + const url = 'https://hooks.example.com?token=SECRETTOKEN' + const out = redactDeliveryError( + 'request to https://hooks.example.com/?token=SECRETTOKEN failed; query ?token=SECRETTOKEN', + url, + 'shh', + ) + expect(out).not.toContain('SECRETTOKEN') + expect(out).not.toContain('hooks.example.com') + }) + + it('removes the secret and caps the length', () => { + const out = redactDeliveryError(`bad shh ${'x'.repeat(400)}`, 'https://a.example/h', 'shh') + expect(out.startsWith('bad [redacted] ')).toBe(true) + expect(out).toHaveLength(300) + }) +}) + describe('webhook settings resolution', () => { const env = { WEBHOOK_URL: 'https://env.example/hook', WEBHOOK_SECRET: 'env-secret' } diff --git a/cms/vitest.config.mts b/cms/vitest.config.mts index 71fa6225..d13b30f4 100644 --- a/cms/vitest.config.mts +++ b/cms/vitest.config.mts @@ -5,12 +5,15 @@ import tsconfigPaths from 'vite-tsconfig-paths' export default defineConfig({ plugins: [tsconfigPaths(), react()], test: { - environment: 'jsdom', + // Most suites are database or pure-function tests. The component suites + // opt into a DOM with a `// @vitest-environment jsdom` first line, so the + // other files do not each pay for building one. + environment: 'node', setupFiles: ['./vitest.setup.ts'], include: ['tests/int/**/*.int.spec.ts'], - // Database-backed suites share one Postgres schema. Payload pushes that - // schema during getPayload(), so running those files concurrently races - // duplicate enum and index creation on a fresh database. + // Database-backed suites share one migration-built Postgres database (dev + // push is off under Vitest, see `payload.config.ts`) and several of them + // rewrite the same globals and rows, so the files run one at a time. fileParallelism: false, }, }) diff --git a/cms/vitest.setup.ts b/cms/vitest.setup.ts index 1a76c852..1de78b3c 100644 --- a/cms/vitest.setup.ts +++ b/cms/vitest.setup.ts @@ -2,3 +2,9 @@ // Load .env files import 'dotenv/config' + +// The suite never calls a paid API. CI sets this in the workflow; locally the +// mode would otherwise be whatever `cms/.env` or the shell says, and a few +// specs reach real fetch and model paths when it is `false`. A spec that tests +// the live branch stubs the variable itself with `vi.stubEnv`. +process.env.MOCK_MODE = 'true' diff --git a/docker-compose.yml b/docker-compose.yml index ebaab754..52c4d30a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,9 @@ services: POSTGRES_PASSWORD: datum POSTGRES_DB: datum ports: - - "5432:5432" + # Loopback only: every documented DATABASE_URL uses 127.0.0.1, and the + # default credentials should not be reachable from the network. + - "127.0.0.1:5432:5432" volumes: - postgres_data:/var/lib/postgresql/data diff --git a/docs/information-gain.md b/docs/information-gain.md index 106ec7de..b46807ee 100644 --- a/docs/information-gain.md +++ b/docs/information-gain.md @@ -240,9 +240,11 @@ The scoring stage's decision maps onto the article status one way only: 1. **A scoring run returned `PASS`.** `gateVerifiedStatus` refuses `status: 'verified'` unless the write carries (or the stored document already carries) `informationGain.decision === 'PASS'`. It reads the incoming value first because the stage writes the decision and the status in one update. A hand-written decision is not a way around it: the `informationGain` group is `access.update: () => false`, so no request without `overrideAccess` can persist one. 2. **A reviewer overrode `needs_review`/`blocked` with a fresh justification.** `gateReviewOverride` intercepts every transition *out of* those two statuses. Backward targets — `needs_revision`, `drafted`, `researched`, `topic_selected`, and the review statuses themselves — pass through untouched. Everything else (`qa_passed`, `verified`, `approved`, `published`) requires a `reviewJustification` that is **different from the one already stored**. The list is deliberately an allow-list of *backward* targets rather than of forward ones, so a new status defaults to gated rather than to an unnoticed detour out of review. On success the hook overwrites `reviewedBy` with the acting user and records a `review_overridden` / `block_overridden` audit event. -**A decision only ever describes one draft.** Both gates above fire on status *transitions*, which left the other half of the surface open: editing the body of an already-`verified` article is not a transition, so it used to keep a `PASS` earned by text nobody could read any more — and that same `PASS` could later authorise another move to `verified`. A third hook, `invalidateStaleInformationGain`, closes it. When an update changes any field the scoring stage actually reads — `title`, `body`, `keyword`, `research.snapshot`, `research.queryCluster`, `research.facets`, listed as `SCORED_CONTENT_FIELDS` beside the stage that defines them — it nulls the whole `informationGain` group. Fields the scorer never sees (`titleTag`, `metaDescription`, the `og*` fields, `faqItems`, and the rest of the `research` group) are deliberately not on that list: structural QA checks them, but editing one cannot make a scorecard wrong. +**`approved` and `published` are reachable by a person only from a reviewed status.** A fourth hook, `gatePublicationPath`, refuses a signed-in move to either one unless the article is coming from `verified`, from the other of the two, or from `needs_review`/`blocked` (where `gateReviewOverride` has already demanded its justification). A create at either status is refused the same way. Without it nothing judged a jump from `drafted`, `qa_passed` or `needs_revision` straight to publication, from the admin, REST or GraphQL. Writes with no user (the `publish-due` job, the seed) are the application's own and are not judged. -An article sitting at `verified` also goes back to **`drafted`** when that happens, unless the same edit was already sending it backwards. Clearing the decision alone would not be enough — `gateVerifiedStatus` never fires on a re-save at `verified`, and nothing gates `verified → approved` — so unscored text could still walk to publication, just without a verdict beside it. `drafted` is the status the pipeline converges from on its own: QA picks it up, and a pass there feeds it straight back into scoring at `qa_passed`. An article already past `verified` (`approved`, `published`) keeps its status and loses only the stale summary; demoting a published article behind the editor's back would be worse than the staleness. The hook runs *first* in the `beforeChange` chain, because `gateVerifiedStatus` has to see the clearance rather than the `PASS` it replaced. Clearing an `access.update: () => false` group from a collection hook works because Payload enforces field access during the beforeValidate-fields phase, which runs before collection `beforeChange`; that same ordering is why the hook always sees a complete document and a partial REST update compares equal on everything it did not send. +**A decision only ever describes one draft.** The verified and override gates fire on status *transitions*, which left the other half of the surface open: editing the body of an already-`verified` article is not a transition, so it used to keep a `PASS` earned by text nobody could read any more — and that same `PASS` could later authorise another move to `verified`. A third hook, `invalidateStaleInformationGain`, closes it. When an update changes any field the scoring stage actually reads — `title`, `body`, `keyword`, `research.snapshot`, `research.queryCluster`, `research.facets`, listed as `SCORED_CONTENT_FIELDS` beside the stage that defines them — it nulls the whole `informationGain` group. Fields the scorer never sees (`titleTag`, `metaDescription`, the `og*` fields, `faqItems`, and the rest of the `research` group) are deliberately not on that list: structural QA checks them, but editing one cannot make a scorecard wrong. + +An article sitting at `verified` also goes back to **`drafted`** when that happens, unless the same edit was already sending it backwards. Clearing the decision alone would not be enough — `gateVerifiedStatus` never fires on a re-save at `verified`, and `verified → approved` is a legal move — so unscored text could still walk to publication, just without a verdict beside it. `drafted` is the status the pipeline converges from on its own: QA picks it up, and a pass there feeds it straight back into scoring at `qa_passed`. An article already past `verified` (`approved`, `published`) keeps its status and loses only the stale summary; demoting a published article behind the editor's back would be worse than the staleness. The hook runs *first* in the `beforeChange` chain, because `gateVerifiedStatus` has to see the clearance rather than the `PASS` it replaced. Clearing an `access.update: () => false` group from a collection hook works because Payload enforces field access during the beforeValidate-fields phase, which runs before collection `beforeChange`; that same ordering is why the hook always sees a complete document and a partial REST update compares equal on everything it did not send. Freshness is the point. The admin UI submits the whole document, so a justification typed for an earlier review would otherwise ride along and satisfy the gate with nobody typing anything. For the same reason the scoring stage **clears `reviewJustification`** whenever it lands an article in `needs_review` or `blocked`: the next override must be written against the scorecard the reviewer is actually looking at. @@ -274,7 +276,7 @@ The other way out is a plain status edit back to `drafted` (or the **Reset to dr ## Cost -Every LLM call in this feature goes through `completeJSONLogged`, so each one writes a `cost-log` row keyed by `pipelineRunId` and `article` (see `CLAUDE.md`'s Cost tracking section) and shows up in `pipeline:report`'s spend-by-stage automatically. +Every LLM call in this feature goes through `completeJSONLogged`, so each one writes a `cost-log` row keyed by `pipelineRunId` and `article` (see "Modes and money" in [operations.md](operations.md)) and shows up in `pipeline:report`'s spend-by-stage automatically. **Building a snapshot** costs roughly one `claimExtraction` call per fetched page (up to 10 SERP pages, plus up to 5 internal articles not already covered by another snapshot's cache) plus one more for facet clustering — around 10–16 calls, most of them short. **Reusing** an existing snapshot costs $0: no crawl, no LLM call, just a Payload query. diff --git a/docs/operations.md b/docs/operations.md index d044259e..301a3c22 100644 --- a/docs/operations.md +++ b/docs/operations.md @@ -8,20 +8,22 @@ All background work runs on Payload's jobs queue. In development every queue aut | Queue | Invocation | Cadence | What runs | |---|---|---|---| -| `content` | `payload jobs:run --queue content --limit 1` | your call (each invocation processes one job) | `content-run`: a full pipeline run | -| `webhooks` | `payload jobs:run --queue webhooks` | every minute or faster | `webhook-deliver`: signed status-event POSTs | -| `scheduled` | `payload jobs:run --queue scheduled --handle-schedules --limit 1` | every minute or faster | `publish-due`: publishes due `approved` articles (cron-scheduled every 5 minutes; `--handle-schedules` is what enqueues the next occurrence) | +| `content` | `npm run jobs:run --workspace cms` (`payload jobs:run --queue content --limit 1`) | your call (each invocation processes one job) | `content-run`: a full pipeline run | +| `webhooks` | `npm run jobs:webhooks --workspace cms` (`payload jobs:run --queue webhooks`) | every minute or faster | `webhook-deliver`: signed status-event POSTs | +| `scheduled` | `npm run jobs:scheduled --workspace cms` (`payload jobs:run --queue scheduled --handle-schedules --limit 1`) | every minute or faster | `publish-due`: publishes due `approved` articles (cron-scheduled every 5 minutes). `collect-setup-suggestions`: the daily 03:00 scan behind the setup suggestions (see [setup-suggestions.md](setup-suggestions.md)). `--handle-schedules` is what enqueues the next occurrence of each | + +Invoke the npm scripts, or set `NODE_ENV=production` yourself if you call `payload jobs:run` directly. The Payload CLI does not set it, and without it the Postgres adapter runs its development schema push against the database on every invocation, outside migrations. The three scripts set `DISABLE_DEV_PUSH=true` so they are safe either way. ### Content runs -- **One active run at a time.** `createPipelineRun` takes a serializable transaction plus a Postgres advisory lock (`pg_advisory_xact_lock(424242, 434343)`); a second concurrent launch gets `ActivePipelineRunError`. Runs from the `selected` source are exempt from the one-active-run rule. +- **One active run at a time.** `createPipelineRun` takes a `read committed` transaction plus a Postgres advisory lock (`pg_advisory_xact_lock(424242, 434343)`); a second concurrent launch gets `ActivePipelineRunError`. Runs from the `selected` source are exempt from the one-active-run rule. - `content-run` has `retries: 0` and concurrency key `content-pipeline`: a failed run stays failed (its articles keep their statuses and the next run retries them), and two runs never execute concurrently. - One article's failure never fails its batch; it keeps its status and is retried by the next run. A run that advanced nothing and had failures is recorded `failed` with a redacted `errorSummary` on its `pipeline-runs` row. ### Scheduled publishing - An `approved` article with a `publishAt` in the past is published by the next `publish-due` occurrence: same update path as a manual publish, so gates, the audit row (`scheduled_publish`, actor `scheduler`), the status webhook, and the cache purge all fire. -- Selection is by state (`approved` + due + not archived). A `publishAt` on any other status is inert intent; reruns converge and never double-publish. +- Selection is by state (`approved` + due + not archived); reruns converge and never double-publish. Publishing, by the job or by hand, clears `publishAt` and stamps `publishedAt` in a collection hook, so a piece approved a second time waits for a new schedule. - Worst-case publish latency is one cron interval (5 minutes) plus your scheduler cadence. ## Webhooks @@ -34,7 +36,7 @@ Configured in the admin **Webhooks** global, each field falling back to `WEBHOOK - `x-datum-timestamp` — milliseconds since epoch, signed - `x-datum-signature` — `sha256=` + hex HMAC-SHA256 of `` `${timestamp}.${rawBody}` `` with the shared secret - **Verification** (receiver side): recompute the HMAC over the exact raw body, compare constant-time, and reject timestamps older than a few minutes. `verifyWebhookSignature` in `cms/src/jobs/webhookDeliver.ts` is the reference implementation. -- Emission never fails a save; a failed queue write is logged and dropped. +- Queueing the event is part of the save: if the queue write fails, the failure is logged and the status transition is aborted, so no article commits a status without its event. Delivery is separate and retried by the `webhooks` queue; a failed delivery never affects the article. ## Cache and revalidation @@ -45,7 +47,7 @@ Configured in the admin **Webhooks** global, each field falling back to `WEBHOOK ## Modes and money - Mock mode is the default whenever no LLM provider key is present (`MOCK_MODE` can force it); mock runs make no outbound LLM or Ahrefs calls but still write cost-log rows, so reports work locally. -- Every pipeline LLM call goes through `completeJSONLogged()` and writes an append-only `cost-log` row (provider, model, tokens, USD). Ahrefs live mode requires `AHREFS_API_KEY`; without it a live run degrades to mock data with a logged warning. +- Every pipeline LLM call goes through `completeJSONLogged()` and writes an append-only `cost-log` row (provider, model, tokens, USD). Ahrefs live mode requires `AHREFS_API_KEY`; without it, topic discovery and research fail with a message naming the key (the admin's readiness check lists it as missing before a run can start). Live runs never fall back to the demo SERP. ## Fixed limits worth knowing @@ -57,7 +59,7 @@ Configured in the admin **Webhooks** global, each field falling back to `WEBHOOK | Publish-due cron | every 5 min | `cms/src/jobs/publishDue.ts` | | Public page ISR window | 300 s | `cms/src/app/(frontend)/articles/[slug]/page.tsx` | | Content page | 50 articles; search and tab counts cover all non-archived articles | `cms/src/components/ops/contentListData.ts` | -| Reports queries | All articles and period runs; cost logs accumulated in batches of 1000 | `cms/src/lib/reportQueries.ts` | +| Reports queries | All articles and period runs; cost logs aggregated in Postgres by stage and model, one query | `cms/src/lib/reportQueries.ts` | | Article audit timeline | Latest 100 article events and 100 model calls; evidence fetched when opened | `cms/src/components/ops/ArticleReviewView.tsx` | | Run status polling | 3 seconds active, 15 seconds idle, measured after each response; paused in hidden tabs | `cms/src/components/ops/runPolling.ts` | | Rendered scorecard claims | 60 | `cms/src/components/ops/articleStatus.ts` | diff --git a/docs/tenant-context.md b/docs/tenant-context.md index f40f8e22..a98aeef0 100644 --- a/docs/tenant-context.md +++ b/docs/tenant-context.md @@ -49,6 +49,10 @@ A content run needs three things, and refuses to start without any of them: - a target domain, from the global or the environment - at least one active audience +In live mode it needs a fourth: at least one competitor, because the gap +report research starts from is measured against them. Mock mode runs on demo +competitors and does not ask. + `evaluateWorkspaceReadiness` owns that rule. `governance.ready` is the answer and `governance.problems` is the list of what is missing, in the words an operator acts on — every caller interpolates that list rather than writing its @@ -386,7 +390,9 @@ global moves `configFingerprint`, so it stales a verification run. ## AI assist -Every setup step has "Draft with AI" and "Refine". Both call one server action, +The workspace, audience, positioning and evidence-bank steps have "Draft with +AI" and "Refine"; the brand voice steps do not (a voice is extracted from an +uploaded guide or written by hand). Both call one server action, `assistAction` in `cms/src/components/ops/setupActions.ts`, which drafts or revises **one section of one asset** — never a whole record, so the operator can read a reply before accepting it. diff --git a/package-lock.json b/package-lock.json index e25309ad..edf6ffa2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,6 +38,7 @@ "sharp": "0.35.5" }, "devDependencies": { + "@payloadcms/graphql": "3.91.0", "@playwright/test": "1.63.0", "@testing-library/react": "16.3.3", "@types/node": "26.6.4", diff --git a/pipeline/scripts/ig-e2e.sh b/pipeline/scripts/ig-e2e.sh index 7301bda7..ecb4eea2 100755 --- a/pipeline/scripts/ig-e2e.sh +++ b/pipeline/scripts/ig-e2e.sh @@ -78,14 +78,20 @@ probe() { npx --workspace pipeline tsx scripts/ig-e2e-probe.ts "$@"; } # --------------------------------------------------------------------------- step=$((step + 1)); log "$step. Guard: mock mode" # Paid APIs are the one thing this script must never reach: it makes ~20 LLM -# calls, and MOCK_MODE=false would bill every one of them. Unset is fine — the -# pipeline's own default mocks whenever there is no ANTHROPIC_API_KEY. -MOCK_MODE_VALUE="${MOCK_MODE:-$(sed -n 's/^MOCK_MODE=//p' .env 2>/dev/null | head -1)}" -if [ "${MOCK_MODE_VALUE:-true}" = "false" ]; then - printf ' \033[31mABORT\033[0m MOCK_MODE=false — this walkthrough would call paid APIs.\n' - exit 1 -fi -info "MOCK_MODE=${MOCK_MODE_VALUE:-unset (mocks by default)}" +# calls, and a live mode would bill every one of them. The pipeline reads +# MOCK_MODE from the shell first, then cms/.env, then the root .env, and goes +# live on its own when the variable is unset and a provider key is present, so +# no env file is trusted here: an explicit request for live mode aborts, and +# anything else is pinned to mock in the shell, which wins over both files. +case "$(printf '%s' "${MOCK_MODE:-true}" | tr '[:upper:]' '[:lower:]')" in + true|1|yes) ;; + *) + printf ' \033[31mABORT\033[0m MOCK_MODE=%s — this walkthrough only runs in mock mode.\n' "$MOCK_MODE" + exit 1 + ;; +esac +export MOCK_MODE=true +info "MOCK_MODE=true (pinned for this run)" # --------------------------------------------------------------------------- step=$((step + 1)); log "$step. Seed templates, admin user, and evidence sources" diff --git a/pipeline/src/ahrefs.ts b/pipeline/src/ahrefs.ts index 9c086318..5c32f359 100644 --- a/pipeline/src/ahrefs.ts +++ b/pipeline/src/ahrefs.ts @@ -364,6 +364,24 @@ class MockAhrefsClient implements AhrefsClient { } } +/** What a live run gets when `AHREFS_API_KEY` is unset: every call says so. */ +class UnconfiguredAhrefsClient implements AhrefsClient { + private refuse(): never { + throw new Error( + 'AHREFS_API_KEY is required for keyword and SERP research in live mode. Set it, or run in mock mode.', + ) + } + async contentGapKeywords(): Promise { + return this.refuse() + } + async serpResearch(): Promise { + return this.refuse() + } + async discoverKeywords(): Promise { + return this.refuse() + } +} + /** The slice of the workspace profile the factory needs; the whole profile satisfies it. */ export type AhrefsProfile = Pick @@ -371,8 +389,11 @@ export type AhrefsProfile = Pick [hi >> 8, hi & 0xff, lo >> 8, lo & 0xff] + if (v6.slice(0, 4).every((group) => group === 0) && v6[4] === 0xffff && v6[5] === 0) { + return isBlockedIPv4(v4Of(v6[6] ?? 0, v6[7] ?? 0)) + } + if (g0 === 0x2002) return isBlockedIPv4(v4Of(g1, v6[2] ?? 0)) + if (g0 === 0x2001 && g1 === 0) return true // 2001::/32 Teredo tunnels, never a public server if ((g0 & 0xfe00) === 0xfc00) return true // fc00::/7 unique-local if ((g0 & 0xffc0) === 0xfe80) return true // fe80::/10 link-local if ((g0 & 0xff00) === 0xff00) return true // ff00::/8 multicast diff --git a/pipeline/src/corpus/fetchPage.ts b/pipeline/src/corpus/fetchPage.ts index e872f759..71fe2ae8 100644 --- a/pipeline/src/corpus/fetchPage.ts +++ b/pipeline/src/corpus/fetchPage.ts @@ -200,23 +200,35 @@ interface PinnedDispatcher { destroy(): Promise } +/** `fetch`'s init plus undici's `dispatcher`. */ +type CrawlRequestInit = RequestInit & { dispatcher?: PinnedDispatcher } + +/** A dispatcher and the `fetch` that accepts it. */ +export interface CrawlTransport { + dispatcher: PinnedDispatcher + fetch: (url: string, init: CrawlRequestInit) => Promise +} + /** - * An undici dispatcher that will only ever connect to `addresses`. + * An undici dispatcher that resolves names through `lookup` only, with the + * `fetch` from the same undici copy. + * + * The two must come from one package. Node's built-in `fetch` runs on the + * undici bundled with that Node release, and it rejects a dispatcher built by + * a different major (`UND_ERR_INVALID_ARG`): the installed undici 8 `Agent` + * works with the global `fetch` on Node 26 and fails on Node 22 and 24. * * undici is imported dynamically so the module stays loadable — and the tests * stay hermetic — without it: an injected `fetchImpl` never reaches this. */ -async function pinnedDispatcher( - host: string, - addresses: ResolvedAddress[], -): Promise { - const { Agent } = await import('undici') - return new Agent({ connect: { lookup: pinnedLookup(host, addresses) } }) +export async function crawlTransport(lookup: PinnedLookup): Promise { + const undici = await import('undici') + return { + dispatcher: new undici.Agent({ connect: { lookup } }), + fetch: undici.fetch as unknown as CrawlTransport['fetch'], + } } -/** `fetch`'s init plus undici's `dispatcher`, which Node honours but does not type. */ -type CrawlRequestInit = RequestInit & { dispatcher?: PinnedDispatcher } - /** * Readability's article text for `html`, whitespace-normalised and capped. * Pure: no network, no clock. Falls back to the whole `` when Readability @@ -349,7 +361,6 @@ export async function fetchPage( fetchedAt, }) satisfies FetchedPage - const doFetch = opts.fetchImpl ?? fetch const lookupImpl = opts.lookupImpl ?? defaultLookup const userAgent = opts.userAgent?.trim() || USER_AGENT const controller = new AbortController() @@ -372,17 +383,19 @@ export async function fetchPage( } // Pin this hop's connection to the addresses just cleared. Only the real - // `fetch` gets a dispatcher: an injected `fetchImpl` is a stub with no + // fetch gets a dispatcher: an injected `fetchImpl` is a stub with no // socket to pin, and giving it one would drag undici into the tests. const init: CrawlRequestInit = { headers: { 'User-Agent': userAgent, Accept: 'text/html,application/xhtml+xml' }, redirect: 'manual', signal: controller.signal, } - if (!opts.fetchImpl) { - const dispatcher = await pinnedDispatcher(guard.host, guard.addresses) - dispatchers.push(dispatcher) - init.dispatcher = dispatcher + let doFetch: CrawlTransport['fetch'] | undefined = opts.fetchImpl + if (!doFetch) { + const transport = await crawlTransport(pinnedLookup(guard.host, guard.addresses)) + dispatchers.push(transport.dispatcher) + init.dispatcher = transport.dispatcher + doFetch = transport.fetch } const response = await doFetch(target, init) diff --git a/pipeline/src/corpus/snapshot.ts b/pipeline/src/corpus/snapshot.ts index 943310d8..ac12616f 100644 --- a/pipeline/src/corpus/snapshot.ts +++ b/pipeline/src/corpus/snapshot.ts @@ -248,7 +248,8 @@ export async function getOrBuildSnapshot( // owner who sees the hit has somewhere to complain to. const userAgent = userAgentFor(ctx.tenant.profile.targetDomain) const fetched = await mapWithConcurrency(serpPages, CONCURRENCY, (page) => - fetchPage(page.url, { userAgent }), + // The run's mode, not the process default: a mock run must never crawl. + fetchPage(page.url, { userAgent, mock: ctx.mode === 'mock' }), ) const crawled = serpPages.map((page, index) => ({ page, diff --git a/pipeline/src/generate.ts b/pipeline/src/generate.ts index d03452de..98e70ee7 100644 --- a/pipeline/src/generate.ts +++ b/pipeline/src/generate.ts @@ -37,8 +37,7 @@ function parseGenerated(json: unknown): GeneratedArticle { // `ogImage` is asked for but not required: the model has no real image to // point at, so the only way it can satisfy a hard requirement is to invent a // URL, and a fabricated image link is worse than an absent one. Structural QA - // already reports a missing one as OG_TAGS_MISSING, which puts it in front of - // a human instead of throwing away a paid generate call. + // does not require it either (see `structuralChecks.ts`), so the two agree. if (typeof record.ogImage !== 'string') record.ogImage = '' if (!Array.isArray(record.faqItems)) throw new Error('generate output missing faqItems array') for (const item of record.faqItems as unknown[]) { diff --git a/pipeline/src/index.ts b/pipeline/src/index.ts index 65779e1a..e4cb65c3 100644 --- a/pipeline/src/index.ts +++ b/pipeline/src/index.ts @@ -19,7 +19,7 @@ interface CliArgs { function usage(): never { console.error( 'Usage: pipeline [--count N] [--template NAME_OR_ID] [--period week|month]\n' + - ' fetch --template NAME_OR_ID --count N create up to N templated topics (default 5)\n' + + ' fetch --template NAME_OR_ID --count N create up to N templated topics (1-5, default 5)\n' + ' run advance all articles with a template through research -> generate -> qa -> informationGain\n' + ' report --period week|month print pass rates, spend, and failure digest (default week)', ) @@ -36,7 +36,8 @@ function parseArgs(argv: string[]): CliArgs { const arg = rest[i] if (arg === '--count') { const value = Number.parseInt(rest[i + 1] ?? '', 10) - if (Number.isNaN(value) || value < 1) usage() + // `fetchTopics` caps a batch at 5; refuse a larger ask instead of quietly shrinking it. + if (Number.isNaN(value) || value < 1 || value > 5) usage() count = value i += 1 } else if (arg === '--period') { diff --git a/pipeline/src/llm.ts b/pipeline/src/llm.ts index f0d9d896..ae7a6366 100644 --- a/pipeline/src/llm.ts +++ b/pipeline/src/llm.ts @@ -87,15 +87,7 @@ async function completeJSONAnthropic( messages: [{ role: 'user', content: request.user }], ...(request.needWebSearch ? { - // SDK 0.70 types only know web_search_20250305; the API accepts the - // newer server-tool version, so cast past the stale union. - tools: [ - { - type: 'web_search_20260209', - name: 'web_search', - max_uses: 5, - } as unknown as Anthropic.ToolUnion, - ], + tools: [{ type: 'web_search_20260209', name: 'web_search', max_uses: 5 }], } : {}), }) @@ -257,6 +249,8 @@ export interface CostContext { runId: string /** Model per stage for this run, from the admin's Models global / env / default. */ models: Record + /** The run's mode. Decides the fallback client when `llm` is not supplied. */ + mode?: 'mock' | 'live' llm?: LlmClient } @@ -289,7 +283,8 @@ export async function completeJSONLogged( articleId: number, request: LlmRequest, ): Promise { - const result = await (ctx.llm ?? createLlmClient(config.mockMode ? 'mock' : 'live')).completeJSON( + const mode = ctx.mode ?? (config.mockMode ? 'mock' : 'live') + const result = await (ctx.llm ?? createLlmClient(mode)).completeJSON( stage, request, ctx.models[stage], diff --git a/pipeline/test/addressGuard.test.ts b/pipeline/test/addressGuard.test.ts index 0022b35a..dc6ea3ad 100644 --- a/pipeline/test/addressGuard.test.ts +++ b/pipeline/test/addressGuard.test.ts @@ -75,6 +75,13 @@ describe('isBlockedAddress (IPv6)', () => { '::ffff:7f00:1', '::ffff:c0a8:1', '64:ff9b::1', + // IPv4 carried inside other IPv6 forms: SIIT, 6to4, Teredo. + '::ffff:0:7f00:1', + '::ffff:0:169.254.169.254', + '2002:7f00:1::', + '2002:a9fe:a9fe::1', + '2002:c0a8:101::', + '2001:0:4136:e378:8000:63bf:3fff:fdd2', ] for (const ip of blocked) { it(`blocks ${ip}`, () => { @@ -87,6 +94,8 @@ describe('isBlockedAddress (IPv6)', () => { '2001:4860::', '2606:4700:4700::1111', '::ffff:8.8.8.8', + '::ffff:0:8.8.8.8', + '2002:808:808::1', 'fbff::1', 'fec0::1', '2a00:1450:4009:81f::200e', diff --git a/pipeline/test/ahrefsFactory.test.ts b/pipeline/test/ahrefsFactory.test.ts index 0dab486b..a6a05d0e 100644 --- a/pipeline/test/ahrefsFactory.test.ts +++ b/pipeline/test/ahrefsFactory.test.ts @@ -30,9 +30,15 @@ describe('createAhrefsClient', () => { assert.equal(createAhrefsClient('live').constructor.name, 'RealAhrefsClient') }) - it('live mode without a key degrades to mock', () => { + // Not the mock client: its SERP is demo data on real hostnames, and a live + // run would crawl them and pay to extract claims from the result. + it('live mode without a key refuses every call and names the missing key', async () => { config.ahrefsApiKey = undefined - assert.equal(createAhrefsClient('live').constructor.name, 'MockAhrefsClient') + const client = createAhrefsClient('live') + assert.notEqual(client.constructor.name, 'MockAhrefsClient') + await assert.rejects(() => client.serpResearch('espresso grinder'), /AHREFS_API_KEY is required/) + await assert.rejects(() => client.contentGapKeywords(), /AHREFS_API_KEY is required/) + await assert.rejects(() => client.discoverKeywords('espresso'), /AHREFS_API_KEY is required/) }) it('works for the workspace it is handed, not the ambient environment', () => { diff --git a/pipeline/test/fetchPage.test.ts b/pipeline/test/fetchPage.test.ts index 088c38fe..44606095 100644 --- a/pipeline/test/fetchPage.test.ts +++ b/pipeline/test/fetchPage.test.ts @@ -1,7 +1,10 @@ import assert from 'node:assert/strict' +import { createServer } from 'node:http' +import type { AddressInfo } from 'node:net' import { describe, it } from 'node:test' import { + crawlTransport, extractReadableText, fetchPage, FETCH_MAX_BYTES, @@ -816,3 +819,36 @@ describe('fetchPage onHtml', () => { assert.ok(result.text.includes('The grinder matters more than the machine.')) }) }) + +describe('crawlTransport', () => { + // Every other live-branch test injects `fetchImpl`, which skips the + // dispatcher. This one drives the real pair, so a `fetch` and an `Agent` + // from different undici majors fail here and not in a live crawl. + it('fetches through its own dispatcher, resolving the name with the given lookup only', async () => { + const server = createServer((_req, res) => { + res.setHeader('content-type', 'text/html') + res.end('pinned') + }) + await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve)) + const { port } = server.address() as AddressInfo + const asked: string[] = [] + const transport = await crawlTransport((hostname, options, callback) => { + asked.push(hostname) + if (options?.all) callback(null, [{ address: '127.0.0.1', family: 4 }]) + else callback(null, '127.0.0.1', 4) + }) + try { + // `.invalid` never resolves, so a 200 proves the lookup was the only resolver. + const response = await transport.fetch(`http://crawl-transport.invalid:${port}/`, { + dispatcher: transport.dispatcher, + redirect: 'manual', + }) + assert.equal(response.status, 200) + assert.match(await response.text(), /pinned/) + assert.deepEqual(asked, ['crawl-transport.invalid']) + } finally { + await transport.dispatcher.destroy() + await new Promise((resolve) => server.close(() => resolve())) + } + }) +}) diff --git a/pipeline/test/igExactness.test.ts b/pipeline/test/igExactness.test.ts index 258de408..db43272e 100644 --- a/pipeline/test/igExactness.test.ts +++ b/pipeline/test/igExactness.test.ts @@ -126,6 +126,22 @@ describe('extractValues — numbers, units, multipliers, ranges', () => { assert.deepEqual(shape('ninety percent'), ['percent:90 %']) }) + // Word numbers are whole words. Without the boundary, the plural `s` and the + // `h` of an ordinal read as the units seconds and hours. + it('does not read a word number out of the middle of a word', () => { + assert.deepEqual(shape('tens of thousands of visitors'), []) + assert.deepEqual(shape('hundreds of cafes use it'), []) + assert.deepEqual(shape('ones and zeros'), []) + assert.deepEqual(shape('the eighth edition'), []) + assert.equal(exactness('Hundreds of cafes use it', ['Many cafes use it']), 1) + }) + + it('reads a decade as its year, not as seconds', () => { + assert.deepEqual(shape('popular in the 1990s'), ['year:1990']) + // A real duration keeps its unit. + assert.deepEqual(shape('pulled in 30s'), ['number:30 s']) + }) + it('does not turn prose word numbers into bare values', () => { // Bare (unit-less) word numbers are deliberately not extracted: "one of the // best ways" is prose, not a measurement, and treating it as the value 1 @@ -279,6 +295,76 @@ describe('compareValues', () => { assert.equal(exactness('shipped in 2026', ['shipped in 2025']), 0) }) + // `2000` alone is classified as a year and `2,000` as a number. They are the + // same figure, and a correctly sourced count must not score 0 on punctuation. + it('matches a four-digit count written with and without a comma', () => { + assert.equal(exactness('enrolled 2000 participants', ['enrolled 2,000 participants']), 1) + assert.equal(exactness('enrolled 2,000 participants', ['enrolled 2000 participants']), 1) + assert.equal(exactness('enrolled 2000 participants', ['enrolled 2,001 participants']), 0) + // A number with a unit is still not a year. + assert.equal(exactness('shipped in 2026', ['took 2026 ms']), 0) + // Only the spelling difference counts: a multiplier or a decimal is another figure. + assert.equal(exactness('founded in 2000', ['2k users']), 0) + assert.equal(exactness('founded in 2000', ['2 thousand users']), 0) + assert.equal(exactness('founded in 2000', ['2000.0 users']), 0) + // Nor is a decade a count: only a year written as four bare digits matches. + assert.equal(exactness('popular in the 2000s', ['2,000 stores']), 0) + assert.equal(exactness('popular in the 1990s', ['1,990 cafes']), 0) + assert.equal(exactness('popular in the 1990s', ['big in the 1990s']), 1) + }) + + // A decade is not the single year of the same number either, in either + // direction, however the other side is written. + it('matches a decade only against a decade', () => { + assert.equal(exactness('launched in 2000', ['launched in the 2000s']), 0) + assert.equal(exactness('launched in the 2000s', ['launched in 2000']), 0) + assert.equal(exactness('popular in the 2000s', ['2000 stores']), 0) + assert.equal(exactness('popular in the 1990s', ['1990 cafes']), 0) + }) + + // Extraction ignores case, so the decade test has to as well: an all-caps + // heading is still a decade, and still not the single year. + it('recognises a decade whatever its case', () => { + assert.deepEqual(shape('THE 1990S'), ['year:1990']) + assert.equal(exactness('popular in the 1990s', ['THE 1990S']), 1) + assert.equal(exactness('POPULAR IN THE 1990S', ['popular in the 1990s']), 1) + assert.equal(exactness('launched in 1990', ['THE 1990S']), 0) + assert.equal(exactness('THE 1990S', ['launched in 1990']), 0) + assert.equal(exactness('THE 2000S', ['2,000 stores']), 0) + }) + + // Only the full form is a decade: the short second half keeps reading as seconds. + it('reads only a four-digit decade as one', () => { + assert.deepEqual(shape('the 1920s-30s'), ['year:1920', 'number:30 s']) + }) + + // `2020's` is as often a possessive as a decade, so it stays the plain year + // it has always been and keeps matching that year. + it('leaves a possessive year a year', () => { + assert.equal( + exactness("During 2020's lockdowns, sales rose 30%", ['In 2020, sales rose 30%']), + 1, + ) + assert.equal( + exactness('In 2020, sales rose 30%', ["During 2020's lockdowns, sales rose 30%"]), + 1, + ) + assert.equal(exactness("2010's biggest launch", ['the biggest launch of 2010']), 1) + }) + + // The two costs these rules accept, pinned so a change to either is a decision. + it('accepts that a bare year and a plain count of the same value are one figure', () => { + assert.equal(exactness('founded in 2000', ['2,000 customers']), 1) + assert.equal(exactness('1,990 cafes', ['founded 1990']), 1) + // A leading zero is not how a count is written. + assert.equal(exactness('founded in 2000', ['02000 participants']), 0) + }) + + it('accepts that a duration written like a decade reads as one', () => { + assert.deepEqual(shape('a timeout of 2000s'), ['year:2000']) + assert.equal(exactness('a timeout of 2000s', ['2000 s']), 0) + }) + it('requires units to match when both sides carry one', () => { assert.equal(exactness('30 minutes', ['30 seconds']), 0) assert.equal(exactness('30 minutes', ['30 mins']), 1) diff --git a/pipeline/test/igParsers.test.ts b/pipeline/test/igParsers.test.ts index 447fb7ca..dc872c4c 100644 --- a/pipeline/test/igParsers.test.ts +++ b/pipeline/test/igParsers.test.ts @@ -487,6 +487,7 @@ describe('parseJudgeReply', () => { claims: [ { claimId: 'c001', + duplicateProbability: 0, closestBaselineClaimId: 'not-a-known-claim', closestInternalClaimId: 42, containsNumericOrTemporalClaim: 'true', @@ -521,7 +522,7 @@ describe('parseJudgeReply', () => { assert.throws( () => parseJudgeReply( - { claims: [{ claimId: 'c001' }] }, + { claims: [{ claimId: 'c001', duplicateProbability: 0.2 }] }, ['c001', 'c002'], queryIds, baselineIds, @@ -530,13 +531,30 @@ describe('parseJudgeReply', () => { ) const signals = parseJudgeReply( - { claims: [{ claimId: 'c001' }, { claimId: 'c999' }] }, + { claims: [{ claimId: 'c001', duplicateProbability: 0.2 }, { claimId: 'c999' }] }, ['c001'], queryIds, baselineIds, ) assert.deepEqual([...signals.keys()], ['c001']) }) + + // Novelty is 1 - duplicateProbability. Reading a missing or quoted value as 0 + // would call the claim maximally novel and send it to the paid verifier. + it('refuses an entry whose duplicateProbability is missing or not a number', () => { + for (const duplicateProbability of [undefined, '0.9', null, Number.NaN]) { + assert.throws( + () => + parseJudgeReply( + { claims: [{ claimId: 'c001', duplicateProbability }] }, + ['c001'], + queryIds, + baselineIds, + ), + { message: 'judge reply for claim c001 has no numeric duplicateProbability' }, + ) + } + }) }) describe('parseVerifierReply', () => { diff --git a/pipeline/test/igText.test.ts b/pipeline/test/igText.test.ts index f9e4dd28..b472e1b1 100644 --- a/pipeline/test/igText.test.ts +++ b/pipeline/test/igText.test.ts @@ -32,10 +32,18 @@ describe('keywordTokens', () => { it('drops stopwords and tokens shorter than three characters', () => { assert.ok(STOPWORDS.has('the')) - assert.ok(STOPWORDS.has('2026')) assert.deepEqual(keywordTokens('the best guide to CRM in 2026'), ['crm']) }) + // Any year, not a hand-kept list: a list that ended at 2026 let "2027" count + // as a topic word and pull unrelated articles into the internal corpus. + it('drops calendar years, whichever year it is', () => { + assert.deepEqual(keywordTokens('best crm 2027'), ['crm']) + assert.deepEqual(keywordTokens('running shoes 1999 vs 2031'), ['running', 'shoes']) + // Not a year: it stays a token. + assert.deepEqual(keywordTokens('route 3000 review'), ['route', '3000', 'review']) + }) + it('returns nothing for text made entirely of stopwords', () => { assert.deepEqual(keywordTokens('what is the best guide'), []) assert.deepEqual(keywordTokens(' '), [])