{
  "version": "7",
  "dialect": "sqlite",
  "id": "75e8ef6c-9857-4396-b2bb-afd9d81dcd23",
  "prevIds": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "ddl": [
    {
      "name": "attachment_approvals",
      "entityType": "tables"
    },
    {
      "name": "attachment_contributors",
      "entityType": "tables"
    },
    {
      "name": "attachment_versions",
      "entityType": "tables"
    },
    {
      "name": "attachments",
      "entityType": "tables"
    },
    {
      "name": "_conduit_meta",
      "entityType": "tables"
    },
    {
      "name": "_conduit_migrations",
      "entityType": "tables"
    },
    {
      "name": "conversations",
      "entityType": "tables"
    },
    {
      "name": "dead_letters",
      "entityType": "tables"
    },
    {
      "name": "delivery_jobs",
      "entityType": "tables"
    },
    {
      "name": "message_pins",
      "entityType": "tables"
    },
    {
      "name": "messages",
      "entityType": "tables"
    },
    {
      "name": "project_agent_refs",
      "entityType": "tables"
    },
    {
      "name": "topic_message_acks",
      "entityType": "tables"
    },
    {
      "name": "topic_messages",
      "entityType": "tables"
    },
    {
      "name": "topic_subscriptions",
      "entityType": "tables"
    },
    {
      "name": "topics",
      "entityType": "tables"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "attachment_approvals"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "slug",
      "entityType": "columns",
      "table": "attachment_approvals"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "reviewer_agent_id",
      "entityType": "columns",
      "table": "attachment_approvals"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'pending'",
      "generated": null,
      "name": "status",
      "entityType": "columns",
      "table": "attachment_approvals"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "comment",
      "entityType": "columns",
      "table": "attachment_approvals"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "version_reviewed",
      "entityType": "columns",
      "table": "attachment_approvals"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "entityType": "columns",
      "table": "attachment_approvals"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "updated_at",
      "entityType": "columns",
      "table": "attachment_approvals"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "slug",
      "entityType": "columns",
      "table": "attachment_contributors"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "agent_id",
      "entityType": "columns",
      "table": "attachment_contributors"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "version_count",
      "entityType": "columns",
      "table": "attachment_contributors"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "total_tokens_added",
      "entityType": "columns",
      "table": "attachment_contributors"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "total_tokens_removed",
      "entityType": "columns",
      "table": "attachment_contributors"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "first_contribution_at",
      "entityType": "columns",
      "table": "attachment_contributors"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_contribution_at",
      "entityType": "columns",
      "table": "attachment_contributors"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "slug",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "version_number",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "author_agent_id",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'patch'",
      "generated": null,
      "name": "change_type",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "patch_text",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "storage_key",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "content_hash",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "original_size",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "compressed_size",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "tokens",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "change_summary",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'[]'",
      "generated": null,
      "name": "sections_modified",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "tokens_added",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "tokens_removed",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "entityType": "columns",
      "table": "attachment_versions"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "slug",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "conversation_id",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "from_agent_id",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "blob",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "content",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "original_size",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "compressed_size",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "content_hash",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'text'",
      "generated": null,
      "name": "format",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "title",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "tokens",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "expires_at",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "storage_key",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'draft'",
      "generated": null,
      "name": "mode",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "1",
      "generated": null,
      "name": "version_count",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "1",
      "generated": null,
      "name": "current_version",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "entityType": "columns",
      "table": "attachments"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "key",
      "entityType": "columns",
      "table": "_conduit_meta"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "value",
      "entityType": "columns",
      "table": "_conduit_meta"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(strftime('%s', 'now'))",
      "generated": null,
      "name": "updated_at",
      "entityType": "columns",
      "table": "_conduit_meta"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "name",
      "entityType": "columns",
      "table": "_conduit_migrations"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "(strftime('%s', 'now'))",
      "generated": null,
      "name": "applied_at",
      "entityType": "columns",
      "table": "_conduit_migrations"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "conversations"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "participants",
      "entityType": "columns",
      "table": "conversations"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'private'",
      "generated": null,
      "name": "visibility",
      "entityType": "columns",
      "table": "conversations"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "message_count",
      "entityType": "columns",
      "table": "conversations"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_message_at",
      "entityType": "columns",
      "table": "conversations"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "entityType": "columns",
      "table": "conversations"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "updated_at",
      "entityType": "columns",
      "table": "conversations"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "dead_letters"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "message_id",
      "entityType": "columns",
      "table": "dead_letters"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "job_id",
      "entityType": "columns",
      "table": "dead_letters"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "reason",
      "entityType": "columns",
      "table": "dead_letters"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "attempts",
      "entityType": "columns",
      "table": "dead_letters"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "entityType": "columns",
      "table": "dead_letters"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "delivery_jobs"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "message_id",
      "entityType": "columns",
      "table": "delivery_jobs"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "payload",
      "entityType": "columns",
      "table": "delivery_jobs"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'pending'",
      "generated": null,
      "name": "status",
      "entityType": "columns",
      "table": "delivery_jobs"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "0",
      "generated": null,
      "name": "attempts",
      "entityType": "columns",
      "table": "delivery_jobs"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "6",
      "generated": null,
      "name": "max_attempts",
      "entityType": "columns",
      "table": "delivery_jobs"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "next_attempt_at",
      "entityType": "columns",
      "table": "delivery_jobs"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_error",
      "entityType": "columns",
      "table": "delivery_jobs"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "entityType": "columns",
      "table": "delivery_jobs"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "updated_at",
      "entityType": "columns",
      "table": "delivery_jobs"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "message_pins"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "message_id",
      "entityType": "columns",
      "table": "message_pins"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "conversation_id",
      "entityType": "columns",
      "table": "message_pins"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "pinned_by",
      "entityType": "columns",
      "table": "message_pins"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "note",
      "entityType": "columns",
      "table": "message_pins"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "entityType": "columns",
      "table": "message_pins"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "conversation_id",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "from_agent_id",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "to_agent_id",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "content",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'text'",
      "generated": null,
      "name": "content_type",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'pending'",
      "generated": null,
      "name": "status",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'[]'",
      "generated": null,
      "name": "attachments",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "group_id",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": "'{}'",
      "generated": null,
      "name": "metadata",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "reply_to",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "delivered_at",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "read_at",
      "entityType": "columns",
      "table": "messages"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "agent_id",
      "entityType": "columns",
      "table": "project_agent_refs"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "attached_at",
      "entityType": "columns",
      "table": "project_agent_refs"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "role",
      "entityType": "columns",
      "table": "project_agent_refs"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "capabilities_override",
      "entityType": "columns",
      "table": "project_agent_refs"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "last_used_at",
      "entityType": "columns",
      "table": "project_agent_refs"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": "1",
      "generated": null,
      "name": "enabled",
      "entityType": "columns",
      "table": "project_agent_refs"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "message_id",
      "entityType": "columns",
      "table": "topic_message_acks"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "subscriber_agent_id",
      "entityType": "columns",
      "table": "topic_message_acks"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "delivered_at",
      "entityType": "columns",
      "table": "topic_message_acks"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "read_at",
      "entityType": "columns",
      "table": "topic_message_acks"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "topic_messages"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "topic_id",
      "entityType": "columns",
      "table": "topic_messages"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "from_agent_id",
      "entityType": "columns",
      "table": "topic_messages"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": "'message'",
      "generated": null,
      "name": "kind",
      "entityType": "columns",
      "table": "topic_messages"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "content",
      "entityType": "columns",
      "table": "topic_messages"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "payload",
      "entityType": "columns",
      "table": "topic_messages"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "entityType": "columns",
      "table": "topic_messages"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "topic_id",
      "entityType": "columns",
      "table": "topic_subscriptions"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "agent_id",
      "entityType": "columns",
      "table": "topic_subscriptions"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "subscribed_at",
      "entityType": "columns",
      "table": "topic_subscriptions"
    },
    {
      "type": "text",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "id",
      "entityType": "columns",
      "table": "topics"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "name",
      "entityType": "columns",
      "table": "topics"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "epic_id",
      "entityType": "columns",
      "table": "topics"
    },
    {
      "type": "integer",
      "notNull": false,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "wave_id",
      "entityType": "columns",
      "table": "topics"
    },
    {
      "type": "text",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_by",
      "entityType": "columns",
      "table": "topics"
    },
    {
      "type": "integer",
      "notNull": true,
      "autoincrement": false,
      "default": null,
      "generated": null,
      "name": "created_at",
      "entityType": "columns",
      "table": "topics"
    },
    {
      "columns": [
        "slug"
      ],
      "tableTo": "attachments",
      "columnsTo": [
        "slug"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_attachment_approvals_slug_attachments_slug_fk",
      "entityType": "fks",
      "table": "attachment_approvals"
    },
    {
      "columns": [
        "slug"
      ],
      "tableTo": "attachments",
      "columnsTo": [
        "slug"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_attachment_contributors_slug_attachments_slug_fk",
      "entityType": "fks",
      "table": "attachment_contributors"
    },
    {
      "columns": [
        "slug"
      ],
      "tableTo": "attachments",
      "columnsTo": [
        "slug"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_attachment_versions_slug_attachments_slug_fk",
      "entityType": "fks",
      "table": "attachment_versions"
    },
    {
      "columns": [
        "conversation_id"
      ],
      "tableTo": "conversations",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "NO ACTION",
      "nameExplicit": false,
      "name": "fk_messages_conversation_id_conversations_id_fk",
      "entityType": "fks",
      "table": "messages"
    },
    {
      "columns": [
        "message_id"
      ],
      "tableTo": "topic_messages",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_topic_message_acks_message_id_topic_messages_id_fk",
      "entityType": "fks",
      "table": "topic_message_acks"
    },
    {
      "columns": [
        "topic_id"
      ],
      "tableTo": "topics",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_topic_messages_topic_id_topics_id_fk",
      "entityType": "fks",
      "table": "topic_messages"
    },
    {
      "columns": [
        "topic_id"
      ],
      "tableTo": "topics",
      "columnsTo": [
        "id"
      ],
      "onUpdate": "NO ACTION",
      "onDelete": "CASCADE",
      "nameExplicit": false,
      "name": "fk_topic_subscriptions_topic_id_topics_id_fk",
      "entityType": "fks",
      "table": "topic_subscriptions"
    },
    {
      "columns": [
        "slug",
        "agent_id"
      ],
      "nameExplicit": false,
      "name": "attachment_contributors_pk",
      "entityType": "pks",
      "table": "attachment_contributors"
    },
    {
      "columns": [
        "message_id",
        "subscriber_agent_id"
      ],
      "nameExplicit": false,
      "name": "topic_message_acks_pk",
      "entityType": "pks",
      "table": "topic_message_acks"
    },
    {
      "columns": [
        "topic_id",
        "agent_id"
      ],
      "nameExplicit": false,
      "name": "topic_subscriptions_pk",
      "entityType": "pks",
      "table": "topic_subscriptions"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "attachment_approvals_pk",
      "table": "attachment_approvals",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "attachment_versions_pk",
      "table": "attachment_versions",
      "entityType": "pks"
    },
    {
      "columns": [
        "slug"
      ],
      "nameExplicit": false,
      "name": "attachments_pk",
      "table": "attachments",
      "entityType": "pks"
    },
    {
      "columns": [
        "key"
      ],
      "nameExplicit": false,
      "name": "_conduit_meta_pk",
      "table": "_conduit_meta",
      "entityType": "pks"
    },
    {
      "columns": [
        "name"
      ],
      "nameExplicit": false,
      "name": "_conduit_migrations_pk",
      "table": "_conduit_migrations",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "conversations_pk",
      "table": "conversations",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "dead_letters_pk",
      "table": "dead_letters",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "delivery_jobs_pk",
      "table": "delivery_jobs",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "message_pins_pk",
      "table": "message_pins",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "messages_pk",
      "table": "messages",
      "entityType": "pks"
    },
    {
      "columns": [
        "agent_id"
      ],
      "nameExplicit": false,
      "name": "project_agent_refs_pk",
      "table": "project_agent_refs",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "topic_messages_pk",
      "table": "topic_messages",
      "entityType": "pks"
    },
    {
      "columns": [
        "id"
      ],
      "nameExplicit": false,
      "name": "topics_pk",
      "table": "topics",
      "entityType": "pks"
    },
    {
      "columns": [
        {
          "value": "slug",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "idx_attachment_approvals_slug",
      "entityType": "indexes",
      "table": "attachment_approvals"
    },
    {
      "columns": [
        {
          "value": "slug",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "idx_attachment_versions_slug",
      "entityType": "indexes",
      "table": "attachment_versions"
    },
    {
      "columns": [
        {
          "value": "author_agent_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "idx_attachment_versions_author",
      "entityType": "indexes",
      "table": "attachment_versions"
    },
    {
      "columns": [
        {
          "value": "conversation_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "attachments_conversation_idx",
      "entityType": "indexes",
      "table": "attachments"
    },
    {
      "columns": [
        {
          "value": "from_agent_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "attachments_agent_idx",
      "entityType": "indexes",
      "table": "attachments"
    },
    {
      "columns": [
        {
          "value": "message_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "idx_dead_letters_message",
      "entityType": "indexes",
      "table": "dead_letters"
    },
    {
      "columns": [
        {
          "value": "status",
          "isExpression": false
        },
        {
          "value": "next_attempt_at",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "idx_delivery_jobs_status",
      "entityType": "indexes",
      "table": "delivery_jobs"
    },
    {
      "columns": [
        {
          "value": "conversation_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "idx_pins_conversation",
      "entityType": "indexes",
      "table": "message_pins"
    },
    {
      "columns": [
        {
          "value": "pinned_by",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "idx_pins_agent",
      "entityType": "indexes",
      "table": "message_pins"
    },
    {
      "columns": [
        {
          "value": "conversation_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "messages_conversation_idx",
      "entityType": "indexes",
      "table": "messages"
    },
    {
      "columns": [
        {
          "value": "from_agent_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "messages_from_agent_idx",
      "entityType": "indexes",
      "table": "messages"
    },
    {
      "columns": [
        {
          "value": "to_agent_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "messages_to_agent_idx",
      "entityType": "indexes",
      "table": "messages"
    },
    {
      "columns": [
        {
          "value": "created_at",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "messages_created_at_idx",
      "entityType": "indexes",
      "table": "messages"
    },
    {
      "columns": [
        {
          "value": "group_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "idx_messages_group_id",
      "entityType": "indexes",
      "table": "messages"
    },
    {
      "columns": [
        {
          "value": "reply_to",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "idx_messages_reply_to",
      "entityType": "indexes",
      "table": "messages"
    },
    {
      "columns": [
        {
          "value": "topic_id",
          "isExpression": false
        },
        {
          "value": "created_at",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "idx_topic_messages_topic_created",
      "entityType": "indexes",
      "table": "topic_messages"
    },
    {
      "columns": [
        {
          "value": "agent_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "idx_topic_subscriptions_agent",
      "entityType": "indexes",
      "table": "topic_subscriptions"
    },
    {
      "columns": [
        {
          "value": "epic_id",
          "isExpression": false
        }
      ],
      "isUnique": false,
      "where": null,
      "origin": "manual",
      "name": "idx_topics_epic",
      "entityType": "indexes",
      "table": "topics"
    },
    {
      "columns": [
        "slug",
        "reviewer_agent_id"
      ],
      "nameExplicit": true,
      "name": "attachment_approvals_slug_reviewer_unique",
      "entityType": "uniques",
      "table": "attachment_approvals"
    },
    {
      "columns": [
        "slug",
        "version_number"
      ],
      "nameExplicit": true,
      "name": "attachment_versions_slug_version_unique",
      "entityType": "uniques",
      "table": "attachment_versions"
    },
    {
      "columns": [
        "message_id",
        "pinned_by"
      ],
      "nameExplicit": true,
      "name": "message_pins_message_pinned_by_unique",
      "entityType": "uniques",
      "table": "message_pins"
    },
    {
      "columns": [
        "name"
      ],
      "nameExplicit": false,
      "name": "topics_name_unique",
      "entityType": "uniques",
      "table": "topics"
    }
  ],
  "renames": []
}