{
  "schema": "d29.p0.live.catalog.v1",
  "checked_at": "2026-09-26",
  "evidence_id": "LIVE-CATALOG-01",
  "method": "sudo -n -u postgres psql; catalog metadata only",
  "production_connected": false,
  "user_rows_read": false,
  "secrets_read": false,
  "databases": [
    {
      "database": "mathchast_editor",
      "server_version": "16.15 (Ubuntu 16.15-0ubuntu0.24.04.1)",
      "schemas": [
        "editorial",
        "platform",
        "public"
      ],
      "tables": [
        {
          "schema": "editorial",
          "name": "annotation",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "article",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "article_stage",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "article_version",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "asset",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "d15_writer_task",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "d15_writer_task_event",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "merge_group",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "merge_member",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "task",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "task_event",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "workflow",
          "type": "BASE TABLE"
        },
        {
          "schema": "platform",
          "name": "audit_event",
          "type": "BASE TABLE"
        },
        {
          "schema": "platform",
          "name": "device_session",
          "type": "BASE TABLE"
        },
        {
          "schema": "platform",
          "name": "project",
          "type": "BASE TABLE"
        }
      ],
      "columns": [
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "article_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "version_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "target_type",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "selector",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "command",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "instruction",
          "type": "text",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "status",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "creator",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "code",
          "type": "character",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "title",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "source_type",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "current_version_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "text_stage_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "image_stage_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "published_at",
          "type": "timestamp with time zone",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "archived_at",
          "type": "timestamp with time zone",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "project_id",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "source_job_id",
          "type": "text",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "slug",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "name",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "color_token",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "sort_order",
          "type": "integer",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "terminal",
          "type": "boolean",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "editable",
          "type": "boolean",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "article_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "parent_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "html_raw",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "html_sanitized",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "checksum",
          "type": "character",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "created_by",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "reason",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "article_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "version_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "role",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "path",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "mime",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "bytes",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "checksum",
          "type": "character",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "width",
          "type": "integer",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "height",
          "type": "integer",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "parent_asset_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "run_id",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "task_key",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "idempotency_key",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "route",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "payload",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "read_scope",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "write_scope",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "priority",
          "type": "integer",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "state",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "available_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "lease_owner",
          "type": "text",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "lease_until",
          "type": "timestamp with time zone",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "last_heartbeat_at",
          "type": "timestamp with time zone",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "attempt",
          "type": "integer",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "max_attempts",
          "type": "integer",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "last_error",
          "type": "jsonb",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "result",
          "type": "jsonb",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "dead_lettered_at",
          "type": "timestamp with time zone",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task_event",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task_event",
          "name": "task_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task_event",
          "name": "state",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task_event",
          "name": "detail",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task_event",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "state",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "target_article_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "created_by",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_group_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "article_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "source_order",
          "type": "integer",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "annotation_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "idempotency_key",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "route",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "read_scope",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "write_scope",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "priority",
          "type": "integer",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "state",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "lease_until",
          "type": "timestamp with time zone",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "attempt",
          "type": "integer",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "lease_owner",
          "type": "text",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "last_heartbeat_at",
          "type": "timestamp with time zone",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "last_error",
          "type": "jsonb",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "max_attempts",
          "type": "integer",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "available_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "dead_lettered_at",
          "type": "timestamp with time zone",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "task_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "state",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "detail",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "slug",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "name",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "definition",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "actor",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "action",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "entity_type",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "entity_id",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "request_id",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "before_ref",
          "type": "text",
          "nullable": "YES"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "after_ref",
          "type": "text",
          "nullable": "YES"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "reason",
          "type": "text",
          "nullable": "YES"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "id",
          "type": "uuid",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "actor",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "expires_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "revoked_at",
          "type": "timestamp with time zone",
          "nullable": "YES"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "token_hash",
          "type": "character",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "csrf_hash",
          "type": "character",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "project",
          "name": "id",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "project",
          "name": "name",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "project",
          "name": "visibility",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "project",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        }
      ],
      "constraints": [
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "annotation_article_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (article_id) REFERENCES editorial.article(id)"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "annotation_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "annotation_version_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (version_id) REFERENCES editorial.article_version(id)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_code_key",
          "type": "UNIQUE",
          "definition": "UNIQUE (code)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_current_version_fk",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (current_version_id) REFERENCES editorial.article_version(id)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_image_stage_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (image_stage_id) REFERENCES editorial.article_stage(id)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_project_fk",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (project_id) REFERENCES platform.project(id)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_text_stage_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (text_stage_id) REFERENCES editorial.article_stage(id)"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "article_stage_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "article_stage_slug_key",
          "type": "UNIQUE",
          "definition": "UNIQUE (slug)"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "article_version_article_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (article_id) REFERENCES editorial.article(id)"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "article_version_parent_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (parent_id) REFERENCES editorial.article_version(id)"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "article_version_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_article_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (article_id) REFERENCES editorial.article(id)"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_bytes_check",
          "type": "CHECK",
          "definition": "CHECK ((bytes >= 0))"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_height_check",
          "type": "CHECK",
          "definition": "CHECK (((height IS NULL) OR (height > 0)))"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_parent_asset_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (parent_asset_id) REFERENCES editorial.asset(id)"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_version_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (version_id) REFERENCES editorial.article_version(id)"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_width_check",
          "type": "CHECK",
          "definition": "CHECK (((width IS NULL) OR (width > 0)))"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "d15_writer_task_attempt_check",
          "type": "CHECK",
          "definition": "CHECK ((attempt >= 0))"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "d15_writer_task_idempotency_key_key",
          "type": "UNIQUE",
          "definition": "UNIQUE (idempotency_key)"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "d15_writer_task_max_attempts_check",
          "type": "CHECK",
          "definition": "CHECK (((max_attempts >= 1) AND (max_attempts <= 5)))"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "d15_writer_task_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "d15_writer_task_route_check",
          "type": "CHECK",
          "definition": "CHECK ((route = 'd15_writer'::text))"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "d15_writer_task_state_check",
          "type": "CHECK",
          "definition": "CHECK ((state = ANY (ARRAY['QUEUED'::text, 'RUNNING'::text, 'RETRY'::text, 'SUCCEEDED'::text, 'DEAD'::text, 'BLOCKED'::text, 'CANCELLED'::text])))"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task_event",
          "name": "d15_writer_task_event_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task_event",
          "name": "d15_writer_task_event_task_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (task_id) REFERENCES editorial.d15_writer_task(id)"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "merge_group_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "merge_group_target_article_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (target_article_id) REFERENCES editorial.article(id)"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_member_article_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (article_id) REFERENCES editorial.article(id)"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_member_merge_group_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (merge_group_id) REFERENCES editorial.merge_group(id)"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_member_merge_group_id_source_order_key",
          "type": "UNIQUE",
          "definition": "UNIQUE (merge_group_id, source_order)"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_member_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (merge_group_id, article_id)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_annotation_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (annotation_id) REFERENCES editorial.annotation(id)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_attempt_check",
          "type": "CHECK",
          "definition": "CHECK ((attempt >= 0))"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_idempotency_key_key",
          "type": "UNIQUE",
          "definition": "UNIQUE (idempotency_key)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_max_attempts_check",
          "type": "CHECK",
          "definition": "CHECK (((max_attempts >= 1) AND (max_attempts <= 20)))"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "task_event_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "task_event_task_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (task_id) REFERENCES editorial.task(id)"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "workflow_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "workflow_slug_key",
          "type": "UNIQUE",
          "definition": "UNIQUE (slug)"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "audit_event_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "audit_event_reason_length",
          "type": "CHECK",
          "definition": "CHECK (((reason IS NULL) OR ((char_length(reason) >= 1) AND (char_length(reason) <= 1000))))"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "device_session_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "device_session_token_hash_key",
          "type": "UNIQUE",
          "definition": "UNIQUE (token_hash)"
        },
        {
          "schema": "platform",
          "table": "project",
          "name": "project_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        }
      ],
      "indexes": [
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "annotation_article_idx",
          "definition": "CREATE INDEX annotation_article_idx ON editorial.annotation USING btree (article_id, created_at DESC)"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "annotation_pkey",
          "definition": "CREATE UNIQUE INDEX annotation_pkey ON editorial.annotation USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_code_key",
          "definition": "CREATE UNIQUE INDEX article_code_key ON editorial.article USING btree (code)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_pkey",
          "definition": "CREATE UNIQUE INDEX article_pkey ON editorial.article USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_project_updated_idx",
          "definition": "CREATE INDEX article_project_updated_idx ON editorial.article USING btree (project_id, updated_at DESC, id DESC)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_source_job_idx",
          "definition": "CREATE INDEX article_source_job_idx ON editorial.article USING btree (source_job_id) WHERE (source_job_id IS NOT NULL)"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "article_stage_pkey",
          "definition": "CREATE UNIQUE INDEX article_stage_pkey ON editorial.article_stage USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "article_stage_slug_key",
          "definition": "CREATE UNIQUE INDEX article_stage_slug_key ON editorial.article_stage USING btree (slug)"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "article_version_article_idx",
          "definition": "CREATE INDEX article_version_article_idx ON editorial.article_version USING btree (article_id, created_at DESC)"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "article_version_pkey",
          "definition": "CREATE UNIQUE INDEX article_version_pkey ON editorial.article_version USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_pkey",
          "definition": "CREATE UNIQUE INDEX asset_pkey ON editorial.asset USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "d15_writer_claim_idx",
          "definition": "CREATE INDEX d15_writer_claim_idx ON editorial.d15_writer_task USING btree (state, priority DESC, available_at, created_at, lease_until)"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "d15_writer_run_idx",
          "definition": "CREATE INDEX d15_writer_run_idx ON editorial.d15_writer_task USING btree (run_id, created_at DESC)"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "d15_writer_task_idempotency_key_key",
          "definition": "CREATE UNIQUE INDEX d15_writer_task_idempotency_key_key ON editorial.d15_writer_task USING btree (idempotency_key)"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task",
          "name": "d15_writer_task_pkey",
          "definition": "CREATE UNIQUE INDEX d15_writer_task_pkey ON editorial.d15_writer_task USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task_event",
          "name": "d15_writer_event_task_idx",
          "definition": "CREATE INDEX d15_writer_event_task_idx ON editorial.d15_writer_task_event USING btree (task_id, created_at DESC)"
        },
        {
          "schema": "editorial",
          "table": "d15_writer_task_event",
          "name": "d15_writer_task_event_pkey",
          "definition": "CREATE UNIQUE INDEX d15_writer_task_event_pkey ON editorial.d15_writer_task_event USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "merge_group_pkey",
          "definition": "CREATE UNIQUE INDEX merge_group_pkey ON editorial.merge_group USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_member_merge_group_id_source_order_key",
          "definition": "CREATE UNIQUE INDEX merge_member_merge_group_id_source_order_key ON editorial.merge_member USING btree (merge_group_id, source_order)"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_member_pkey",
          "definition": "CREATE UNIQUE INDEX merge_member_pkey ON editorial.merge_member USING btree (merge_group_id, article_id)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_available_idx",
          "definition": "CREATE INDEX task_available_idx ON editorial.task USING btree (state, available_at, priority DESC, created_at, id)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_claim_idx",
          "definition": "CREATE INDEX task_claim_idx ON editorial.task USING btree (state, priority DESC, created_at, lease_until)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_idempotency_key_key",
          "definition": "CREATE UNIQUE INDEX task_idempotency_key_key ON editorial.task USING btree (idempotency_key)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_lease_owner_idx",
          "definition": "CREATE INDEX task_lease_owner_idx ON editorial.task USING btree (lease_owner) WHERE (lease_owner IS NOT NULL)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_pkey",
          "definition": "CREATE UNIQUE INDEX task_pkey ON editorial.task USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "task_event_pkey",
          "definition": "CREATE UNIQUE INDEX task_event_pkey ON editorial.task_event USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "workflow_pkey",
          "definition": "CREATE UNIQUE INDEX workflow_pkey ON editorial.workflow USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "workflow_slug_key",
          "definition": "CREATE UNIQUE INDEX workflow_slug_key ON editorial.workflow USING btree (slug)"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "audit_entity_idx",
          "definition": "CREATE INDEX audit_entity_idx ON platform.audit_event USING btree (entity_type, entity_id, created_at DESC)"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "audit_event_pkey",
          "definition": "CREATE UNIQUE INDEX audit_event_pkey ON platform.audit_event USING btree (id)"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "device_session_active_idx",
          "definition": "CREATE INDEX device_session_active_idx ON platform.device_session USING btree (token_hash, expires_at) WHERE (revoked_at IS NULL)"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "device_session_pkey",
          "definition": "CREATE UNIQUE INDEX device_session_pkey ON platform.device_session USING btree (id)"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "device_session_token_hash_key",
          "definition": "CREATE UNIQUE INDEX device_session_token_hash_key ON platform.device_session USING btree (token_hash)"
        },
        {
          "schema": "platform",
          "table": "project",
          "name": "project_pkey",
          "definition": "CREATE UNIQUE INDEX project_pkey ON platform.project USING btree (id)"
        }
      ]
    },
    {
      "database": "mathchast_editor_aw008_diag",
      "server_version": "16.15 (Ubuntu 16.15-0ubuntu0.24.04.1)",
      "schemas": [
        "editorial",
        "platform",
        "public"
      ],
      "tables": [
        {
          "schema": "editorial",
          "name": "annotation",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "article",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "article_stage",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "article_version",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "asset",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "merge_group",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "merge_member",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "task",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "task_event",
          "type": "BASE TABLE"
        },
        {
          "schema": "editorial",
          "name": "workflow",
          "type": "BASE TABLE"
        },
        {
          "schema": "platform",
          "name": "audit_event",
          "type": "BASE TABLE"
        },
        {
          "schema": "platform",
          "name": "device_session",
          "type": "BASE TABLE"
        }
      ],
      "columns": [
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "article_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "version_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "target_type",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "selector",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "command",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "instruction",
          "type": "text",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "status",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "creator",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "code",
          "type": "character",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "title",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "source_type",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "current_version_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "text_stage_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "image_stage_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "published_at",
          "type": "timestamp with time zone",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "archived_at",
          "type": "timestamp with time zone",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "slug",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "name",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "color_token",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "sort_order",
          "type": "integer",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "terminal",
          "type": "boolean",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "editable",
          "type": "boolean",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "article_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "parent_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "html_raw",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "html_sanitized",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "checksum",
          "type": "character",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "created_by",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "reason",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "article_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "version_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "role",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "path",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "mime",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "bytes",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "checksum",
          "type": "character",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "width",
          "type": "integer",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "height",
          "type": "integer",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "parent_asset_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "state",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "target_article_id",
          "type": "bigint",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "created_by",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_group_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "article_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "source_order",
          "type": "integer",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "annotation_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "idempotency_key",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "route",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "read_scope",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "write_scope",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "priority",
          "type": "integer",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "state",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "lease_until",
          "type": "timestamp with time zone",
          "nullable": "YES"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "attempt",
          "type": "integer",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "task_id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "state",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "detail",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "slug",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "name",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "definition",
          "type": "jsonb",
          "nullable": "NO"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "id",
          "type": "bigint",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "actor",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "action",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "entity_type",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "entity_id",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "request_id",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "before_ref",
          "type": "text",
          "nullable": "YES"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "after_ref",
          "type": "text",
          "nullable": "YES"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "id",
          "type": "uuid",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "actor",
          "type": "text",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "expires_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": "NO"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "revoked_at",
          "type": "timestamp with time zone",
          "nullable": "YES"
        }
      ],
      "constraints": [
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "annotation_article_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (article_id) REFERENCES editorial.article(id)"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "annotation_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "annotation_version_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (version_id) REFERENCES editorial.article_version(id)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_code_key",
          "type": "UNIQUE",
          "definition": "UNIQUE (code)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_current_version_fk",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (current_version_id) REFERENCES editorial.article_version(id)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_image_stage_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (image_stage_id) REFERENCES editorial.article_stage(id)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_text_stage_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (text_stage_id) REFERENCES editorial.article_stage(id)"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "article_stage_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "article_stage_slug_key",
          "type": "UNIQUE",
          "definition": "UNIQUE (slug)"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "article_version_article_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (article_id) REFERENCES editorial.article(id)"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "article_version_parent_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (parent_id) REFERENCES editorial.article_version(id)"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "article_version_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_article_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (article_id) REFERENCES editorial.article(id)"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_bytes_check",
          "type": "CHECK",
          "definition": "CHECK ((bytes >= 0))"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_height_check",
          "type": "CHECK",
          "definition": "CHECK (((height IS NULL) OR (height > 0)))"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_parent_asset_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (parent_asset_id) REFERENCES editorial.asset(id)"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_version_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (version_id) REFERENCES editorial.article_version(id)"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_width_check",
          "type": "CHECK",
          "definition": "CHECK (((width IS NULL) OR (width > 0)))"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "merge_group_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "merge_group_target_article_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (target_article_id) REFERENCES editorial.article(id)"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_member_article_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (article_id) REFERENCES editorial.article(id)"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_member_merge_group_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (merge_group_id) REFERENCES editorial.merge_group(id)"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_member_merge_group_id_source_order_key",
          "type": "UNIQUE",
          "definition": "UNIQUE (merge_group_id, source_order)"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_member_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (merge_group_id, article_id)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_annotation_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (annotation_id) REFERENCES editorial.annotation(id)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_attempt_check",
          "type": "CHECK",
          "definition": "CHECK ((attempt >= 0))"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_idempotency_key_key",
          "type": "UNIQUE",
          "definition": "UNIQUE (idempotency_key)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "task_event_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "task_event_task_id_fkey",
          "type": "FOREIGN KEY",
          "definition": "FOREIGN KEY (task_id) REFERENCES editorial.task(id)"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "workflow_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "workflow_slug_key",
          "type": "UNIQUE",
          "definition": "UNIQUE (slug)"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "audit_event_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "device_session_pkey",
          "type": "PRIMARY KEY",
          "definition": "PRIMARY KEY (id)"
        }
      ],
      "indexes": [
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "annotation_article_idx",
          "definition": "CREATE INDEX annotation_article_idx ON editorial.annotation USING btree (article_id, created_at DESC)"
        },
        {
          "schema": "editorial",
          "table": "annotation",
          "name": "annotation_pkey",
          "definition": "CREATE UNIQUE INDEX annotation_pkey ON editorial.annotation USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_code_key",
          "definition": "CREATE UNIQUE INDEX article_code_key ON editorial.article USING btree (code)"
        },
        {
          "schema": "editorial",
          "table": "article",
          "name": "article_pkey",
          "definition": "CREATE UNIQUE INDEX article_pkey ON editorial.article USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "article_stage_pkey",
          "definition": "CREATE UNIQUE INDEX article_stage_pkey ON editorial.article_stage USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "article_stage",
          "name": "article_stage_slug_key",
          "definition": "CREATE UNIQUE INDEX article_stage_slug_key ON editorial.article_stage USING btree (slug)"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "article_version_article_idx",
          "definition": "CREATE INDEX article_version_article_idx ON editorial.article_version USING btree (article_id, created_at DESC)"
        },
        {
          "schema": "editorial",
          "table": "article_version",
          "name": "article_version_pkey",
          "definition": "CREATE UNIQUE INDEX article_version_pkey ON editorial.article_version USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "asset",
          "name": "asset_pkey",
          "definition": "CREATE UNIQUE INDEX asset_pkey ON editorial.asset USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "merge_group",
          "name": "merge_group_pkey",
          "definition": "CREATE UNIQUE INDEX merge_group_pkey ON editorial.merge_group USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_member_merge_group_id_source_order_key",
          "definition": "CREATE UNIQUE INDEX merge_member_merge_group_id_source_order_key ON editorial.merge_member USING btree (merge_group_id, source_order)"
        },
        {
          "schema": "editorial",
          "table": "merge_member",
          "name": "merge_member_pkey",
          "definition": "CREATE UNIQUE INDEX merge_member_pkey ON editorial.merge_member USING btree (merge_group_id, article_id)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_claim_idx",
          "definition": "CREATE INDEX task_claim_idx ON editorial.task USING btree (state, priority DESC, created_at, lease_until)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_idempotency_key_key",
          "definition": "CREATE UNIQUE INDEX task_idempotency_key_key ON editorial.task USING btree (idempotency_key)"
        },
        {
          "schema": "editorial",
          "table": "task",
          "name": "task_pkey",
          "definition": "CREATE UNIQUE INDEX task_pkey ON editorial.task USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "task_event",
          "name": "task_event_pkey",
          "definition": "CREATE UNIQUE INDEX task_event_pkey ON editorial.task_event USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "workflow_pkey",
          "definition": "CREATE UNIQUE INDEX workflow_pkey ON editorial.workflow USING btree (id)"
        },
        {
          "schema": "editorial",
          "table": "workflow",
          "name": "workflow_slug_key",
          "definition": "CREATE UNIQUE INDEX workflow_slug_key ON editorial.workflow USING btree (slug)"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "audit_entity_idx",
          "definition": "CREATE INDEX audit_entity_idx ON platform.audit_event USING btree (entity_type, entity_id, created_at DESC)"
        },
        {
          "schema": "platform",
          "table": "audit_event",
          "name": "audit_event_pkey",
          "definition": "CREATE UNIQUE INDEX audit_event_pkey ON platform.audit_event USING btree (id)"
        },
        {
          "schema": "platform",
          "table": "device_session",
          "name": "device_session_pkey",
          "definition": "CREATE UNIQUE INDEX device_session_pkey ON platform.device_session USING btree (id)"
        }
      ]
    }
  ],
  "limitations": [
    "No application table rows were queried.",
    "No secret or environment value was read.",
    "This is schema evidence; it does not prove release lineage or backup restoreability."
  ],
  "evidence": {
    "LIVE-CATALOG-01": "sudo -n -u postgres psql catalog queries against mathchast_editor and mathchast_editor_aw008_diag",
    "RUNTIME-UNIT-01": "systemctl show on server2; unit metadata only",
    "MIGRATIONS-01": "sha256sum of migration filenames and D15 schema filenames",
    "RELEASE-01": "sha256sum of public current/index.html and Work public-site/out/index.html"
  },
  "migrations": [
    {
      "path": "/mnt/ssd_projects/apps/mathchast_editor/migrations/001_initial.sql",
      "sha256": "c10b4d48236b5e55ab79546c82db5ab86d24c507d67a70e513aa425f643ab85c"
    },
    {
      "path": "/mnt/ssd_projects/apps/mathchast_editor/migrations/002_immutable_versions.sql",
      "sha256": "74a31c25eee6fbba4b717f8227d143e91afaa8cde33a35c290ce20b713744cfb"
    },
    {
      "path": "/mnt/ssd_projects/apps/mathchast_editor/migrations/003_session_tokens.sql",
      "sha256": "2729c0fada97a267b882b868d16123993ae0fce6f1e341036fe03360665c489b"
    },
    {
      "path": "/mnt/ssd_projects/apps/mathchast_editor/migrations/004_task_leases.sql",
      "sha256": "d08d3eb4a5e921897c4c7f0cd2814de8f902065574cac2192cd2376fdca5a6a6"
    },
    {
      "path": "/mnt/ssd_projects/apps/mathchast_editor/migrations/005_task_retry.sql",
      "sha256": "3737e71976bba70cf3fcccbeda7901d15e2b8e0bc66ae3bb6fc261f800a5331e"
    },
    {
      "path": "/mnt/ssd_projects/apps/mathchast_editor/migrations/006_audit_transition_reason.sql",
      "sha256": "ae3f91be8cee119245caaab35ee80defd6accff64b06dda2de22ff609253152b"
    },
    {
      "path": "/mnt/ssd_projects/apps/mathchast_editor/migrations/007_project_scope.sql",
      "sha256": "2e5ae4a5f8c7bb160a6ad3a2afba84e43e720b5b18ec8392be313ead0042303a"
    },
    {
      "path": "/mnt/ssd_projects/apps/d15_writer/schema.sql",
      "sha256": "28a7a53f6ace7075e908f1549d03b618f9d02625f8207ec9b8ed91730e72459"
    },
    {
      "path": "/mnt/ssd_projects/apps/d15_writer/schema_v2_agent_layer.sql",
      "sha256": "58ee775341527af749142a9901826ffaceaca3eaef69746838be2f6df10ce53c"
    }
  ],
  "runtime_units": [
    {
      "unit": "mathchast-editor-api.service",
      "active": "active",
      "enabled": "enabled",
      "working_directory": "/mnt/ssd_projects/apps/mathchast_editor",
      "exec": ".../venv/bin/uvicorn app.main:app --host 127.0.0.1 --port 8134"
    },
    {
      "unit": "mathchast-editor-worker.service",
      "active": "inactive/dead",
      "enabled": "disabled",
      "working_directory": "/mnt/ssd_projects/apps/mathchast_editor",
      "exec": ".../venv/bin/python app/worker_entrypoint.py --worker-id server2-preflight --dry-run"
    },
    {
      "unit": "d15-writer-worker.service",
      "active": "inactive/dead",
      "enabled": "disabled",
      "working_directory": "/mnt/ssd_projects/apps/d15_writer",
      "exec": ".../venv/bin/python -m d15_writer.worker"
    },
    {
      "unit": "mathchast-scrapegraph.service",
      "active": "active/running",
      "enabled": "enabled",
      "working_directory": "/mnt/ssd_projects/apps/mathchast_editor",
      "exec": ".../venv-scrapegraphai/bin/python tools/scrapegraph-helper.py"
    }
  ],
  "release_observation": {
    "public_current_index_sha256": "008fb249a6e43ca5a8b1c54f0b118e174c257a276560d4d1a216d97c9db1c063",
    "work_public_site_out_index_sha256": "fd47704ac2d3c637ee9bf9a9fd0d2423c7abefba399f6318708caa051f632ac6",
    "public_next_process": "next start --hostname 0.0.0.0 --port 3000",
    "public_next_cwd": "/app",
    "nginx_current_root": "/mnt/data10tb/sites/mathchast/current",
    "work_root": "/mnt/data10tb/sites/mathchast/work",
    "lineage_status": "PARTIAL; no immutable release receipt connected to both digests"
  }
}
