{
  "formatVersion": 1,
  "database": {
    "version": 1,
    "identityHash": "6dad88d50705023f76f91b35349d8c60",
    "entities": [
      {
        "tableName": "hosts",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `displayName` TEXT NOT NULL, `baseUrl` TEXT NOT NULL, `allowCleartext` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, `lastSeenAt` INTEGER NOT NULL, `lastKnownStatus` TEXT NOT NULL, PRIMARY KEY(`id`))",
        "fields": [
          {
            "fieldPath": "id",
            "columnName": "id",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "displayName",
            "columnName": "displayName",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "baseUrl",
            "columnName": "baseUrl",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "allowCleartext",
            "columnName": "allowCleartext",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "enabled",
            "columnName": "enabled",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "lastSeenAt",
            "columnName": "lastSeenAt",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "lastKnownStatus",
            "columnName": "lastKnownStatus",
            "affinity": "TEXT",
            "notNull": true
          }
        ],
        "primaryKey": {
          "autoGenerate": false,
          "columnNames": [
            "id"
          ]
        },
        "indices": [],
        "foreignKeys": []
      },
      {
        "tableName": "unified_sessions",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `title` TEXT NOT NULL, `activeHostId` TEXT NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
        "fields": [
          {
            "fieldPath": "id",
            "columnName": "id",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "title",
            "columnName": "title",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "activeHostId",
            "columnName": "activeHostId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "createdAt",
            "columnName": "createdAt",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "updatedAt",
            "columnName": "updatedAt",
            "affinity": "INTEGER",
            "notNull": true
          }
        ],
        "primaryKey": {
          "autoGenerate": false,
          "columnNames": [
            "id"
          ]
        },
        "indices": [],
        "foreignKeys": []
      },
      {
        "tableName": "host_bindings",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`sessionId` TEXT NOT NULL, `hostId` TEXT NOT NULL, `durableSessionId` TEXT NOT NULL, `runtimeSessionId` TEXT NOT NULL, `lastAttachedAt` INTEGER NOT NULL, `state` TEXT NOT NULL, `syncedThroughMessageId` TEXT, `syncedAt` INTEGER, PRIMARY KEY(`sessionId`, `hostId`), FOREIGN KEY(`sessionId`) REFERENCES `unified_sessions`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
        "fields": [
          {
            "fieldPath": "sessionId",
            "columnName": "sessionId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "hostId",
            "columnName": "hostId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "durableSessionId",
            "columnName": "durableSessionId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "runtimeSessionId",
            "columnName": "runtimeSessionId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "lastAttachedAt",
            "columnName": "lastAttachedAt",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "state",
            "columnName": "state",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "syncedThroughMessageId",
            "columnName": "syncedThroughMessageId",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "syncedAt",
            "columnName": "syncedAt",
            "affinity": "INTEGER",
            "notNull": false
          }
        ],
        "primaryKey": {
          "autoGenerate": false,
          "columnNames": [
            "sessionId",
            "hostId"
          ]
        },
        "indices": [
          {
            "name": "index_host_bindings_sessionId",
            "unique": false,
            "columnNames": [
              "sessionId"
            ],
            "orders": [],
            "createSql": "CREATE INDEX IF NOT EXISTS `index_host_bindings_sessionId` ON `${TABLE_NAME}` (`sessionId`)"
          },
          {
            "name": "index_host_bindings_hostId",
            "unique": false,
            "columnNames": [
              "hostId"
            ],
            "orders": [],
            "createSql": "CREATE INDEX IF NOT EXISTS `index_host_bindings_hostId` ON `${TABLE_NAME}` (`hostId`)"
          }
        ],
        "foreignKeys": [
          {
            "table": "unified_sessions",
            "onDelete": "CASCADE",
            "onUpdate": "NO ACTION",
            "columns": [
              "sessionId"
            ],
            "referencedColumns": [
              "id"
            ]
          }
        ]
      },
      {
        "tableName": "unified_messages",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `sessionId` TEXT NOT NULL, `role` TEXT NOT NULL, `content` TEXT NOT NULL, `hostId` TEXT, `source` TEXT NOT NULL, `createdAt` INTEGER NOT NULL, `nativeMessageId` TEXT, `thinking` TEXT, `toolsJson` TEXT, `isStreaming` INTEGER NOT NULL, PRIMARY KEY(`id`), FOREIGN KEY(`sessionId`) REFERENCES `unified_sessions`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
        "fields": [
          {
            "fieldPath": "id",
            "columnName": "id",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "sessionId",
            "columnName": "sessionId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "role",
            "columnName": "role",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "content",
            "columnName": "content",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "hostId",
            "columnName": "hostId",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "source",
            "columnName": "source",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "createdAt",
            "columnName": "createdAt",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "nativeMessageId",
            "columnName": "nativeMessageId",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "thinking",
            "columnName": "thinking",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "toolsJson",
            "columnName": "toolsJson",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "isStreaming",
            "columnName": "isStreaming",
            "affinity": "INTEGER",
            "notNull": true
          }
        ],
        "primaryKey": {
          "autoGenerate": false,
          "columnNames": [
            "id"
          ]
        },
        "indices": [
          {
            "name": "index_unified_messages_sessionId",
            "unique": false,
            "columnNames": [
              "sessionId"
            ],
            "orders": [],
            "createSql": "CREATE INDEX IF NOT EXISTS `index_unified_messages_sessionId` ON `${TABLE_NAME}` (`sessionId`)"
          },
          {
            "name": "index_unified_messages_createdAt",
            "unique": false,
            "columnNames": [
              "createdAt"
            ],
            "orders": [],
            "createSql": "CREATE INDEX IF NOT EXISTS `index_unified_messages_createdAt` ON `${TABLE_NAME}` (`createdAt`)"
          }
        ],
        "foreignKeys": [
          {
            "table": "unified_sessions",
            "onDelete": "CASCADE",
            "onUpdate": "NO ACTION",
            "columns": [
              "sessionId"
            ],
            "referencedColumns": [
              "id"
            ]
          }
        ]
      }
    ],
    "views": [],
    "setupQueries": [
      "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
      "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '6dad88d50705023f76f91b35349d8c60')"
    ]
  }
}
