{
  "formatVersion": 1,
  "database": {
    "version": 1,
    "identityHash": "8b1491672b4ea5147356685f2beb6908",
    "entities": [
      {
        "tableName": "conversations",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`conversationId` TEXT NOT NULL, `title` TEXT NOT NULL, `user` TEXT NOT NULL, `endpoint` TEXT, `endpointType` TEXT, `model` TEXT, `agentId` TEXT, `isArchived` INTEGER NOT NULL, `tags` TEXT NOT NULL, `iconURL` TEXT, `greeting` TEXT, `modelParams` TEXT, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, `lastSyncedAt` INTEGER NOT NULL, PRIMARY KEY(`conversationId`))",
        "fields": [
          {
            "fieldPath": "conversationId",
            "columnName": "conversationId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "title",
            "columnName": "title",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "user",
            "columnName": "user",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "endpoint",
            "columnName": "endpoint",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "endpointType",
            "columnName": "endpointType",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "model",
            "columnName": "model",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "agentId",
            "columnName": "agentId",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "isArchived",
            "columnName": "isArchived",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "tags",
            "columnName": "tags",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "iconURL",
            "columnName": "iconURL",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "greeting",
            "columnName": "greeting",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "modelParams",
            "columnName": "modelParams",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "createdAt",
            "columnName": "createdAt",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "updatedAt",
            "columnName": "updatedAt",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "lastSyncedAt",
            "columnName": "lastSyncedAt",
            "affinity": "INTEGER",
            "notNull": true
          }
        ],
        "primaryKey": {
          "autoGenerate": false,
          "columnNames": [
            "conversationId"
          ]
        },
        "indices": [
          {
            "name": "index_conversations_updatedAt",
            "unique": false,
            "columnNames": [
              "updatedAt"
            ],
            "orders": [],
            "createSql": "CREATE INDEX IF NOT EXISTS `index_conversations_updatedAt` ON `${TABLE_NAME}` (`updatedAt`)"
          },
          {
            "name": "index_conversations_isArchived",
            "unique": false,
            "columnNames": [
              "isArchived"
            ],
            "orders": [],
            "createSql": "CREATE INDEX IF NOT EXISTS `index_conversations_isArchived` ON `${TABLE_NAME}` (`isArchived`)"
          }
        ],
        "foreignKeys": []
      },
      {
        "tableName": "messages",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`messageId` TEXT NOT NULL, `conversationId` TEXT NOT NULL, `parentMessageId` TEXT, `sender` TEXT, `text` TEXT, `content` TEXT, `isCreatedByUser` INTEGER NOT NULL, `model` TEXT, `endpoint` TEXT, `iconURL` TEXT, `unfinished` INTEGER NOT NULL, `error` INTEGER NOT NULL, `finishReason` TEXT, `tokenCount` INTEGER, `feedback` TEXT, `files` TEXT, `attachments` TEXT, `metadata` TEXT, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`messageId`))",
        "fields": [
          {
            "fieldPath": "messageId",
            "columnName": "messageId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "conversationId",
            "columnName": "conversationId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "parentMessageId",
            "columnName": "parentMessageId",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "sender",
            "columnName": "sender",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "text",
            "columnName": "text",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "content",
            "columnName": "content",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "isCreatedByUser",
            "columnName": "isCreatedByUser",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "model",
            "columnName": "model",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "endpoint",
            "columnName": "endpoint",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "iconURL",
            "columnName": "iconURL",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "unfinished",
            "columnName": "unfinished",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "error",
            "columnName": "error",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "finishReason",
            "columnName": "finishReason",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "tokenCount",
            "columnName": "tokenCount",
            "affinity": "INTEGER",
            "notNull": false
          },
          {
            "fieldPath": "feedback",
            "columnName": "feedback",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "files",
            "columnName": "files",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "attachments",
            "columnName": "attachments",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "metadata",
            "columnName": "metadata",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "createdAt",
            "columnName": "createdAt",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "updatedAt",
            "columnName": "updatedAt",
            "affinity": "INTEGER",
            "notNull": true
          }
        ],
        "primaryKey": {
          "autoGenerate": false,
          "columnNames": [
            "messageId"
          ]
        },
        "indices": [
          {
            "name": "index_messages_conversationId",
            "unique": false,
            "columnNames": [
              "conversationId"
            ],
            "orders": [],
            "createSql": "CREATE INDEX IF NOT EXISTS `index_messages_conversationId` ON `${TABLE_NAME}` (`conversationId`)"
          },
          {
            "name": "index_messages_parentMessageId",
            "unique": false,
            "columnNames": [
              "parentMessageId"
            ],
            "orders": [],
            "createSql": "CREATE INDEX IF NOT EXISTS `index_messages_parentMessageId` ON `${TABLE_NAME}` (`parentMessageId`)"
          },
          {
            "name": "index_messages_createdAt",
            "unique": false,
            "columnNames": [
              "createdAt"
            ],
            "orders": [],
            "createSql": "CREATE INDEX IF NOT EXISTS `index_messages_createdAt` ON `${TABLE_NAME}` (`createdAt`)"
          }
        ],
        "foreignKeys": []
      },
      {
        "tableName": "files",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileId` TEXT NOT NULL, `user` TEXT NOT NULL, `conversationId` TEXT, `messageId` TEXT, `filename` TEXT NOT NULL, `filepath` TEXT NOT NULL, `type` TEXT NOT NULL, `bytes` INTEGER NOT NULL, `source` TEXT NOT NULL, `width` INTEGER, `height` INTEGER, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, `localPath` TEXT, PRIMARY KEY(`fileId`))",
        "fields": [
          {
            "fieldPath": "fileId",
            "columnName": "fileId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "user",
            "columnName": "user",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "conversationId",
            "columnName": "conversationId",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "messageId",
            "columnName": "messageId",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "filename",
            "columnName": "filename",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "filepath",
            "columnName": "filepath",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "type",
            "columnName": "type",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "bytes",
            "columnName": "bytes",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "source",
            "columnName": "source",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "width",
            "columnName": "width",
            "affinity": "INTEGER",
            "notNull": false
          },
          {
            "fieldPath": "height",
            "columnName": "height",
            "affinity": "INTEGER",
            "notNull": false
          },
          {
            "fieldPath": "createdAt",
            "columnName": "createdAt",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "updatedAt",
            "columnName": "updatedAt",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "localPath",
            "columnName": "localPath",
            "affinity": "TEXT",
            "notNull": false
          }
        ],
        "primaryKey": {
          "autoGenerate": false,
          "columnNames": [
            "fileId"
          ]
        },
        "indices": [
          {
            "name": "index_files_conversationId",
            "unique": false,
            "columnNames": [
              "conversationId"
            ],
            "orders": [],
            "createSql": "CREATE INDEX IF NOT EXISTS `index_files_conversationId` ON `${TABLE_NAME}` (`conversationId`)"
          },
          {
            "name": "index_files_messageId",
            "unique": false,
            "columnNames": [
              "messageId"
            ],
            "orders": [],
            "createSql": "CREATE INDEX IF NOT EXISTS `index_files_messageId` ON `${TABLE_NAME}` (`messageId`)"
          }
        ],
        "foreignKeys": []
      },
      {
        "tableName": "agents",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `name` TEXT, `description` TEXT, `avatar` TEXT, `provider` TEXT NOT NULL, `model` TEXT NOT NULL, `category` TEXT, `authorName` TEXT, `isPromoted` INTEGER NOT NULL, `conversationStarters` TEXT, `tools` TEXT, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
        "fields": [
          {
            "fieldPath": "id",
            "columnName": "id",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "name",
            "columnName": "name",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "description",
            "columnName": "description",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "avatar",
            "columnName": "avatar",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "provider",
            "columnName": "provider",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "model",
            "columnName": "model",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "category",
            "columnName": "category",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "authorName",
            "columnName": "authorName",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "isPromoted",
            "columnName": "isPromoted",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "conversationStarters",
            "columnName": "conversationStarters",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "tools",
            "columnName": "tools",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "updatedAt",
            "columnName": "updatedAt",
            "affinity": "INTEGER",
            "notNull": true
          }
        ],
        "primaryKey": {
          "autoGenerate": false,
          "columnNames": [
            "id"
          ]
        },
        "indices": [],
        "foreignKeys": []
      },
      {
        "tableName": "presets",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`presetId` TEXT NOT NULL, `title` TEXT NOT NULL, `endpoint` TEXT, `model` TEXT, `isDefault` INTEGER NOT NULL, `order` INTEGER, `params` TEXT, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`presetId`))",
        "fields": [
          {
            "fieldPath": "presetId",
            "columnName": "presetId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "title",
            "columnName": "title",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "endpoint",
            "columnName": "endpoint",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "model",
            "columnName": "model",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "isDefault",
            "columnName": "isDefault",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "order",
            "columnName": "order",
            "affinity": "INTEGER",
            "notNull": false
          },
          {
            "fieldPath": "params",
            "columnName": "params",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "createdAt",
            "columnName": "createdAt",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "updatedAt",
            "columnName": "updatedAt",
            "affinity": "INTEGER",
            "notNull": true
          }
        ],
        "primaryKey": {
          "autoGenerate": false,
          "columnNames": [
            "presetId"
          ]
        },
        "indices": [],
        "foreignKeys": []
      },
      {
        "tableName": "conversation_tags",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `tag` TEXT NOT NULL, `user` TEXT NOT NULL, `description` TEXT, `count` INTEGER NOT NULL, `position` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL)",
        "fields": [
          {
            "fieldPath": "id",
            "columnName": "id",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "tag",
            "columnName": "tag",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "user",
            "columnName": "user",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "description",
            "columnName": "description",
            "affinity": "TEXT",
            "notNull": false
          },
          {
            "fieldPath": "count",
            "columnName": "count",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "position",
            "columnName": "position",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "createdAt",
            "columnName": "createdAt",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "updatedAt",
            "columnName": "updatedAt",
            "affinity": "INTEGER",
            "notNull": true
          }
        ],
        "primaryKey": {
          "autoGenerate": true,
          "columnNames": [
            "id"
          ]
        },
        "indices": [
          {
            "name": "index_conversation_tags_tag_user",
            "unique": true,
            "columnNames": [
              "tag",
              "user"
            ],
            "orders": [],
            "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_conversation_tags_tag_user` ON `${TABLE_NAME}` (`tag`, `user`)"
          }
        ],
        "foreignKeys": []
      }
    ],
    "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, '8b1491672b4ea5147356685f2beb6908')"
    ]
  }
}