"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 )",
"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 )",
"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 )",
"createSql":"CREATE UNIQUE INDEX IF NOT EXISTS `index_axolotl_identity_accountId_address_identityKey` ON `${TABLE_NAME}` (`accountId`, `address`, `identityKey`)"
"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 )",
"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 )",
"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`)"
"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 )",
"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`)"
"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`)"
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"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 )",
"createSql":"CREATE UNIQUE INDEX IF NOT EXISTS `index_disco_item_accountId_address_node_parentAddress_parentNode` ON `${TABLE_NAME}` (`accountId`, `address`, `node`, `parentAddress`, `parentNode`)"
"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`)"
"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`)"
"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 )",
"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 )",
"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 )",