anotherim/app/schemas/im.conversations.android.database.ConversationsDatabase/1.json
2023-04-02 09:53:35 +02:00

2700 lines
81 KiB
JSON

{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "8be54d59ea976565ba5a4f7a9faf9109",
"entities": [
{
"tableName": "account",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `address` TEXT NOT NULL, `resource` TEXT, `randomSeed` BLOB, `enabled` INTEGER NOT NULL, `quickStartAvailable` INTEGER NOT NULL, `loginAndBind` INTEGER NOT NULL, `showErrorNotification` INTEGER NOT NULL, `rosterVersion` TEXT, `hostname` TEXT, `port` INTEGER, `directTls` INTEGER, `proxytype` TEXT, `proxyhostname` TEXT, `proxyport` INTEGER)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "resource",
"columnName": "resource",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "randomSeed",
"columnName": "randomSeed",
"affinity": "BLOB",
"notNull": false
},
{
"fieldPath": "enabled",
"columnName": "enabled",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "quickStartAvailable",
"columnName": "quickStartAvailable",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "loginAndBind",
"columnName": "loginAndBind",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "showErrorNotification",
"columnName": "showErrorNotification",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "rosterVersion",
"columnName": "rosterVersion",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "connection.hostname",
"columnName": "hostname",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "connection.port",
"columnName": "port",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "connection.directTls",
"columnName": "directTls",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "proxy.type",
"columnName": "proxytype",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "proxy.hostname",
"columnName": "proxyhostname",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "proxy.port",
"columnName": "proxyport",
"affinity": "INTEGER",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_account_address",
"unique": true,
"columnNames": [
"address"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_account_address` ON `${TABLE_NAME}` (`address`)"
}
],
"foreignKeys": []
},
{
"tableName": "archive_page",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `archive` TEXT NOT NULL, `type` TEXT NOT NULL, `start` TEXT NOT NULL, `end` TEXT NOT NULL, `reachedMaxPages` INTEGER NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "archive",
"columnName": "archive",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "start",
"columnName": "start",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "end",
"columnName": "end",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "reachedMaxPages",
"columnName": "reachedMaxPages",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_archive_page_accountId_archive_type",
"unique": true,
"columnNames": [
"accountId",
"archive",
"type"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_archive_page_accountId_archive_type` ON `${TABLE_NAME}` (`accountId`, `archive`, `type`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "avatar_additional",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `avatarId` INTEGER NOT NULL, `avatar_external_url` TEXT, `avatar_external_id` TEXT, `avatar_external_type` TEXT, `avatar_external_bytes` INTEGER NOT NULL, `avatar_external_height` INTEGER NOT NULL, `avatar_external_width` INTEGER NOT NULL, FOREIGN KEY(`avatarId`) REFERENCES `avatar`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "avatarId",
"columnName": "avatarId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "external.url",
"columnName": "avatar_external_url",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "external.id",
"columnName": "avatar_external_id",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "external.type",
"columnName": "avatar_external_type",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "external.bytes",
"columnName": "avatar_external_bytes",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "external.height",
"columnName": "avatar_external_height",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "external.width",
"columnName": "avatar_external_width",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_avatar_additional_avatarId",
"unique": false,
"columnNames": [
"avatarId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_avatar_additional_avatarId` ON `${TABLE_NAME}` (`avatarId`)"
}
],
"foreignKeys": [
{
"table": "avatar",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"avatarId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "avatar",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `address` TEXT NOT NULL, `thumb_id` TEXT, `thumb_type` TEXT, `thumb_bytes` INTEGER NOT NULL, `thumb_height` INTEGER NOT NULL, `thumb_width` INTEGER NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "thumbnail.id",
"columnName": "thumb_id",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "thumbnail.type",
"columnName": "thumb_type",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "thumbnail.bytes",
"columnName": "thumb_bytes",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "thumbnail.height",
"columnName": "thumb_height",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "thumbnail.width",
"columnName": "thumb_width",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_avatar_accountId_address",
"unique": true,
"columnNames": [
"accountId",
"address"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_avatar_accountId_address` ON `${TABLE_NAME}` (`accountId`, `address`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "axolotl_device_list",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `address` TEXT NOT NULL, `receivedAt` INTEGER NOT NULL, `errorCondition` TEXT, `isParsingIssue` INTEGER NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "receivedAt",
"columnName": "receivedAt",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "errorCondition",
"columnName": "errorCondition",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "isParsingIssue",
"columnName": "isParsingIssue",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_axolotl_device_list_accountId_address",
"unique": true,
"columnNames": [
"accountId",
"address"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_axolotl_device_list_accountId_address` ON `${TABLE_NAME}` (`accountId`, `address`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "axolotl_device_list_item",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `deviceListId` INTEGER NOT NULL, `deviceId` INTEGER, `confirmedInPep` INTEGER NOT NULL, FOREIGN KEY(`deviceListId`) REFERENCES `axolotl_device_list`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "deviceListId",
"columnName": "deviceListId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "deviceId",
"columnName": "deviceId",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "confirmedInPep",
"columnName": "confirmedInPep",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_axolotl_device_list_item_deviceListId",
"unique": false,
"columnNames": [
"deviceListId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_axolotl_device_list_item_deviceListId` ON `${TABLE_NAME}` (`deviceListId`)"
},
{
"name": "index_axolotl_device_list_item_deviceListId_deviceId",
"unique": true,
"columnNames": [
"deviceListId",
"deviceId"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_axolotl_device_list_item_deviceListId_deviceId` ON `${TABLE_NAME}` (`deviceListId`, `deviceId`)"
}
],
"foreignKeys": [
{
"table": "axolotl_device_list",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"deviceListId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "axolotl_identity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `address` TEXT NOT NULL, `identityKey` BLOB NOT NULL, `trust` TEXT NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "identityKey",
"columnName": "identityKey",
"affinity": "BLOB",
"notNull": true
},
{
"fieldPath": "trust",
"columnName": "trust",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_axolotl_identity_accountId_address_identityKey",
"unique": true,
"columnNames": [
"accountId",
"address",
"identityKey"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_axolotl_identity_accountId_address_identityKey` ON `${TABLE_NAME}` (`accountId`, `address`, `identityKey`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "axolotl_identity_key_pair",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `identityKeyPair` BLOB NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "identityKeyPair",
"columnName": "identityKeyPair",
"affinity": "BLOB",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_axolotl_identity_key_pair_accountId",
"unique": true,
"columnNames": [
"accountId"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_axolotl_identity_key_pair_accountId` ON `${TABLE_NAME}` (`accountId`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "axolotl_pre_key",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `preKeyId` INTEGER NOT NULL, `preKeyRecord` BLOB NOT NULL, `removed` INTEGER NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "preKeyId",
"columnName": "preKeyId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "preKeyRecord",
"columnName": "preKeyRecord",
"affinity": "BLOB",
"notNull": true
},
{
"fieldPath": "removed",
"columnName": "removed",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_axolotl_pre_key_accountId",
"unique": false,
"columnNames": [
"accountId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_axolotl_pre_key_accountId` ON `${TABLE_NAME}` (`accountId`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "axolotl_session",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `address` TEXT NOT NULL, `deviceId` INTEGER NOT NULL, `sessionRecord` BLOB NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "deviceId",
"columnName": "deviceId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "sessionRecord",
"columnName": "sessionRecord",
"affinity": "BLOB",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_axolotl_session_accountId_address_deviceId",
"unique": true,
"columnNames": [
"accountId",
"address",
"deviceId"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_axolotl_session_accountId_address_deviceId` ON `${TABLE_NAME}` (`accountId`, `address`, `deviceId`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "axolotl_signed_pre_key",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `signedPreKeyId` INTEGER NOT NULL, `signedPreKeyRecord` BLOB NOT NULL, `removed` INTEGER NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "signedPreKeyId",
"columnName": "signedPreKeyId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "signedPreKeyRecord",
"columnName": "signedPreKeyRecord",
"affinity": "BLOB",
"notNull": true
},
{
"fieldPath": "removed",
"columnName": "removed",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_axolotl_signed_pre_key_accountId",
"unique": false,
"columnNames": [
"accountId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_axolotl_signed_pre_key_accountId` ON `${TABLE_NAME}` (`accountId`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "blocked",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `address` TEXT NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_blocked_accountId_address",
"unique": true,
"columnNames": [
"accountId",
"address"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_blocked_accountId_address` ON `${TABLE_NAME}` (`accountId`, `address`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "bookmark",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `address` TEXT NOT NULL, `name` TEXT, `nick` TEXT, `autoJoin` INTEGER NOT NULL, `password` TEXT, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "nick",
"columnName": "nick",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "autoJoin",
"columnName": "autoJoin",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "password",
"columnName": "password",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_bookmark_accountId_address",
"unique": true,
"columnNames": [
"accountId",
"address"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_bookmark_accountId_address` ON `${TABLE_NAME}` (`accountId`, `address`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "bookmark_group",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookmarkId` INTEGER NOT NULL, `groupId` INTEGER NOT NULL, PRIMARY KEY(`bookmarkId`, `groupId`), FOREIGN KEY(`bookmarkId`) REFERENCES `bookmark`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`groupId`) REFERENCES `group`(`id`) ON UPDATE NO ACTION ON DELETE RESTRICT )",
"fields": [
{
"fieldPath": "bookmarkId",
"columnName": "bookmarkId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "groupId",
"columnName": "groupId",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"bookmarkId",
"groupId"
]
},
"indices": [
{
"name": "index_bookmark_group_groupId",
"unique": false,
"columnNames": [
"groupId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_bookmark_group_groupId` ON `${TABLE_NAME}` (`groupId`)"
}
],
"foreignKeys": [
{
"table": "bookmark",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"bookmarkId"
],
"referencedColumns": [
"id"
]
},
{
"table": "group",
"onDelete": "RESTRICT",
"onUpdate": "NO ACTION",
"columns": [
"groupId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "certificate_trust",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `scope` TEXT NOT NULL, `fingerprint` BLOB NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "scope",
"columnName": "scope",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "fingerprint",
"columnName": "fingerprint",
"affinity": "BLOB",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_certificate_trust_accountId_scope",
"unique": true,
"columnNames": [
"accountId",
"scope"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_certificate_trust_accountId_scope` ON `${TABLE_NAME}` (`accountId`, `scope`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "chat",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `address` TEXT NOT NULL, `type` TEXT NOT NULL, `archived` INTEGER NOT NULL, `mucState` TEXT, `errorCondition` TEXT, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "archived",
"columnName": "archived",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "mucState",
"columnName": "mucState",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "errorCondition",
"columnName": "errorCondition",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_chat_accountId_address",
"unique": true,
"columnNames": [
"accountId",
"address"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_chat_accountId_address` ON `${TABLE_NAME}` (`accountId`, `address`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "disco",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `capsHash` BLOB, `caps2HashSha256` BLOB, `cache` INTEGER NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "capsHash",
"columnName": "capsHash",
"affinity": "BLOB",
"notNull": false
},
{
"fieldPath": "caps2HashSha256",
"columnName": "caps2HashSha256",
"affinity": "BLOB",
"notNull": false
},
{
"fieldPath": "cache",
"columnName": "cache",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_disco_accountId_capsHash",
"unique": false,
"columnNames": [
"accountId",
"capsHash"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_disco_accountId_capsHash` ON `${TABLE_NAME}` (`accountId`, `capsHash`)"
},
{
"name": "index_disco_accountId_caps2HashSha256",
"unique": true,
"columnNames": [
"accountId",
"caps2HashSha256"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_disco_accountId_caps2HashSha256` ON `${TABLE_NAME}` (`accountId`, `caps2HashSha256`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "disco_ext",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `discoId` INTEGER NOT NULL, `type` TEXT, FOREIGN KEY(`discoId`) REFERENCES `disco`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "discoId",
"columnName": "discoId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_disco_ext_discoId",
"unique": false,
"columnNames": [
"discoId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_disco_ext_discoId` ON `${TABLE_NAME}` (`discoId`)"
}
],
"foreignKeys": [
{
"table": "disco",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"discoId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "disco_ext_field",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `extensionId` INTEGER NOT NULL, `field` TEXT, FOREIGN KEY(`extensionId`) REFERENCES `disco_ext`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "extensionId",
"columnName": "extensionId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "field",
"columnName": "field",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_disco_ext_field_extensionId",
"unique": false,
"columnNames": [
"extensionId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_disco_ext_field_extensionId` ON `${TABLE_NAME}` (`extensionId`)"
}
],
"foreignKeys": [
{
"table": "disco_ext",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"extensionId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "disco_ext_field_value",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `fieldId` INTEGER NOT NULL, `value` TEXT, FOREIGN KEY(`fieldId`) REFERENCES `disco_ext_field`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "fieldId",
"columnName": "fieldId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "value",
"columnName": "value",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_disco_ext_field_value_fieldId",
"unique": false,
"columnNames": [
"fieldId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_disco_ext_field_value_fieldId` ON `${TABLE_NAME}` (`fieldId`)"
}
],
"foreignKeys": [
{
"table": "disco_ext_field",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"fieldId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "disco_feature",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `discoId` INTEGER NOT NULL, `feature` TEXT NOT NULL, FOREIGN KEY(`discoId`) REFERENCES `disco`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "discoId",
"columnName": "discoId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "feature",
"columnName": "feature",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_disco_feature_discoId_feature",
"unique": false,
"columnNames": [
"discoId",
"feature"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_disco_feature_discoId_feature` ON `${TABLE_NAME}` (`discoId`, `feature`)"
}
],
"foreignKeys": [
{
"table": "disco",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"discoId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "disco_identity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `discoId` INTEGER NOT NULL, `category` TEXT, `type` TEXT, `name` TEXT, FOREIGN KEY(`discoId`) REFERENCES `disco`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "discoId",
"columnName": "discoId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "category",
"columnName": "category",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_disco_identity_discoId",
"unique": false,
"columnNames": [
"discoId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_disco_identity_discoId` ON `${TABLE_NAME}` (`discoId`)"
}
],
"foreignKeys": [
{
"table": "disco",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"discoId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "disco_item",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `address` TEXT NOT NULL, `node` TEXT NOT NULL, `parentAddress` TEXT NOT NULL, `parentNode` TEXT NOT NULL, `discoId` INTEGER, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`discoId`) REFERENCES `disco`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "node",
"columnName": "node",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "parentAddress",
"columnName": "parentAddress",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "parentNode",
"columnName": "parentNode",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "discoId",
"columnName": "discoId",
"affinity": "INTEGER",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_disco_item_accountId_address_node_parentAddress_parentNode",
"unique": true,
"columnNames": [
"accountId",
"address",
"node",
"parentAddress",
"parentNode"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_disco_item_accountId_address_node_parentAddress_parentNode` ON `${TABLE_NAME}` (`accountId`, `address`, `node`, `parentAddress`, `parentNode`)"
},
{
"name": "index_disco_item_accountId_parentAddress",
"unique": false,
"columnNames": [
"accountId",
"parentAddress"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_disco_item_accountId_parentAddress` ON `${TABLE_NAME}` (`accountId`, `parentAddress`)"
},
{
"name": "index_disco_item_discoId",
"unique": false,
"columnNames": [
"discoId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_disco_item_discoId` ON `${TABLE_NAME}` (`discoId`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
},
{
"table": "disco",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"discoId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "group",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `name` TEXT NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "message",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `chatId` INTEGER NOT NULL, `receivedAt` INTEGER, `sentAt` INTEGER, `outgoing` INTEGER NOT NULL, `toBare` TEXT, `toResource` TEXT, `fromBare` TEXT, `fromResource` TEXT, `occupantId` TEXT, `senderIdentity` TEXT, `messageId` TEXT, `stanzaId` TEXT, `stanzaIdVerified` INTEGER NOT NULL, `latestVersion` INTEGER, `acknowledged` INTEGER NOT NULL, `inReplyToMessageId` TEXT, `inReplyToStanzaId` TEXT, `inReplyToMessageEntityId` INTEGER, `inReplyToFallbackStart` INTEGER NOT NULL, `inReplyToFallbackEnd` INTEGER NOT NULL, FOREIGN KEY(`chatId`) REFERENCES `chat`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`latestVersion`) REFERENCES `message_version`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`inReplyToMessageEntityId`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE SET NULL )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "chatId",
"columnName": "chatId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "receivedAt",
"columnName": "receivedAt",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "sentAt",
"columnName": "sentAt",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "outgoing",
"columnName": "outgoing",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "toBare",
"columnName": "toBare",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "toResource",
"columnName": "toResource",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "fromBare",
"columnName": "fromBare",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "fromResource",
"columnName": "fromResource",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "occupantId",
"columnName": "occupantId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "senderIdentity",
"columnName": "senderIdentity",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "messageId",
"columnName": "messageId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "stanzaId",
"columnName": "stanzaId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "stanzaIdVerified",
"columnName": "stanzaIdVerified",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "latestVersion",
"columnName": "latestVersion",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "acknowledged",
"columnName": "acknowledged",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "inReplyToMessageId",
"columnName": "inReplyToMessageId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "inReplyToStanzaId",
"columnName": "inReplyToStanzaId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "inReplyToMessageEntityId",
"columnName": "inReplyToMessageEntityId",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "inReplyToFallbackStart",
"columnName": "inReplyToFallbackStart",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "inReplyToFallbackEnd",
"columnName": "inReplyToFallbackEnd",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_message_latestVersion",
"unique": false,
"columnNames": [
"latestVersion"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_message_latestVersion` ON `${TABLE_NAME}` (`latestVersion`)"
},
{
"name": "index_message_inReplyToMessageEntityId",
"unique": false,
"columnNames": [
"inReplyToMessageEntityId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_message_inReplyToMessageEntityId` ON `${TABLE_NAME}` (`inReplyToMessageEntityId`)"
},
{
"name": "index_message_chatId_receivedAt",
"unique": false,
"columnNames": [
"chatId",
"receivedAt"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_message_chatId_receivedAt` ON `${TABLE_NAME}` (`chatId`, `receivedAt`)"
}
],
"foreignKeys": [
{
"table": "chat",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"chatId"
],
"referencedColumns": [
"id"
]
},
{
"table": "message_version",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"latestVersion"
],
"referencedColumns": [
"id"
]
},
{
"table": "message",
"onDelete": "SET NULL",
"onUpdate": "NO ACTION",
"columns": [
"inReplyToMessageEntityId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "message_state",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `messageVersionId` INTEGER NOT NULL, `fromBare` TEXT NOT NULL, `fromResource` TEXT, `type` TEXT NOT NULL, `errorCondition` TEXT, `errorText` TEXT, FOREIGN KEY(`messageVersionId`) REFERENCES `message_version`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "messageVersionId",
"columnName": "messageVersionId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "fromBare",
"columnName": "fromBare",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "fromResource",
"columnName": "fromResource",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "errorCondition",
"columnName": "errorCondition",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "errorText",
"columnName": "errorText",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_message_state_messageVersionId",
"unique": false,
"columnNames": [
"messageVersionId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_message_state_messageVersionId` ON `${TABLE_NAME}` (`messageVersionId`)"
}
],
"foreignKeys": [
{
"table": "message_version",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"messageVersionId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "message_content",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `messageVersionId` INTEGER NOT NULL, `language` TEXT, `type` TEXT, `body` TEXT, `url` TEXT, FOREIGN KEY(`messageVersionId`) REFERENCES `message_version`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "messageVersionId",
"columnName": "messageVersionId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "language",
"columnName": "language",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "body",
"columnName": "body",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "url",
"columnName": "url",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_message_content_messageVersionId",
"unique": false,
"columnNames": [
"messageVersionId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_message_content_messageVersionId` ON `${TABLE_NAME}` (`messageVersionId`)"
}
],
"foreignKeys": [
{
"table": "message_version",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"messageVersionId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "message_version",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `messageEntityId` INTEGER NOT NULL, `messageId` TEXT, `stanzaId` TEXT, `modification` TEXT, `modifiedBy` TEXT, `modifiedByResource` TEXT, `occupantId` TEXT, `receivedAt` INTEGER, `encryption` TEXT, `identityKey` BLOB, FOREIGN KEY(`messageEntityId`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "messageEntityId",
"columnName": "messageEntityId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "messageId",
"columnName": "messageId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "stanzaId",
"columnName": "stanzaId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "modification",
"columnName": "modification",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "modifiedBy",
"columnName": "modifiedBy",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "modifiedByResource",
"columnName": "modifiedByResource",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "occupantId",
"columnName": "occupantId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "receivedAt",
"columnName": "receivedAt",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "encryption",
"columnName": "encryption",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "identityKey",
"columnName": "identityKey",
"affinity": "BLOB",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_message_version_messageEntityId",
"unique": false,
"columnNames": [
"messageEntityId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_message_version_messageEntityId` ON `${TABLE_NAME}` (`messageEntityId`)"
}
],
"foreignKeys": [
{
"table": "message",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"messageEntityId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "muc_status_code",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `chatId` INTEGER NOT NULL, `code` INTEGER NOT NULL, FOREIGN KEY(`chatId`) REFERENCES `chat`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "chatId",
"columnName": "chatId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "code",
"columnName": "code",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_muc_status_code_chatId",
"unique": false,
"columnNames": [
"chatId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_muc_status_code_chatId` ON `${TABLE_NAME}` (`chatId`)"
}
],
"foreignKeys": [
{
"table": "chat",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"chatId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "nick",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `address` TEXT NOT NULL, `nick` TEXT, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "nick",
"columnName": "nick",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_nick_accountId_address",
"unique": true,
"columnNames": [
"accountId",
"address"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_nick_accountId_address` ON `${TABLE_NAME}` (`accountId`, `address`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "presence",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `address` TEXT NOT NULL, `resource` TEXT NOT NULL, `type` TEXT, `show` TEXT, `status` TEXT, `vCardPhoto` TEXT, `occupantId` TEXT, `mucUserAffiliation` TEXT, `mucUserRole` TEXT, `mucUserJid` TEXT, `mucUserSelf` INTEGER NOT NULL, `discoId` INTEGER, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`discoId`) REFERENCES `disco`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "resource",
"columnName": "resource",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "show",
"columnName": "show",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "status",
"columnName": "status",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "vCardPhoto",
"columnName": "vCardPhoto",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "occupantId",
"columnName": "occupantId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mucUserAffiliation",
"columnName": "mucUserAffiliation",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mucUserRole",
"columnName": "mucUserRole",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mucUserJid",
"columnName": "mucUserJid",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mucUserSelf",
"columnName": "mucUserSelf",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "discoId",
"columnName": "discoId",
"affinity": "INTEGER",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_presence_accountId_address_resource",
"unique": true,
"columnNames": [
"accountId",
"address",
"resource"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_presence_accountId_address_resource` ON `${TABLE_NAME}` (`accountId`, `address`, `resource`)"
},
{
"name": "index_presence_discoId",
"unique": false,
"columnNames": [
"discoId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_presence_discoId` ON `${TABLE_NAME}` (`discoId`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
},
{
"table": "disco",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"discoId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "message_reaction",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `messageEntityId` INTEGER NOT NULL, `stanzaId` TEXT, `messageId` TEXT, `reactionBy` TEXT, `reactionByResource` TEXT, `occupantId` TEXT, `receivedAt` INTEGER, `reaction` TEXT, FOREIGN KEY(`messageEntityId`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "messageEntityId",
"columnName": "messageEntityId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "stanzaId",
"columnName": "stanzaId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "messageId",
"columnName": "messageId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "reactionBy",
"columnName": "reactionBy",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "reactionByResource",
"columnName": "reactionByResource",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "occupantId",
"columnName": "occupantId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "receivedAt",
"columnName": "receivedAt",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "reaction",
"columnName": "reaction",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_message_reaction_messageEntityId",
"unique": false,
"columnNames": [
"messageEntityId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_message_reaction_messageEntityId` ON `${TABLE_NAME}` (`messageEntityId`)"
}
],
"foreignKeys": [
{
"table": "message",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"messageEntityId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "roster",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `address` TEXT NOT NULL, `subscription` TEXT, `isPendingOut` INTEGER NOT NULL, `name` TEXT, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "subscription",
"columnName": "subscription",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "isPendingOut",
"columnName": "isPendingOut",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_roster_accountId_address",
"unique": true,
"columnNames": [
"accountId",
"address"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_roster_accountId_address` ON `${TABLE_NAME}` (`accountId`, `address`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "roster_group",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`rosterItemId` INTEGER NOT NULL, `groupId` INTEGER NOT NULL, PRIMARY KEY(`rosterItemId`, `groupId`), FOREIGN KEY(`rosterItemId`) REFERENCES `roster`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`groupId`) REFERENCES `group`(`id`) ON UPDATE NO ACTION ON DELETE RESTRICT )",
"fields": [
{
"fieldPath": "rosterItemId",
"columnName": "rosterItemId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "groupId",
"columnName": "groupId",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"rosterItemId",
"groupId"
]
},
"indices": [
{
"name": "index_roster_group_groupId",
"unique": false,
"columnNames": [
"groupId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_roster_group_groupId` ON `${TABLE_NAME}` (`groupId`)"
}
],
"foreignKeys": [
{
"table": "roster",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"rosterItemId"
],
"referencedColumns": [
"id"
]
},
{
"table": "group",
"onDelete": "RESTRICT",
"onUpdate": "NO ACTION",
"columns": [
"groupId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "service_record_cache",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `accountId` INTEGER NOT NULL, `domain` TEXT NOT NULL, `ip` BLOB, `hostname` TEXT, `port` INTEGER NOT NULL, `directTls` INTEGER NOT NULL, `priority` INTEGER NOT NULL, `authenticated` INTEGER NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "domain",
"columnName": "domain",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "serviceRecord.ip",
"columnName": "ip",
"affinity": "BLOB",
"notNull": false
},
{
"fieldPath": "serviceRecord.hostname",
"columnName": "hostname",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "serviceRecord.port",
"columnName": "port",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "serviceRecord.directTls",
"columnName": "directTls",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "serviceRecord.priority",
"columnName": "priority",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "serviceRecord.authenticated",
"columnName": "authenticated",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_service_record_cache_accountId_domain",
"unique": true,
"columnNames": [
"accountId",
"domain"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_service_record_cache_accountId_domain` ON `${TABLE_NAME}` (`accountId`, `domain`)"
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"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, '8be54d59ea976565ba5a4f7a9faf9109')"
]
}
}