anotherim/schemas/im.conversations.android.database.ConversationsDatabase/1.json

2234 lines
67 KiB
JSON
Raw Normal View History

2023-01-10 10:05:03 +00:00
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "b6a7be8218829fd38f51dcd76cb9cccd",
2023-01-10 10:05:03 +00:00
"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, `pendingRegistration` INTEGER NOT NULL, `loggedInSuccessfully` INTEGER NOT NULL, `showErrorNotification` INTEGER NOT NULL, `rosterVersion` TEXT, `hostname` TEXT, `port` INTEGER, `directTls` INTEGER, `proxytype` TEXT, `proxyhostname` TEXT, `proxyport` INTEGER)",
2023-01-10 10:05:03 +00:00
"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": "pendingRegistration",
"columnName": "pendingRegistration",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "loggedInSuccessfully",
"columnName": "loggedInSuccessfully",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "showErrorNotification",
"columnName": "showErrorNotification",
"affinity": "INTEGER",
"notNull": true
},
2023-01-10 10:05:03 +00:00
{
"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": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"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": "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, 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
}
],
"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, `deviceId` INTEGER NOT NULL, `identityKey` 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": "identityKey",
"columnName": "identityKey",
"affinity": "BLOB",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_axolotl_identity_accountId_address_deviceId",
"unique": true,
"columnNames": [
"accountId",
"address",
"deviceId"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_axolotl_identity_accountId_address_deviceId` ON `${TABLE_NAME}` (`accountId`, `address`, `deviceId`)"
}
],
"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"
]
}
]
},
2023-01-10 10:05:03 +00:00
{
"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": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"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"
]
}
]
},
2023-01-10 10:05:03 +00:00
{
"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, `archived` 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": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "archived",
"columnName": "archived",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"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, FOREIGN KEY(`accountId`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
2023-01-10 10:05:03 +00:00
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
2023-01-16 09:45:18 +00:00
{
"fieldPath": "accountId",
"columnName": "accountId",
"affinity": "INTEGER",
"notNull": true
},
2023-01-10 10:05:03 +00:00
{
"fieldPath": "capsHash",
"columnName": "capsHash",
"affinity": "BLOB",
"notNull": false
},
{
"fieldPath": "caps2HashSha256",
"columnName": "caps2HashSha256",
2023-01-10 10:05:03 +00:00
"affinity": "BLOB",
"notNull": false
}
],
"primaryKey": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"indices": [
{
"name": "index_disco_accountId_capsHash",
2023-01-10 10:05:03 +00:00
"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"
2023-01-10 10:05:03 +00:00
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_disco_accountId_caps2HashSha256` ON `${TABLE_NAME}` (`accountId`, `caps2HashSha256`)"
2023-01-10 10:05:03 +00:00
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "disco_ext",
2023-01-19 08:17:42 +00:00
"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 )",
2023-01-10 10:05:03 +00:00
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "discoId",
"columnName": "discoId",
"affinity": "INTEGER",
"notNull": true
2023-01-19 08:17:42 +00:00
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": false
2023-01-10 10:05:03 +00:00
}
],
"primaryKey": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"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": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"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 )",
2023-01-10 10:05:03 +00:00
"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": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"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",
2023-01-10 10:05:03 +00:00
"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": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"indices": [
{
"name": "index_disco_feature_discoId",
"unique": false,
"columnNames": [
"discoId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_disco_feature_discoId` ON `${TABLE_NAME}` (`discoId`)"
}
],
"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": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"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"
]
}
]
},
2023-01-16 09:45:18 +00:00
{
"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 )",
2023-01-16 09:45:18 +00:00
"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
2023-01-16 09:45:18 +00:00
},
{
"fieldPath": "parentAddress",
"columnName": "parentAddress",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "parentNode",
"columnName": "parentNode",
2023-01-16 09:45:18 +00:00
"affinity": "TEXT",
"notNull": true
2023-01-16 09:45:18 +00:00
},
{
"fieldPath": "discoId",
"columnName": "discoId",
"affinity": "INTEGER",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_disco_item_accountId_address_node_parentAddress_parentNode",
2023-01-16 09:45:18 +00:00
"unique": true,
"columnNames": [
"accountId",
"address",
"node",
"parentAddress",
"parentNode"
2023-01-16 09:45:18 +00:00
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_disco_item_accountId_address_node_parentAddress_parentNode` ON `${TABLE_NAME}` (`accountId`, `address`, `node`, `parentAddress`, `parentNode`)"
2023-01-16 09:45:18 +00:00
},
{
"name": "index_disco_item_accountId_parentAddress",
2023-01-16 09:45:18 +00:00
"unique": false,
"columnNames": [
"accountId",
"parentAddress"
2023-01-16 09:45:18 +00:00
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_disco_item_accountId_parentAddress` ON `${TABLE_NAME}` (`accountId`, `parentAddress`)"
2023-01-16 09:45:18 +00:00
},
{
"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"
]
}
]
},
2023-01-10 10:05:03 +00:00
{
"tableName": "message",
2023-02-10 13:10:51 +00:00
"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, `messageId` TEXT, `stanzaId` TEXT, `stanzaIdVerified` INTEGER NOT NULL, `latestVersion` INTEGER, `acknowledged` 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 )",
2023-01-10 10:05:03 +00:00
"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
},
{
2023-02-10 13:10:51 +00:00
"fieldPath": "outgoing",
"columnName": "outgoing",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "toBare",
"columnName": "toBare",
2023-01-10 10:05:03 +00:00
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "toResource",
"columnName": "toResource",
"affinity": "TEXT",
"notNull": false
},
{
2023-02-10 13:10:51 +00:00
"fieldPath": "fromBare",
"columnName": "fromBare",
2023-01-10 10:05:03 +00:00
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "fromResource",
"columnName": "fromResource",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "occupantId",
"columnName": "occupantId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "messageId",
"columnName": "messageId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "stanzaId",
"columnName": "stanzaId",
"affinity": "TEXT",
"notNull": false
},
2023-02-10 13:10:51 +00:00
{
"fieldPath": "stanzaIdVerified",
"columnName": "stanzaIdVerified",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "latestVersion",
"columnName": "latestVersion",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "acknowledged",
"columnName": "acknowledged",
"affinity": "INTEGER",
"notNull": true
2023-01-10 10:05:03 +00:00
}
],
"primaryKey": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"indices": [
{
"name": "index_message_chatId",
"unique": false,
"columnNames": [
"chatId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_message_chatId` ON `${TABLE_NAME}` (`chatId`)"
2023-02-10 13:10:51 +00:00
},
{
"name": "index_message_latestVersion",
"unique": false,
"columnNames": [
"latestVersion"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_message_latestVersion` ON `${TABLE_NAME}` (`latestVersion`)"
2023-01-10 10:05:03 +00:00
}
],
"foreignKeys": [
{
"table": "chat",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"chatId"
],
"referencedColumns": [
"id"
]
2023-02-10 13:10:51 +00:00
},
{
"table": "message_version",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"latestVersion"
],
"referencedColumns": [
"id"
]
2023-01-10 10:05:03 +00:00
}
]
},
{
"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"
]
}
]
},
2023-01-10 10:05:03 +00:00
{
2023-02-10 13:10:51 +00:00
"tableName": "message_content",
2023-01-10 10:05:03 +00:00
"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": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"indices": [
{
2023-02-10 13:10:51 +00:00
"name": "index_message_content_messageVersionId",
2023-01-10 10:05:03 +00:00
"unique": false,
"columnNames": [
"messageVersionId"
],
"orders": [],
2023-02-10 13:10:51 +00:00
"createSql": "CREATE INDEX IF NOT EXISTS `index_message_content_messageVersionId` ON `${TABLE_NAME}` (`messageVersionId`)"
2023-01-10 10:05:03 +00:00
}
],
"foreignKeys": [
{
"table": "message_version",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"messageVersionId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "message_version",
2023-02-10 13:10:51 +00:00
"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, FOREIGN KEY(`messageEntityId`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
2023-01-10 10:05:03 +00:00
"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
}
],
"primaryKey": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"indices": [
{
2023-02-10 13:10:51 +00:00
"name": "index_message_version_messageEntityId",
2023-01-10 10:05:03 +00:00
"unique": false,
"columnNames": [
2023-02-10 13:10:51 +00:00
"messageEntityId"
2023-01-10 10:05:03 +00:00
],
"orders": [],
2023-02-10 13:10:51 +00:00
"createSql": "CREATE INDEX IF NOT EXISTS `index_message_version_messageEntityId` ON `${TABLE_NAME}` (`messageEntityId`)"
2023-01-10 10:05:03 +00:00
}
],
"foreignKeys": [
{
"table": "message",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
2023-02-10 13:10:51 +00:00
"messageEntityId"
2023-01-10 10:05:03 +00:00
],
"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"
]
}
]
},
2023-01-10 10:05:03 +00:00
{
"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 )",
2023-01-10 10:05:03 +00:00
"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
2023-01-10 10:05:03 +00:00
},
{
"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
2023-01-10 10:05:03 +00:00
}
],
"primaryKey": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"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`)"
2023-01-10 10:05:03 +00:00
}
],
"foreignKeys": [
{
"table": "account",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"accountId"
],
"referencedColumns": [
"id"
]
},
{
"table": "disco",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"discoId"
],
"referencedColumns": [
"id"
]
2023-01-10 10:05:03 +00:00
}
]
},
{
"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": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"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",
2023-01-15 09:11:49 +00:00
"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 )",
2023-01-10 10:05:03 +00:00
"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
},
{
2023-01-15 09:11:49 +00:00
"fieldPath": "isPendingOut",
"columnName": "isPendingOut",
2023-01-10 10:05:03 +00:00
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"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}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `rosterItemId` INTEGER NOT NULL, `name` TEXT, FOREIGN KEY(`rosterItemId`) REFERENCES `roster`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "rosterItemId",
"columnName": "rosterItemId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
2023-01-16 09:45:18 +00:00
"autoGenerate": true,
2023-01-10 10:05:03 +00:00
"columnNames": [
"id"
2023-01-16 09:45:18 +00:00
]
2023-01-10 10:05:03 +00:00
},
"indices": [
{
"name": "index_roster_group_rosterItemId",
"unique": false,
"columnNames": [
"rosterItemId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_roster_group_rosterItemId` ON `${TABLE_NAME}` (`rosterItemId`)"
}
],
"foreignKeys": [
{
"table": "roster",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"rosterItemId"
],
"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, 'b6a7be8218829fd38f51dcd76cb9cccd')"
2023-01-10 10:05:03 +00:00
]
}
}