@ -1,639 +0,0 @@ | |||
{ | |||
"formatVersion": 1, | |||
"database": { | |||
"version": 2, | |||
"identityHash": "28de77abd152c62bbdcca05efc2a6f59", | |||
"entities": [ | |||
{ | |||
"tableName": "identity", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `email` TEXT NOT NULL, `replyto` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL)", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "email", | |||
"columnName": "email", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "replyto", | |||
"columnName": "replyto", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "host", | |||
"columnName": "host", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "port", | |||
"columnName": "port", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "starttls", | |||
"columnName": "starttls", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "user", | |||
"columnName": "user", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "password", | |||
"columnName": "password", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "primary", | |||
"columnName": "primary", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [], | |||
"foreignKeys": [] | |||
}, | |||
{ | |||
"tableName": "account", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL)", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "host", | |||
"columnName": "host", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "port", | |||
"columnName": "port", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "user", | |||
"columnName": "user", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "password", | |||
"columnName": "password", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "primary", | |||
"columnName": "primary", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [], | |||
"foreignKeys": [] | |||
}, | |||
{ | |||
"tableName": "folder", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `name` TEXT NOT NULL, `type` TEXT NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "account", | |||
"columnName": "account", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "type", | |||
"columnName": "type", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "after", | |||
"columnName": "after", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_folder_account_name", | |||
"unique": true, | |||
"columnNames": [ | |||
"account", | |||
"name" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_folder_account_name` ON `${TABLE_NAME}` (`account`, `name`)" | |||
}, | |||
{ | |||
"name": "index_folder_account", | |||
"unique": false, | |||
"columnNames": [ | |||
"account" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_account` ON `${TABLE_NAME}` (`account`)" | |||
}, | |||
{ | |||
"name": "index_folder_name", | |||
"unique": false, | |||
"columnNames": [ | |||
"name" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_name` ON `${TABLE_NAME}` (`name`)" | |||
}, | |||
{ | |||
"name": "index_folder_type", | |||
"unique": false, | |||
"columnNames": [ | |||
"type" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_type` ON `${TABLE_NAME}` (`type`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "account", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"account" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "message", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `folder` INTEGER NOT NULL, `identity` INTEGER, `replying` INTEGER, `uid` INTEGER, `msgid` TEXT, `references` TEXT, `inreplyto` TEXT, `thread` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `subject` TEXT, `body` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`identity`) REFERENCES `identity`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`replying`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "account", | |||
"columnName": "account", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "folder", | |||
"columnName": "folder", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "identity", | |||
"columnName": "identity", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "replying", | |||
"columnName": "replying", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "uid", | |||
"columnName": "uid", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "msgid", | |||
"columnName": "msgid", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "references", | |||
"columnName": "references", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "inreplyto", | |||
"columnName": "inreplyto", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "thread", | |||
"columnName": "thread", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "from", | |||
"columnName": "from", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "to", | |||
"columnName": "to", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "cc", | |||
"columnName": "cc", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "bcc", | |||
"columnName": "bcc", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "reply", | |||
"columnName": "reply", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "subject", | |||
"columnName": "subject", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "body", | |||
"columnName": "body", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "sent", | |||
"columnName": "sent", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "received", | |||
"columnName": "received", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "seen", | |||
"columnName": "seen", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "ui_seen", | |||
"columnName": "ui_seen", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "ui_hide", | |||
"columnName": "ui_hide", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_message_account", | |||
"unique": false, | |||
"columnNames": [ | |||
"account" | |||
], | |||
"createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)" | |||
}, | |||
{ | |||
"name": "index_message_folder", | |||
"unique": false, | |||
"columnNames": [ | |||
"folder" | |||
], | |||
"createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)" | |||
}, | |||
{ | |||
"name": "index_message_identity", | |||
"unique": false, | |||
"columnNames": [ | |||
"identity" | |||
], | |||
"createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)" | |||
}, | |||
{ | |||
"name": "index_message_replying", | |||
"unique": false, | |||
"columnNames": [ | |||
"replying" | |||
], | |||
"createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)" | |||
}, | |||
{ | |||
"name": "index_message_folder_uid", | |||
"unique": true, | |||
"columnNames": [ | |||
"folder", | |||
"uid" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)" | |||
}, | |||
{ | |||
"name": "index_message_thread", | |||
"unique": false, | |||
"columnNames": [ | |||
"thread" | |||
], | |||
"createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)" | |||
}, | |||
{ | |||
"name": "index_message_received", | |||
"unique": false, | |||
"columnNames": [ | |||
"received" | |||
], | |||
"createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "account", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"account" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "folder", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"folder" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "identity", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"identity" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"replying" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "attachment", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `message` INTEGER NOT NULL, `sequence` INTEGER NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `content` BLOB, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "message", | |||
"columnName": "message", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "sequence", | |||
"columnName": "sequence", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "type", | |||
"columnName": "type", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "content", | |||
"columnName": "content", | |||
"affinity": "BLOB", | |||
"notNull": false | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_attachment_message", | |||
"unique": false, | |||
"columnNames": [ | |||
"message" | |||
], | |||
"createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)" | |||
}, | |||
{ | |||
"name": "index_attachment_message_sequence", | |||
"unique": true, | |||
"columnNames": [ | |||
"message", | |||
"sequence" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"message" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "operation", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "message", | |||
"columnName": "message", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "args", | |||
"columnName": "args", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_operation_message", | |||
"unique": false, | |||
"columnNames": [ | |||
"message" | |||
], | |||
"createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"message" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
} | |||
], | |||
"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, \"28de77abd152c62bbdcca05efc2a6f59\")" | |||
] | |||
} | |||
} |
@ -1,651 +0,0 @@ | |||
{ | |||
"formatVersion": 1, | |||
"database": { | |||
"version": 3, | |||
"identityHash": "40fd6ebf37a522fd68104290c7f30208", | |||
"entities": [ | |||
{ | |||
"tableName": "identity", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `email` TEXT NOT NULL, `replyto` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL)", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "email", | |||
"columnName": "email", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "replyto", | |||
"columnName": "replyto", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "host", | |||
"columnName": "host", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "port", | |||
"columnName": "port", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "starttls", | |||
"columnName": "starttls", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "user", | |||
"columnName": "user", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "password", | |||
"columnName": "password", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "primary", | |||
"columnName": "primary", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [], | |||
"foreignKeys": [] | |||
}, | |||
{ | |||
"tableName": "account", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL)", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "host", | |||
"columnName": "host", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "port", | |||
"columnName": "port", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "user", | |||
"columnName": "user", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "password", | |||
"columnName": "password", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "primary", | |||
"columnName": "primary", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [], | |||
"foreignKeys": [] | |||
}, | |||
{ | |||
"tableName": "folder", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `name` TEXT NOT NULL, `type` TEXT NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "account", | |||
"columnName": "account", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "type", | |||
"columnName": "type", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "after", | |||
"columnName": "after", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_folder_account_name", | |||
"unique": true, | |||
"columnNames": [ | |||
"account", | |||
"name" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_folder_account_name` ON `${TABLE_NAME}` (`account`, `name`)" | |||
}, | |||
{ | |||
"name": "index_folder_account", | |||
"unique": false, | |||
"columnNames": [ | |||
"account" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_account` ON `${TABLE_NAME}` (`account`)" | |||
}, | |||
{ | |||
"name": "index_folder_name", | |||
"unique": false, | |||
"columnNames": [ | |||
"name" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_name` ON `${TABLE_NAME}` (`name`)" | |||
}, | |||
{ | |||
"name": "index_folder_type", | |||
"unique": false, | |||
"columnNames": [ | |||
"type" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_type` ON `${TABLE_NAME}` (`type`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "account", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"account" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "message", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `folder` INTEGER NOT NULL, `identity` INTEGER, `replying` INTEGER, `uid` INTEGER, `msgid` TEXT, `references` TEXT, `inreplyto` TEXT, `thread` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `subject` TEXT, `body` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`identity`) REFERENCES `identity`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`replying`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "account", | |||
"columnName": "account", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "folder", | |||
"columnName": "folder", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "identity", | |||
"columnName": "identity", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "replying", | |||
"columnName": "replying", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "uid", | |||
"columnName": "uid", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "msgid", | |||
"columnName": "msgid", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "references", | |||
"columnName": "references", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "inreplyto", | |||
"columnName": "inreplyto", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "thread", | |||
"columnName": "thread", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "from", | |||
"columnName": "from", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "to", | |||
"columnName": "to", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "cc", | |||
"columnName": "cc", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "bcc", | |||
"columnName": "bcc", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "reply", | |||
"columnName": "reply", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "subject", | |||
"columnName": "subject", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "body", | |||
"columnName": "body", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "sent", | |||
"columnName": "sent", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "received", | |||
"columnName": "received", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "seen", | |||
"columnName": "seen", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "ui_seen", | |||
"columnName": "ui_seen", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "ui_hide", | |||
"columnName": "ui_hide", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_message_account", | |||
"unique": false, | |||
"columnNames": [ | |||
"account" | |||
], | |||
"createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)" | |||
}, | |||
{ | |||
"name": "index_message_folder", | |||
"unique": false, | |||
"columnNames": [ | |||
"folder" | |||
], | |||
"createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)" | |||
}, | |||
{ | |||
"name": "index_message_identity", | |||
"unique": false, | |||
"columnNames": [ | |||
"identity" | |||
], | |||
"createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)" | |||
}, | |||
{ | |||
"name": "index_message_replying", | |||
"unique": false, | |||
"columnNames": [ | |||
"replying" | |||
], | |||
"createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)" | |||
}, | |||
{ | |||
"name": "index_message_folder_uid", | |||
"unique": true, | |||
"columnNames": [ | |||
"folder", | |||
"uid" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)" | |||
}, | |||
{ | |||
"name": "index_message_thread", | |||
"unique": false, | |||
"columnNames": [ | |||
"thread" | |||
], | |||
"createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)" | |||
}, | |||
{ | |||
"name": "index_message_received", | |||
"unique": false, | |||
"columnNames": [ | |||
"received" | |||
], | |||
"createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "account", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"account" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "folder", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"folder" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "identity", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"identity" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"replying" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "attachment", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `message` INTEGER NOT NULL, `sequence` INTEGER NOT NULL, `name` TEXT, `type` TEXT NOT NULL, `size` INTEGER, `progress` INTEGER, `content` BLOB, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "message", | |||
"columnName": "message", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "sequence", | |||
"columnName": "sequence", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "type", | |||
"columnName": "type", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "size", | |||
"columnName": "size", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "progress", | |||
"columnName": "progress", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "content", | |||
"columnName": "content", | |||
"affinity": "BLOB", | |||
"notNull": false | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_attachment_message", | |||
"unique": false, | |||
"columnNames": [ | |||
"message" | |||
], | |||
"createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)" | |||
}, | |||
{ | |||
"name": "index_attachment_message_sequence", | |||
"unique": true, | |||
"columnNames": [ | |||
"message", | |||
"sequence" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"message" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "operation", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "message", | |||
"columnName": "message", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "args", | |||
"columnName": "args", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_operation_message", | |||
"unique": false, | |||
"columnNames": [ | |||
"message" | |||
], | |||
"createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"message" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
} | |||
], | |||
"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, \"40fd6ebf37a522fd68104290c7f30208\")" | |||
] | |||
} | |||
} |
@ -1,659 +0,0 @@ | |||
{ | |||
"formatVersion": 1, | |||
"database": { | |||
"version": 4, | |||
"identityHash": "ed5cc04cd8d171bff391cd8435cc29fe", | |||
"entities": [ | |||
{ | |||
"tableName": "identity", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `email` TEXT NOT NULL, `replyto` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL)", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "email", | |||
"columnName": "email", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "replyto", | |||
"columnName": "replyto", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "host", | |||
"columnName": "host", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "port", | |||
"columnName": "port", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "starttls", | |||
"columnName": "starttls", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "user", | |||
"columnName": "user", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "password", | |||
"columnName": "password", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "primary", | |||
"columnName": "primary", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [], | |||
"foreignKeys": [] | |||
}, | |||
{ | |||
"tableName": "account", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL)", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "host", | |||
"columnName": "host", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "port", | |||
"columnName": "port", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "user", | |||
"columnName": "user", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "password", | |||
"columnName": "password", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "primary", | |||
"columnName": "primary", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [], | |||
"foreignKeys": [] | |||
}, | |||
{ | |||
"tableName": "folder", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `name` TEXT NOT NULL, `type` TEXT NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "account", | |||
"columnName": "account", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "type", | |||
"columnName": "type", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "after", | |||
"columnName": "after", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_folder_account_name", | |||
"unique": true, | |||
"columnNames": [ | |||
"account", | |||
"name" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_folder_account_name` ON `${TABLE_NAME}` (`account`, `name`)" | |||
}, | |||
{ | |||
"name": "index_folder_account", | |||
"unique": false, | |||
"columnNames": [ | |||
"account" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_account` ON `${TABLE_NAME}` (`account`)" | |||
}, | |||
{ | |||
"name": "index_folder_name", | |||
"unique": false, | |||
"columnNames": [ | |||
"name" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_name` ON `${TABLE_NAME}` (`name`)" | |||
}, | |||
{ | |||
"name": "index_folder_type", | |||
"unique": false, | |||
"columnNames": [ | |||
"type" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_type` ON `${TABLE_NAME}` (`type`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "account", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"account" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "message", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `folder` INTEGER NOT NULL, `identity` INTEGER, `replying` INTEGER, `uid` INTEGER, `msgid` TEXT, `references` TEXT, `inreplyto` TEXT, `thread` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `subject` TEXT, `body` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`identity`) REFERENCES `identity`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`replying`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "account", | |||
"columnName": "account", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "folder", | |||
"columnName": "folder", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "identity", | |||
"columnName": "identity", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "replying", | |||
"columnName": "replying", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "uid", | |||
"columnName": "uid", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "msgid", | |||
"columnName": "msgid", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "references", | |||
"columnName": "references", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "inreplyto", | |||
"columnName": "inreplyto", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "thread", | |||
"columnName": "thread", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "from", | |||
"columnName": "from", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "to", | |||
"columnName": "to", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "cc", | |||
"columnName": "cc", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "bcc", | |||
"columnName": "bcc", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "reply", | |||
"columnName": "reply", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "subject", | |||
"columnName": "subject", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "body", | |||
"columnName": "body", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "sent", | |||
"columnName": "sent", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "received", | |||
"columnName": "received", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "seen", | |||
"columnName": "seen", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "ui_seen", | |||
"columnName": "ui_seen", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "ui_hide", | |||
"columnName": "ui_hide", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_message_account", | |||
"unique": false, | |||
"columnNames": [ | |||
"account" | |||
], | |||
"createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)" | |||
}, | |||
{ | |||
"name": "index_message_folder", | |||
"unique": false, | |||
"columnNames": [ | |||
"folder" | |||
], | |||
"createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)" | |||
}, | |||
{ | |||
"name": "index_message_identity", | |||
"unique": false, | |||
"columnNames": [ | |||
"identity" | |||
], | |||
"createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)" | |||
}, | |||
{ | |||
"name": "index_message_replying", | |||
"unique": false, | |||
"columnNames": [ | |||
"replying" | |||
], | |||
"createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)" | |||
}, | |||
{ | |||
"name": "index_message_folder_uid", | |||
"unique": true, | |||
"columnNames": [ | |||
"folder", | |||
"uid" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)" | |||
}, | |||
{ | |||
"name": "index_message_thread", | |||
"unique": false, | |||
"columnNames": [ | |||
"thread" | |||
], | |||
"createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)" | |||
}, | |||
{ | |||
"name": "index_message_received", | |||
"unique": false, | |||
"columnNames": [ | |||
"received" | |||
], | |||
"createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)" | |||
}, | |||
{ | |||
"name": "index_message_ui_seen", | |||
"unique": false, | |||
"columnNames": [ | |||
"ui_seen" | |||
], | |||
"createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "account", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"account" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "folder", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"folder" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "identity", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"identity" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"replying" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "attachment", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `message` INTEGER NOT NULL, `sequence` INTEGER NOT NULL, `name` TEXT, `type` TEXT NOT NULL, `size` INTEGER, `progress` INTEGER, `content` BLOB, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "message", | |||
"columnName": "message", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "sequence", | |||
"columnName": "sequence", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "type", | |||
"columnName": "type", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "size", | |||
"columnName": "size", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "progress", | |||
"columnName": "progress", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "content", | |||
"columnName": "content", | |||
"affinity": "BLOB", | |||
"notNull": false | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_attachment_message", | |||
"unique": false, | |||
"columnNames": [ | |||
"message" | |||
], | |||
"createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)" | |||
}, | |||
{ | |||
"name": "index_attachment_message_sequence", | |||
"unique": true, | |||
"columnNames": [ | |||
"message", | |||
"sequence" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"message" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "operation", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "message", | |||
"columnName": "message", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "args", | |||
"columnName": "args", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_operation_message", | |||
"unique": false, | |||
"columnNames": [ | |||
"message" | |||
], | |||
"createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"message" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
} | |||
], | |||
"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, \"ed5cc04cd8d171bff391cd8435cc29fe\")" | |||
] | |||
} | |||
} |
@ -1,667 +0,0 @@ | |||
{ | |||
"formatVersion": 1, | |||
"database": { | |||
"version": 5, | |||
"identityHash": "b14a2bd7371400904e10cb3dd32a5d98", | |||
"entities": [ | |||
{ | |||
"tableName": "identity", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `email` TEXT NOT NULL, `replyto` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL)", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "email", | |||
"columnName": "email", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "replyto", | |||
"columnName": "replyto", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "host", | |||
"columnName": "host", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "port", | |||
"columnName": "port", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "starttls", | |||
"columnName": "starttls", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "user", | |||
"columnName": "user", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "password", | |||
"columnName": "password", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "primary", | |||
"columnName": "primary", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [], | |||
"foreignKeys": [] | |||
}, | |||
{ | |||
"tableName": "account", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL)", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "host", | |||
"columnName": "host", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "port", | |||
"columnName": "port", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "user", | |||
"columnName": "user", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "password", | |||
"columnName": "password", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "primary", | |||
"columnName": "primary", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [], | |||
"foreignKeys": [] | |||
}, | |||
{ | |||
"tableName": "folder", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `name` TEXT NOT NULL, `type` TEXT NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "account", | |||
"columnName": "account", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "type", | |||
"columnName": "type", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "after", | |||
"columnName": "after", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_folder_account_name", | |||
"unique": true, | |||
"columnNames": [ | |||
"account", | |||
"name" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_folder_account_name` ON `${TABLE_NAME}` (`account`, `name`)" | |||
}, | |||
{ | |||
"name": "index_folder_account", | |||
"unique": false, | |||
"columnNames": [ | |||
"account" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_account` ON `${TABLE_NAME}` (`account`)" | |||
}, | |||
{ | |||
"name": "index_folder_name", | |||
"unique": false, | |||
"columnNames": [ | |||
"name" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_name` ON `${TABLE_NAME}` (`name`)" | |||
}, | |||
{ | |||
"name": "index_folder_type", | |||
"unique": false, | |||
"columnNames": [ | |||
"type" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_type` ON `${TABLE_NAME}` (`type`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "account", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"account" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "message", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `folder` INTEGER NOT NULL, `identity` INTEGER, `replying` INTEGER, `uid` INTEGER, `msgid` TEXT, `references` TEXT, `inreplyto` TEXT, `thread` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `subject` TEXT, `body` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`identity`) REFERENCES `identity`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`replying`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "account", | |||
"columnName": "account", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "folder", | |||
"columnName": "folder", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "identity", | |||
"columnName": "identity", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "replying", | |||
"columnName": "replying", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "uid", | |||
"columnName": "uid", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "msgid", | |||
"columnName": "msgid", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "references", | |||
"columnName": "references", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "inreplyto", | |||
"columnName": "inreplyto", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "thread", | |||
"columnName": "thread", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "from", | |||
"columnName": "from", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "to", | |||
"columnName": "to", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "cc", | |||
"columnName": "cc", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "bcc", | |||
"columnName": "bcc", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "reply", | |||
"columnName": "reply", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "subject", | |||
"columnName": "subject", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "body", | |||
"columnName": "body", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "sent", | |||
"columnName": "sent", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "received", | |||
"columnName": "received", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "seen", | |||
"columnName": "seen", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "ui_seen", | |||
"columnName": "ui_seen", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "ui_hide", | |||
"columnName": "ui_hide", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_message_account", | |||
"unique": false, | |||
"columnNames": [ | |||
"account" | |||
], | |||
"createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)" | |||
}, | |||
{ | |||
"name": "index_message_folder", | |||
"unique": false, | |||
"columnNames": [ | |||
"folder" | |||
], | |||
"createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)" | |||
}, | |||
{ | |||
"name": "index_message_identity", | |||
"unique": false, | |||
"columnNames": [ | |||
"identity" | |||
], | |||
"createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)" | |||
}, | |||
{ | |||
"name": "index_message_replying", | |||
"unique": false, | |||
"columnNames": [ | |||
"replying" | |||
], | |||
"createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)" | |||
}, | |||
{ | |||
"name": "index_message_folder_uid", | |||
"unique": true, | |||
"columnNames": [ | |||
"folder", | |||
"uid" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)" | |||
}, | |||
{ | |||
"name": "index_message_thread", | |||
"unique": false, | |||
"columnNames": [ | |||
"thread" | |||
], | |||
"createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)" | |||
}, | |||
{ | |||
"name": "index_message_received", | |||
"unique": false, | |||
"columnNames": [ | |||
"received" | |||
], | |||
"createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)" | |||
}, | |||
{ | |||
"name": "index_message_ui_seen", | |||
"unique": false, | |||
"columnNames": [ | |||
"ui_seen" | |||
], | |||
"createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)" | |||
}, | |||
{ | |||
"name": "index_message_ui_hide", | |||
"unique": false, | |||
"columnNames": [ | |||
"ui_hide" | |||
], | |||
"createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "account", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"account" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "folder", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"folder" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "identity", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"identity" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"replying" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "attachment", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `message` INTEGER NOT NULL, `sequence` INTEGER NOT NULL, `name` TEXT, `type` TEXT NOT NULL, `size` INTEGER, `progress` INTEGER, `content` BLOB, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "message", | |||
"columnName": "message", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "sequence", | |||
"columnName": "sequence", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "type", | |||
"columnName": "type", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "size", | |||
"columnName": "size", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "progress", | |||
"columnName": "progress", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "content", | |||
"columnName": "content", | |||
"affinity": "BLOB", | |||
"notNull": false | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_attachment_message", | |||
"unique": false, | |||
"columnNames": [ | |||
"message" | |||
], | |||
"createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)" | |||
}, | |||
{ | |||
"name": "index_attachment_message_sequence", | |||
"unique": true, | |||
"columnNames": [ | |||
"message", | |||
"sequence" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"message" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "operation", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "message", | |||
"columnName": "message", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "args", | |||
"columnName": "args", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_operation_message", | |||
"unique": false, | |||
"columnNames": [ | |||
"message" | |||
], | |||
"createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"message" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
} | |||
], | |||
"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, \"b14a2bd7371400904e10cb3dd32a5d98\")" | |||
] | |||
} | |||
} |
@ -1,673 +0,0 @@ | |||
{ | |||
"formatVersion": 1, | |||
"database": { | |||
"version": 6, | |||
"identityHash": "5b850d93ed77b9df16fbe138b3fb2475", | |||
"entities": [ | |||
{ | |||
"tableName": "identity", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `email` TEXT NOT NULL, `replyto` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL)", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "email", | |||
"columnName": "email", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "replyto", | |||
"columnName": "replyto", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "host", | |||
"columnName": "host", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "port", | |||
"columnName": "port", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "starttls", | |||
"columnName": "starttls", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "user", | |||
"columnName": "user", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "password", | |||
"columnName": "password", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "primary", | |||
"columnName": "primary", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [], | |||
"foreignKeys": [] | |||
}, | |||
{ | |||
"tableName": "account", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `seen_until` INTEGER)", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "host", | |||
"columnName": "host", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "port", | |||
"columnName": "port", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "user", | |||
"columnName": "user", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "password", | |||
"columnName": "password", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "primary", | |||
"columnName": "primary", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "seen_until", | |||
"columnName": "seen_until", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [], | |||
"foreignKeys": [] | |||
}, | |||
{ | |||
"tableName": "folder", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `name` TEXT NOT NULL, `type` TEXT NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "account", | |||
"columnName": "account", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "type", | |||
"columnName": "type", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "synchronize", | |||
"columnName": "synchronize", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "after", | |||
"columnName": "after", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_folder_account_name", | |||
"unique": true, | |||
"columnNames": [ | |||
"account", | |||
"name" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_folder_account_name` ON `${TABLE_NAME}` (`account`, `name`)" | |||
}, | |||
{ | |||
"name": "index_folder_account", | |||
"unique": false, | |||
"columnNames": [ | |||
"account" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_account` ON `${TABLE_NAME}` (`account`)" | |||
}, | |||
{ | |||
"name": "index_folder_name", | |||
"unique": false, | |||
"columnNames": [ | |||
"name" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_name` ON `${TABLE_NAME}` (`name`)" | |||
}, | |||
{ | |||
"name": "index_folder_type", | |||
"unique": false, | |||
"columnNames": [ | |||
"type" | |||
], | |||
"createSql": "CREATE INDEX `index_folder_type` ON `${TABLE_NAME}` (`type`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "account", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"account" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "message", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `folder` INTEGER NOT NULL, `identity` INTEGER, `replying` INTEGER, `uid` INTEGER, `msgid` TEXT, `references` TEXT, `inreplyto` TEXT, `thread` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `subject` TEXT, `body` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`identity`) REFERENCES `identity`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`replying`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "account", | |||
"columnName": "account", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "folder", | |||
"columnName": "folder", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "identity", | |||
"columnName": "identity", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "replying", | |||
"columnName": "replying", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "uid", | |||
"columnName": "uid", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "msgid", | |||
"columnName": "msgid", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "references", | |||
"columnName": "references", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "inreplyto", | |||
"columnName": "inreplyto", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "thread", | |||
"columnName": "thread", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "from", | |||
"columnName": "from", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "to", | |||
"columnName": "to", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "cc", | |||
"columnName": "cc", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "bcc", | |||
"columnName": "bcc", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "reply", | |||
"columnName": "reply", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "subject", | |||
"columnName": "subject", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "body", | |||
"columnName": "body", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "sent", | |||
"columnName": "sent", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "received", | |||
"columnName": "received", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "seen", | |||
"columnName": "seen", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "ui_seen", | |||
"columnName": "ui_seen", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "ui_hide", | |||
"columnName": "ui_hide", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_message_account", | |||
"unique": false, | |||
"columnNames": [ | |||
"account" | |||
], | |||
"createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)" | |||
}, | |||
{ | |||
"name": "index_message_folder", | |||
"unique": false, | |||
"columnNames": [ | |||
"folder" | |||
], | |||
"createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)" | |||
}, | |||
{ | |||
"name": "index_message_identity", | |||
"unique": false, | |||
"columnNames": [ | |||
"identity" | |||
], | |||
"createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)" | |||
}, | |||
{ | |||
"name": "index_message_replying", | |||
"unique": false, | |||
"columnNames": [ | |||
"replying" | |||
], | |||
"createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)" | |||
}, | |||
{ | |||
"name": "index_message_folder_uid", | |||
"unique": true, | |||
"columnNames": [ | |||
"folder", | |||
"uid" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)" | |||
}, | |||
{ | |||
"name": "index_message_thread", | |||
"unique": false, | |||
"columnNames": [ | |||
"thread" | |||
], | |||
"createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)" | |||
}, | |||
{ | |||
"name": "index_message_received", | |||
"unique": false, | |||
"columnNames": [ | |||
"received" | |||
], | |||
"createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)" | |||
}, | |||
{ | |||
"name": "index_message_ui_seen", | |||
"unique": false, | |||
"columnNames": [ | |||
"ui_seen" | |||
], | |||
"createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)" | |||
}, | |||
{ | |||
"name": "index_message_ui_hide", | |||
"unique": false, | |||
"columnNames": [ | |||
"ui_hide" | |||
], | |||
"createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "account", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"account" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "folder", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"folder" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "identity", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"identity" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
}, | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"replying" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "attachment", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `message` INTEGER NOT NULL, `sequence` INTEGER NOT NULL, `name` TEXT, `type` TEXT NOT NULL, `size` INTEGER, `progress` INTEGER, `content` BLOB, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "message", | |||
"columnName": "message", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "sequence", | |||
"columnName": "sequence", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "type", | |||
"columnName": "type", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "size", | |||
"columnName": "size", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "progress", | |||
"columnName": "progress", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "content", | |||
"columnName": "content", | |||
"affinity": "BLOB", | |||
"notNull": false | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_attachment_message", | |||
"unique": false, | |||
"columnNames": [ | |||
"message" | |||
], | |||
"createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)" | |||
}, | |||
{ | |||
"name": "index_attachment_message_sequence", | |||
"unique": true, | |||
"columnNames": [ | |||
"message", | |||
"sequence" | |||
], | |||
"createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"message" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
}, | |||
{ | |||
"tableName": "operation", | |||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", | |||
"fields": [ | |||
{ | |||
"fieldPath": "id", | |||
"columnName": "id", | |||
"affinity": "INTEGER", | |||
"notNull": false | |||
}, | |||
{ | |||
"fieldPath": "message", | |||
"columnName": "message", | |||
"affinity": "INTEGER", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "name", | |||
"columnName": "name", | |||
"affinity": "TEXT", | |||
"notNull": true | |||
}, | |||
{ | |||
"fieldPath": "args", | |||
"columnName": "args", | |||
"affinity": "TEXT", | |||
"notNull": false | |||
} | |||
], | |||
"primaryKey": { | |||
"columnNames": [ | |||
"id" | |||
], | |||
"autoGenerate": true | |||
}, | |||
"indices": [ | |||
{ | |||
"name": "index_operation_message", | |||
"unique": false, | |||
"columnNames": [ | |||
"message" | |||
], | |||
"createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" | |||
} | |||
], | |||
"foreignKeys": [ | |||
{ | |||
"table": "message", | |||
"onDelete": "CASCADE", | |||
"onUpdate": "NO ACTION", | |||
"columns": [ | |||
"message" | |||
], | |||
"referencedColumns": [ | |||
"id" | |||
] | |||
} | |||
] | |||
} | |||
], | |||
"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, \"5b850d93ed77b9df16fbe138b3fb2475\")" | |||
] | |||
} | |||
} |
@ -0,0 +1,92 @@ | |||
package eu.faircode.email; | |||
import android.content.Context; | |||
import android.os.Bundle; | |||
import android.util.Log; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
import androidx.fragment.app.Fragment; | |||
import androidx.loader.app.LoaderManager; | |||
import androidx.loader.content.AsyncTaskLoader; | |||
import androidx.loader.content.Loader; | |||
public abstract class SimpleLoader { | |||
private Context context; | |||
private LoaderManager manager; | |||
public void load(AppCompatActivity activity, int id, Bundle args) { | |||
this.context = activity; | |||
this.manager = LoaderManager.getInstance(activity); | |||
manager.restartLoader(id, args, callbacks).forceLoad(); | |||
} | |||
public void load(Fragment fragment, int id, Bundle args) { | |||
this.context = fragment.getContext(); | |||
this.manager = LoaderManager.getInstance(fragment); | |||
manager.restartLoader(id, args, callbacks).forceLoad(); | |||
} | |||
public Object onLoad(Bundle args) { | |||
return null; | |||
} | |||
public void onLoaded(Bundle args, Result result) { | |||
} | |||
private static class CommonLoader extends AsyncTaskLoader<Result> { | |||
Bundle args; | |||
SimpleLoader loader; | |||
CommonLoader(Context context) { | |||
super(context); | |||
} | |||
void setArgs(Bundle args, SimpleLoader x) { | |||
this.args = args; | |||
this.loader = x; | |||
} | |||
@Override | |||
public Result loadInBackground() { | |||
Result result = new Result(); | |||
try { | |||
result.data = loader.onLoad(args); | |||
} catch (Throwable ex) { | |||
Log.e(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex)); | |||
result.ex = ex; | |||
} | |||
return result; | |||
} | |||
} | |||
private LoaderManager.LoaderCallbacks callbacks = new LoaderManager.LoaderCallbacks<Result>() { | |||
@Override | |||
public Loader<Result> onCreateLoader(int id, Bundle args) { | |||
CommonLoader loader = new CommonLoader(context); | |||
loader.setArgs(args, SimpleLoader.this); | |||
return loader; | |||
} | |||
@Override | |||
public void onLoadFinished(Loader<Result> loader, Result data) { | |||
manager.destroyLoader(loader.getId()); | |||
CommonLoader common = (CommonLoader) loader; | |||
onLoaded(common.args, data); | |||
common.args = null; | |||
common.loader = null; | |||
manager = null; | |||
} | |||
@Override | |||
public void onLoaderReset(Loader<Result> loader) { | |||
} | |||
}; | |||
public static class Result { | |||
Throwable ex; | |||
Object data; | |||
} | |||
} |
@ -1,24 +0,0 @@ | |||
package eu.faircode.email; | |||
/* | |||
This file is part of Safe email. | |||
Safe email is free software: you can redistribute it and/or modify | |||
it under the terms of the GNU General Public License as published by | |||
the Free Software Foundation, either version 3 of the License, or | |||
(at your option) any later version. | |||
NetGuard is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
GNU General Public License for more details. | |||
You should have received a copy of the GNU General Public License | |||
along with NetGuard. If not, see <http://www.gnu.org/licenses/>. | |||
Copyright 2018 by Marcel Bokhorst (M66B) | |||
*/ | |||
public class TupleOperationEx extends EntityOperation { | |||
public Long uid; | |||
} |