From 0d323a53f2f622620186775ba322c67455076000 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 13 Nov 2018 10:05:33 +0100 Subject: [PATCH] Destructive database restructuring --- app/schemas/eu.faircode.email.DB/1.json | 319 ++++- app/schemas/eu.faircode.email.DB/10.json | 919 -------------- app/schemas/eu.faircode.email.DB/11.json | 925 -------------- app/schemas/eu.faircode.email.DB/12.json | 937 --------------- app/schemas/eu.faircode.email.DB/13.json | 943 --------------- app/schemas/eu.faircode.email.DB/14.json | 949 --------------- app/schemas/eu.faircode.email.DB/15.json | 964 --------------- app/schemas/eu.faircode.email.DB/16.json | 976 --------------- app/schemas/eu.faircode.email.DB/17.json | 982 --------------- app/schemas/eu.faircode.email.DB/18.json | 988 --------------- app/schemas/eu.faircode.email.DB/19.json | 994 --------------- app/schemas/eu.faircode.email.DB/2.json | 794 ------------ app/schemas/eu.faircode.email.DB/20.json | 1000 --------------- app/schemas/eu.faircode.email.DB/21.json | 1014 ---------------- app/schemas/eu.faircode.email.DB/22.json | 1016 ---------------- app/schemas/eu.faircode.email.DB/23.json | 1034 ---------------- app/schemas/eu.faircode.email.DB/24.json | 1040 ---------------- app/schemas/eu.faircode.email.DB/25.json | 1046 ---------------- app/schemas/eu.faircode.email.DB/26.json | 1052 ---------------- app/schemas/eu.faircode.email.DB/27.json | 1067 ----------------- app/schemas/eu.faircode.email.DB/28.json | 1067 ----------------- app/schemas/eu.faircode.email.DB/3.json | 800 ------------ app/schemas/eu.faircode.email.DB/4.json | 832 ------------- app/schemas/eu.faircode.email.DB/5.json | 844 ------------- app/schemas/eu.faircode.email.DB/6.json | 850 ------------- app/schemas/eu.faircode.email.DB/7.json | 891 -------------- app/schemas/eu.faircode.email.DB/8.json | 899 -------------- app/schemas/eu.faircode.email.DB/9.json | 905 -------------- app/src/main/java/eu/faircode/email/DB.java | 31 +- .../java/eu/faircode/email/EntityAccount.java | 3 - .../java/eu/faircode/email/EntityFolder.java | 5 - .../eu/faircode/email/EntityIdentity.java | 6 + .../eu/faircode/email/FragmentAccount.java | 2 - .../java/eu/faircode/email/FragmentSetup.java | 1 - 34 files changed, 311 insertions(+), 25784 deletions(-) delete mode 100644 app/schemas/eu.faircode.email.DB/10.json delete mode 100644 app/schemas/eu.faircode.email.DB/11.json delete mode 100644 app/schemas/eu.faircode.email.DB/12.json delete mode 100644 app/schemas/eu.faircode.email.DB/13.json delete mode 100644 app/schemas/eu.faircode.email.DB/14.json delete mode 100644 app/schemas/eu.faircode.email.DB/15.json delete mode 100644 app/schemas/eu.faircode.email.DB/16.json delete mode 100644 app/schemas/eu.faircode.email.DB/17.json delete mode 100644 app/schemas/eu.faircode.email.DB/18.json delete mode 100644 app/schemas/eu.faircode.email.DB/19.json delete mode 100644 app/schemas/eu.faircode.email.DB/2.json delete mode 100644 app/schemas/eu.faircode.email.DB/20.json delete mode 100644 app/schemas/eu.faircode.email.DB/21.json delete mode 100644 app/schemas/eu.faircode.email.DB/22.json delete mode 100644 app/schemas/eu.faircode.email.DB/23.json delete mode 100644 app/schemas/eu.faircode.email.DB/24.json delete mode 100644 app/schemas/eu.faircode.email.DB/25.json delete mode 100644 app/schemas/eu.faircode.email.DB/26.json delete mode 100644 app/schemas/eu.faircode.email.DB/27.json delete mode 100644 app/schemas/eu.faircode.email.DB/28.json delete mode 100644 app/schemas/eu.faircode.email.DB/3.json delete mode 100644 app/schemas/eu.faircode.email.DB/4.json delete mode 100644 app/schemas/eu.faircode.email.DB/5.json delete mode 100644 app/schemas/eu.faircode.email.DB/6.json delete mode 100644 app/schemas/eu.faircode.email.DB/7.json delete mode 100644 app/schemas/eu.faircode.email.DB/8.json delete mode 100644 app/schemas/eu.faircode.email.DB/9.json diff --git a/app/schemas/eu.faircode.email.DB/1.json b/app/schemas/eu.faircode.email.DB/1.json index 3b605476fa..04af5d0b81 100644 --- a/app/schemas/eu.faircode.email.DB/1.json +++ b/app/schemas/eu.faircode.email.DB/1.json @@ -2,11 +2,11 @@ "formatVersion": 1, "database": { "version": 1, - "identityHash": "1d725017559c0a36b02ce447ecba45b9", + "identityHash": "b0f7ef3e72fea0db7c06b4a9f3d370d4", "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, `account` INTEGER NOT NULL, `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, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `email` TEXT NOT NULL, `replyto` TEXT, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `sent_folder` INTEGER, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "id", @@ -45,14 +45,20 @@ "notNull": true }, { - "fieldPath": "port", - "columnName": "port", + "fieldPath": "starttls", + "columnName": "starttls", "affinity": "INTEGER", "notNull": true }, { - "fieldPath": "starttls", - "columnName": "starttls", + "fieldPath": "insecure", + "columnName": "insecure", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "port", + "columnName": "port", "affinity": "INTEGER", "notNull": true }, @@ -68,18 +74,42 @@ "affinity": "TEXT", "notNull": true }, + { + "fieldPath": "auth_type", + "columnName": "auth_type", + "affinity": "INTEGER", + "notNull": true + }, { "fieldPath": "primary", "columnName": "primary", "affinity": "INTEGER", "notNull": true }, + { + "fieldPath": "color", + "columnName": "color", + "affinity": "INTEGER", + "notNull": false + }, { "fieldPath": "synchronize", "columnName": "synchronize", "affinity": "INTEGER", "notNull": true }, + { + "fieldPath": "store_sent", + "columnName": "store_sent", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "sent_folder", + "columnName": "sent_folder", + "affinity": "INTEGER", + "notNull": false + }, { "fieldPath": "state", "columnName": "state", @@ -107,6 +137,15 @@ "account" ], "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" + }, + { + "name": "index_identity_account_email", + "unique": false, + "columnNames": [ + "account", + "email" + ], + "createSql": "CREATE INDEX `index_identity_account_email` ON `${TABLE_NAME}` (`account`, `email`)" } ], "foreignKeys": [ @@ -125,7 +164,7 @@ }, { "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, `store_sent` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `poll_interval` INTEGER NOT NULL, `created` INTEGER, `state` TEXT, `error` TEXT)", "fields": [ { "fieldPath": "id", @@ -139,12 +178,30 @@ "affinity": "TEXT", "notNull": false }, + { + "fieldPath": "signature", + "columnName": "signature", + "affinity": "TEXT", + "notNull": false + }, { "fieldPath": "host", "columnName": "host", "affinity": "TEXT", "notNull": true }, + { + "fieldPath": "starttls", + "columnName": "starttls", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "insecure", + "columnName": "insecure", + "affinity": "INTEGER", + "notNull": true + }, { "fieldPath": "port", "columnName": "port", @@ -164,8 +221,8 @@ "notNull": true }, { - "fieldPath": "primary", - "columnName": "primary", + "fieldPath": "auth_type", + "columnName": "auth_type", "affinity": "INTEGER", "notNull": true }, @@ -176,14 +233,26 @@ "notNull": true }, { - "fieldPath": "store_sent", - "columnName": "store_sent", + "fieldPath": "primary", + "columnName": "primary", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "color", + "columnName": "color", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "poll_interval", + "columnName": "poll_interval", "affinity": "INTEGER", "notNull": true }, { - "fieldPath": "seen_until", - "columnName": "seen_until", + "fieldPath": "created", + "columnName": "created", "affinity": "INTEGER", "notNull": false }, @@ -211,7 +280,7 @@ }, { "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, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", + "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, `display` TEXT, `hide` INTEGER NOT NULL, `unified` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "id", @@ -249,6 +318,24 @@ "affinity": "INTEGER", "notNull": true }, + { + "fieldPath": "display", + "columnName": "display", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "hide", + "columnName": "hide", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "unified", + "columnName": "unified", + "affinity": "INTEGER", + "notNull": true + }, { "fieldPath": "state", "columnName": "state", @@ -301,6 +388,14 @@ "type" ], "createSql": "CREATE INDEX `index_folder_type` ON `${TABLE_NAME}` (`type`)" + }, + { + "name": "index_folder_unified", + "unique": false, + "columnNames": [ + "unified" + ], + "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" } ], "foreignKeys": [ @@ -319,7 +414,7 @@ }, { "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, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `error` TEXT, 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 )", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER NOT NULL, `folder` INTEGER NOT NULL, `identity` INTEGER, `extra` TEXT, `replying` INTEGER, `uid` INTEGER, `msgid` TEXT, `references` TEXT, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `preview` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `ui_ignored` INTEGER NOT NULL, `error` TEXT, 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 SET NULL , FOREIGN KEY(`replying`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE SET NULL )", "fields": [ { "fieldPath": "id", @@ -331,7 +426,7 @@ "fieldPath": "account", "columnName": "account", "affinity": "INTEGER", - "notNull": false + "notNull": true }, { "fieldPath": "folder", @@ -345,6 +440,12 @@ "affinity": "INTEGER", "notNull": false }, + { + "fieldPath": "extra", + "columnName": "extra", + "affinity": "TEXT", + "notNull": false + }, { "fieldPath": "replying", "columnName": "replying", @@ -369,6 +470,12 @@ "affinity": "TEXT", "notNull": false }, + { + "fieldPath": "deliveredto", + "columnName": "deliveredto", + "affinity": "TEXT", + "notNull": false + }, { "fieldPath": "inreplyto", "columnName": "inreplyto", @@ -381,6 +488,12 @@ "affinity": "TEXT", "notNull": false }, + { + "fieldPath": "avatar", + "columnName": "avatar", + "affinity": "TEXT", + "notNull": false + }, { "fieldPath": "from", "columnName": "from", @@ -411,12 +524,36 @@ "affinity": "TEXT", "notNull": false }, + { + "fieldPath": "headers", + "columnName": "headers", + "affinity": "TEXT", + "notNull": false + }, { "fieldPath": "subject", "columnName": "subject", "affinity": "TEXT", "notNull": false }, + { + "fieldPath": "size", + "columnName": "size", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "content", + "columnName": "content", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "preview", + "columnName": "preview", + "affinity": "TEXT", + "notNull": false + }, { "fieldPath": "sent", "columnName": "sent", @@ -441,18 +578,42 @@ "affinity": "INTEGER", "notNull": true }, + { + "fieldPath": "flagged", + "columnName": "flagged", + "affinity": "INTEGER", + "notNull": true + }, { "fieldPath": "ui_seen", "columnName": "ui_seen", "affinity": "INTEGER", "notNull": true }, + { + "fieldPath": "ui_flagged", + "columnName": "ui_flagged", + "affinity": "INTEGER", + "notNull": true + }, { "fieldPath": "ui_hide", "columnName": "ui_hide", "affinity": "INTEGER", "notNull": true }, + { + "fieldPath": "ui_found", + "columnName": "ui_found", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "ui_ignored", + "columnName": "ui_ignored", + "affinity": "INTEGER", + "notNull": true + }, { "fieldPath": "error", "columnName": "error", @@ -500,22 +661,24 @@ "createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)" }, { - "name": "index_message_folder_uid", + "name": "index_message_folder_uid_ui_found", "unique": true, "columnNames": [ "folder", - "uid" + "uid", + "ui_found" ], - "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)" + "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid_ui_found` ON `${TABLE_NAME}` (`folder`, `uid`, `ui_found`)" }, { - "name": "index_message_msgid_folder", + "name": "index_message_msgid_folder_ui_found", "unique": true, "columnNames": [ "msgid", - "folder" + "folder", + "ui_found" ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" + "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder_ui_found` ON `${TABLE_NAME}` (`msgid`, `folder`, `ui_found`)" }, { "name": "index_message_thread", @@ -548,6 +711,22 @@ "ui_hide" ], "createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)" + }, + { + "name": "index_message_ui_found", + "unique": false, + "columnNames": [ + "ui_found" + ], + "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" + }, + { + "name": "index_message_ui_ignored", + "unique": false, + "columnNames": [ + "ui_ignored" + ], + "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)" } ], "foreignKeys": [ @@ -575,7 +754,7 @@ }, { "table": "identity", - "onDelete": "CASCADE", + "onDelete": "SET NULL", "onUpdate": "NO ACTION", "columns": [ "identity" @@ -586,7 +765,7 @@ }, { "table": "message", - "onDelete": "CASCADE", + "onDelete": "SET NULL", "onUpdate": "NO ACTION", "columns": [ "replying" @@ -599,7 +778,7 @@ }, { "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, `available` INTEGER NOT NULL, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", + "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "id", @@ -631,6 +810,12 @@ "affinity": "TEXT", "notNull": true }, + { + "fieldPath": "cid", + "columnName": "cid", + "affinity": "TEXT", + "notNull": false + }, { "fieldPath": "size", "columnName": "size", @@ -673,6 +858,15 @@ "sequence" ], "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)" + }, + { + "name": "index_attachment_message_cid", + "unique": true, + "columnNames": [ + "message", + "cid" + ], + "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" } ], "foreignKeys": [ @@ -778,11 +972,84 @@ ] } ] + }, + { + "tableName": "answer", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "text", + "columnName": "text", + "affinity": "TEXT", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "log", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "time", + "columnName": "time", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "data", + "columnName": "data", + "affinity": "TEXT", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "id" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "index_log_time", + "unique": false, + "columnNames": [ + "time" + ], + "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" + } + ], + "foreignKeys": [] } ], "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, \"1d725017559c0a36b02ce447ecba45b9\")" + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"b0f7ef3e72fea0db7c06b4a9f3d370d4\")" ] } } \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/10.json b/app/schemas/eu.faircode.email.DB/10.json deleted file mode 100644 index 85aac97782..0000000000 --- a/app/schemas/eu.faircode.email.DB/10.json +++ /dev/null @@ -1,919 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 10, - "identityHash": "8a267f8f3cb9ef409377dbdb7cb706d4", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "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, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `unified` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `headers` TEXT, `subject` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "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 - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"8a267f8f3cb9ef409377dbdb7cb706d4\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/11.json b/app/schemas/eu.faircode.email.DB/11.json deleted file mode 100644 index 1b2b489204..0000000000 --- a/app/schemas/eu.faircode.email.DB/11.json +++ /dev/null @@ -1,925 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 11, - "identityHash": "d0a6171ec8d9a64a1c65e8c7e5d0348a", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `unified` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `headers` TEXT, `subject` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "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 - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"d0a6171ec8d9a64a1c65e8c7e5d0348a\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/12.json b/app/schemas/eu.faircode.email.DB/12.json deleted file mode 100644 index 794e034e5c..0000000000 --- a/app/schemas/eu.faircode.email.DB/12.json +++ /dev/null @@ -1,937 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 12, - "identityHash": "fe661376a25d2e8b6a9f3e1fa9956daf", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `unified` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `headers` TEXT, `subject` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"fe661376a25d2e8b6a9f3e1fa9956daf\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/13.json b/app/schemas/eu.faircode.email.DB/13.json deleted file mode 100644 index 7a219317b7..0000000000 --- a/app/schemas/eu.faircode.email.DB/13.json +++ /dev/null @@ -1,943 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 13, - "identityHash": "609c343d12bd1436605f5ae63cf732c5", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `unified` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"609c343d12bd1436605f5ae63cf732c5\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/14.json b/app/schemas/eu.faircode.email.DB/14.json deleted file mode 100644 index 9c8072bf12..0000000000 --- a/app/schemas/eu.faircode.email.DB/14.json +++ /dev/null @@ -1,949 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 14, - "identityHash": "74d6e4343efd13e0b519ff94758dc902", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `unified` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"74d6e4343efd13e0b519ff94758dc902\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/15.json b/app/schemas/eu.faircode.email.DB/15.json deleted file mode 100644 index a968d2aaec..0000000000 --- a/app/schemas/eu.faircode.email.DB/15.json +++ /dev/null @@ -1,964 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 15, - "identityHash": "f993877b0277674df437d8a99e64f982", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `unified` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"f993877b0277674df437d8a99e64f982\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/16.json b/app/schemas/eu.faircode.email.DB/16.json deleted file mode 100644 index d7aaf75ff2..0000000000 --- a/app/schemas/eu.faircode.email.DB/16.json +++ /dev/null @@ -1,976 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 16, - "identityHash": "95bd1e083056fa7625f21430f7d53e2d", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `unified` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"95bd1e083056fa7625f21430f7d53e2d\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/17.json b/app/schemas/eu.faircode.email.DB/17.json deleted file mode 100644 index a4185779b2..0000000000 --- a/app/schemas/eu.faircode.email.DB/17.json +++ /dev/null @@ -1,982 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 17, - "identityHash": "e6b81c83b975dc8b1adb861a83a13856", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `unified` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "deliveredto", - "columnName": "deliveredto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "inreplyto", - "columnName": "inreplyto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "thread", - "columnName": "thread", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"e6b81c83b975dc8b1adb861a83a13856\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/18.json b/app/schemas/eu.faircode.email.DB/18.json deleted file mode 100644 index 9c4cbd227b..0000000000 --- a/app/schemas/eu.faircode.email.DB/18.json +++ /dev/null @@ -1,988 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 18, - "identityHash": "c18df689cf7aff27aefbef4d705f18a3", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `display` TEXT, `type` TEXT NOT NULL, `unified` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "display", - "columnName": "display", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "deliveredto", - "columnName": "deliveredto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "inreplyto", - "columnName": "inreplyto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "thread", - "columnName": "thread", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"c18df689cf7aff27aefbef4d705f18a3\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/19.json b/app/schemas/eu.faircode.email.DB/19.json deleted file mode 100644 index ed6723ee89..0000000000 --- a/app/schemas/eu.faircode.email.DB/19.json +++ /dev/null @@ -1,994 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 19, - "identityHash": "8be67722423e2c0044f7be118b861ea3", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `unified` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `display` TEXT, `hide` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "display", - "columnName": "display", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "hide", - "columnName": "hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "deliveredto", - "columnName": "deliveredto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "inreplyto", - "columnName": "inreplyto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "thread", - "columnName": "thread", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"8be67722423e2c0044f7be118b861ea3\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/2.json b/app/schemas/eu.faircode.email.DB/2.json deleted file mode 100644 index 25610dc4cb..0000000000 --- a/app/schemas/eu.faircode.email.DB/2.json +++ /dev/null @@ -1,794 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 2, - "identityHash": "766abd8e0d6da78fb9c652a575c13a24", - "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, `account` INTEGER NOT NULL, `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, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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 - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "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, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "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": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `state` TEXT, `error` TEXT, 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 - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `error` TEXT, 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": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "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 - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "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, \"766abd8e0d6da78fb9c652a575c13a24\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/20.json b/app/schemas/eu.faircode.email.DB/20.json deleted file mode 100644 index d556d5faad..0000000000 --- a/app/schemas/eu.faircode.email.DB/20.json +++ /dev/null @@ -1,1000 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 20, - "identityHash": "59901ffb3e1c0f5e46981357448626fa", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `poll_interval` INTEGER, `after` INTEGER NOT NULL, `display` TEXT, `hide` INTEGER NOT NULL, `unified` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "display", - "columnName": "display", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "hide", - "columnName": "hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "deliveredto", - "columnName": "deliveredto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "inreplyto", - "columnName": "inreplyto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "thread", - "columnName": "thread", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"59901ffb3e1c0f5e46981357448626fa\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/21.json b/app/schemas/eu.faircode.email.DB/21.json deleted file mode 100644 index c0448325ae..0000000000 --- a/app/schemas/eu.faircode.email.DB/21.json +++ /dev/null @@ -1,1014 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 21, - "identityHash": "0242a5b831bc703170c3222a5339126a", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `poll_interval` INTEGER, `after` INTEGER NOT NULL, `display` TEXT, `hide` INTEGER NOT NULL, `unified` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "display", - "columnName": "display", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "hide", - "columnName": "hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `ui_ignored` INTEGER NOT NULL, `error` TEXT, 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": "deliveredto", - "columnName": "deliveredto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "inreplyto", - "columnName": "inreplyto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "thread", - "columnName": "thread", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_ignored", - "columnName": "ui_ignored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - }, - { - "name": "index_message_ui_ignored", - "unique": false, - "columnNames": [ - "ui_ignored" - ], - "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"0242a5b831bc703170c3222a5339126a\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/22.json b/app/schemas/eu.faircode.email.DB/22.json deleted file mode 100644 index 43bdef703d..0000000000 --- a/app/schemas/eu.faircode.email.DB/22.json +++ /dev/null @@ -1,1016 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 22, - "identityHash": "4a69fca3293eda334465a8c9a5cda77f", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `poll_interval` INTEGER, `after` INTEGER NOT NULL, `display` TEXT, `hide` INTEGER NOT NULL, `unified` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "display", - "columnName": "display", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "hide", - "columnName": "hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `ui_ignored` INTEGER NOT NULL, `error` TEXT, 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": "deliveredto", - "columnName": "deliveredto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "inreplyto", - "columnName": "inreplyto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "thread", - "columnName": "thread", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_ignored", - "columnName": "ui_ignored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_ui_found", - "unique": true, - "columnNames": [ - "folder", - "uid", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid_ui_found` ON `${TABLE_NAME}` (`folder`, `uid`, `ui_found`)" - }, - { - "name": "index_message_msgid_folder_ui_found", - "unique": true, - "columnNames": [ - "msgid", - "folder", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder_ui_found` ON `${TABLE_NAME}` (`msgid`, `folder`, `ui_found`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - }, - { - "name": "index_message_ui_ignored", - "unique": false, - "columnNames": [ - "ui_ignored" - ], - "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"4a69fca3293eda334465a8c9a5cda77f\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/23.json b/app/schemas/eu.faircode.email.DB/23.json deleted file mode 100644 index f7e32c976f..0000000000 --- a/app/schemas/eu.faircode.email.DB/23.json +++ /dev/null @@ -1,1034 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 23, - "identityHash": "50f45495091ca49a0bcaa5fc9f827604", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "host", - "columnName": "host", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "starttls", - "columnName": "starttls", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insecure", - "columnName": "insecure", - "affinity": "INTEGER", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "host", - "columnName": "host", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "starttls", - "columnName": "starttls", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insecure", - "columnName": "insecure", - "affinity": "INTEGER", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `poll_interval` INTEGER, `after` INTEGER NOT NULL, `display` TEXT, `hide` INTEGER NOT NULL, `unified` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "display", - "columnName": "display", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "hide", - "columnName": "hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `ui_ignored` INTEGER NOT NULL, `error` TEXT, 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": "deliveredto", - "columnName": "deliveredto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "inreplyto", - "columnName": "inreplyto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "thread", - "columnName": "thread", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_ignored", - "columnName": "ui_ignored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_ui_found", - "unique": true, - "columnNames": [ - "folder", - "uid", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid_ui_found` ON `${TABLE_NAME}` (`folder`, `uid`, `ui_found`)" - }, - { - "name": "index_message_msgid_folder_ui_found", - "unique": true, - "columnNames": [ - "msgid", - "folder", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder_ui_found` ON `${TABLE_NAME}` (`msgid`, `folder`, `ui_found`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - }, - { - "name": "index_message_ui_ignored", - "unique": false, - "columnNames": [ - "ui_ignored" - ], - "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"50f45495091ca49a0bcaa5fc9f827604\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/24.json b/app/schemas/eu.faircode.email.DB/24.json deleted file mode 100644 index 26a1dd0a77..0000000000 --- a/app/schemas/eu.faircode.email.DB/24.json +++ /dev/null @@ -1,1040 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 24, - "identityHash": "5a8870d32308efb1a61b5887ad1ca274", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "host", - "columnName": "host", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "starttls", - "columnName": "starttls", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insecure", - "columnName": "insecure", - "affinity": "INTEGER", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "host", - "columnName": "host", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "starttls", - "columnName": "starttls", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insecure", - "columnName": "insecure", - "affinity": "INTEGER", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `poll_interval` INTEGER, `after` INTEGER NOT NULL, `display` TEXT, `hide` INTEGER NOT NULL, `unified` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "display", - "columnName": "display", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "hide", - "columnName": "hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `preview` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `ui_ignored` INTEGER NOT NULL, `error` TEXT, 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": "deliveredto", - "columnName": "deliveredto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "inreplyto", - "columnName": "inreplyto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "thread", - "columnName": "thread", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "preview", - "columnName": "preview", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_ignored", - "columnName": "ui_ignored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_ui_found", - "unique": true, - "columnNames": [ - "folder", - "uid", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid_ui_found` ON `${TABLE_NAME}` (`folder`, `uid`, `ui_found`)" - }, - { - "name": "index_message_msgid_folder_ui_found", - "unique": true, - "columnNames": [ - "msgid", - "folder", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder_ui_found` ON `${TABLE_NAME}` (`msgid`, `folder`, `ui_found`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - }, - { - "name": "index_message_ui_ignored", - "unique": false, - "columnNames": [ - "ui_ignored" - ], - "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"5a8870d32308efb1a61b5887ad1ca274\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/25.json b/app/schemas/eu.faircode.email.DB/25.json deleted file mode 100644 index 8c41818b95..0000000000 --- a/app/schemas/eu.faircode.email.DB/25.json +++ /dev/null @@ -1,1046 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 25, - "identityHash": "0177c252e35fe050c0bd96bfbde2a73b", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "host", - "columnName": "host", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "starttls", - "columnName": "starttls", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insecure", - "columnName": "insecure", - "affinity": "INTEGER", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `created` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "host", - "columnName": "host", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "starttls", - "columnName": "starttls", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insecure", - "columnName": "insecure", - "affinity": "INTEGER", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `poll_interval` INTEGER, `after` INTEGER NOT NULL, `display` TEXT, `hide` INTEGER NOT NULL, `unified` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "display", - "columnName": "display", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "hide", - "columnName": "hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `preview` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `ui_ignored` INTEGER NOT NULL, `error` TEXT, 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": "deliveredto", - "columnName": "deliveredto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "inreplyto", - "columnName": "inreplyto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "thread", - "columnName": "thread", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "preview", - "columnName": "preview", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_ignored", - "columnName": "ui_ignored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_ui_found", - "unique": true, - "columnNames": [ - "folder", - "uid", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid_ui_found` ON `${TABLE_NAME}` (`folder`, `uid`, `ui_found`)" - }, - { - "name": "index_message_msgid_folder_ui_found", - "unique": true, - "columnNames": [ - "msgid", - "folder", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder_ui_found` ON `${TABLE_NAME}` (`msgid`, `folder`, `ui_found`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - }, - { - "name": "index_message_ui_ignored", - "unique": false, - "columnNames": [ - "ui_ignored" - ], - "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"0177c252e35fe050c0bd96bfbde2a73b\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/26.json b/app/schemas/eu.faircode.email.DB/26.json deleted file mode 100644 index 9bf41f351d..0000000000 --- a/app/schemas/eu.faircode.email.DB/26.json +++ /dev/null @@ -1,1052 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 26, - "identityHash": "cceb2c29afbfc5653e3adebb081bffea", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "host", - "columnName": "host", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "starttls", - "columnName": "starttls", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insecure", - "columnName": "insecure", - "affinity": "INTEGER", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `created` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "host", - "columnName": "host", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "starttls", - "columnName": "starttls", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insecure", - "columnName": "insecure", - "affinity": "INTEGER", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `poll_interval` INTEGER, `after` INTEGER NOT NULL, `display` TEXT, `hide` INTEGER NOT NULL, `unified` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "display", - "columnName": "display", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "hide", - "columnName": "hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `extra` TEXT, `replying` INTEGER, `uid` INTEGER, `msgid` TEXT, `references` TEXT, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `preview` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `ui_ignored` INTEGER NOT NULL, `error` TEXT, 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": "extra", - "columnName": "extra", - "affinity": "TEXT", - "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": "deliveredto", - "columnName": "deliveredto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "inreplyto", - "columnName": "inreplyto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "thread", - "columnName": "thread", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "preview", - "columnName": "preview", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_ignored", - "columnName": "ui_ignored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_ui_found", - "unique": true, - "columnNames": [ - "folder", - "uid", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid_ui_found` ON `${TABLE_NAME}` (`folder`, `uid`, `ui_found`)" - }, - { - "name": "index_message_msgid_folder_ui_found", - "unique": true, - "columnNames": [ - "msgid", - "folder", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder_ui_found` ON `${TABLE_NAME}` (`msgid`, `folder`, `ui_found`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - }, - { - "name": "index_message_ui_ignored", - "unique": false, - "columnNames": [ - "ui_ignored" - ], - "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"cceb2c29afbfc5653e3adebb081bffea\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/27.json b/app/schemas/eu.faircode.email.DB/27.json deleted file mode 100644 index 70d2665533..0000000000 --- a/app/schemas/eu.faircode.email.DB/27.json +++ /dev/null @@ -1,1067 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 27, - "identityHash": "676ec980c61b308375284cd46672d61e", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "host", - "columnName": "host", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "starttls", - "columnName": "starttls", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insecure", - "columnName": "insecure", - "affinity": "INTEGER", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - }, - { - "name": "index_identity_account_email", - "unique": false, - "columnNames": [ - "account", - "email" - ], - "createSql": "CREATE INDEX `index_identity_account_email` ON `${TABLE_NAME}` (`account`, `email`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `created` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "host", - "columnName": "host", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "starttls", - "columnName": "starttls", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insecure", - "columnName": "insecure", - "affinity": "INTEGER", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `poll_interval` INTEGER, `after` INTEGER NOT NULL, `display` TEXT, `hide` INTEGER NOT NULL, `unified` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "display", - "columnName": "display", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "hide", - "columnName": "hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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, `extra` TEXT, `replying` INTEGER, `uid` INTEGER, `msgid` TEXT, `references` TEXT, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `preview` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `ui_ignored` INTEGER NOT NULL, `error` TEXT, 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": "extra", - "columnName": "extra", - "affinity": "TEXT", - "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": "deliveredto", - "columnName": "deliveredto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "inreplyto", - "columnName": "inreplyto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "thread", - "columnName": "thread", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "preview", - "columnName": "preview", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_ignored", - "columnName": "ui_ignored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_ui_found", - "unique": true, - "columnNames": [ - "folder", - "uid", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid_ui_found` ON `${TABLE_NAME}` (`folder`, `uid`, `ui_found`)" - }, - { - "name": "index_message_msgid_folder_ui_found", - "unique": true, - "columnNames": [ - "msgid", - "folder", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder_ui_found` ON `${TABLE_NAME}` (`msgid`, `folder`, `ui_found`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - }, - { - "name": "index_message_ui_ignored", - "unique": false, - "columnNames": [ - "ui_ignored" - ], - "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)" - } - ], - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"676ec980c61b308375284cd46672d61e\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/28.json b/app/schemas/eu.faircode.email.DB/28.json deleted file mode 100644 index 934d9d414d..0000000000 --- a/app/schemas/eu.faircode.email.DB/28.json +++ /dev/null @@ -1,1067 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 28, - "identityHash": "5c3afb447322b3c4bb925b20e37ef66e", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "host", - "columnName": "host", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "starttls", - "columnName": "starttls", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insecure", - "columnName": "insecure", - "affinity": "INTEGER", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - }, - { - "name": "index_identity_account_email", - "unique": false, - "columnNames": [ - "account", - "email" - ], - "createSql": "CREATE INDEX `index_identity_account_email` ON `${TABLE_NAME}` (`account`, `email`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `created` INTEGER, `state` TEXT, `error` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "signature", - "columnName": "signature", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "host", - "columnName": "host", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "starttls", - "columnName": "starttls", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "insecure", - "columnName": "insecure", - "affinity": "INTEGER", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "color", - "columnName": "color", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `poll_interval` INTEGER, `after` INTEGER NOT NULL, `display` TEXT, `hide` INTEGER NOT NULL, `unified` INTEGER NOT NULL, `state` TEXT, `error` TEXT, 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": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "after", - "columnName": "after", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "display", - "columnName": "display", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "hide", - "columnName": "hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "unified", - "columnName": "unified", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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`)" - }, - { - "name": "index_folder_unified", - "unique": false, - "columnNames": [ - "unified" - ], - "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)" - } - ], - "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 NOT NULL, `folder` INTEGER NOT NULL, `identity` INTEGER, `extra` TEXT, `replying` INTEGER, `uid` INTEGER, `msgid` TEXT, `references` TEXT, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `preview` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `ui_ignored` INTEGER NOT NULL, `error` TEXT, 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 SET NULL , FOREIGN KEY(`replying`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE SET NULL )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "identity", - "columnName": "identity", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "extra", - "columnName": "extra", - "affinity": "TEXT", - "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": "deliveredto", - "columnName": "deliveredto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "inreplyto", - "columnName": "inreplyto", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "thread", - "columnName": "thread", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "avatar", - "columnName": "avatar", - "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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "content", - "columnName": "content", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "preview", - "columnName": "preview", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen", - "columnName": "seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "flagged", - "columnName": "flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_seen", - "columnName": "ui_seen", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_flagged", - "columnName": "ui_flagged", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_hide", - "columnName": "ui_hide", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "ui_ignored", - "columnName": "ui_ignored", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_ui_found", - "unique": true, - "columnNames": [ - "folder", - "uid", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid_ui_found` ON `${TABLE_NAME}` (`folder`, `uid`, `ui_found`)" - }, - { - "name": "index_message_msgid_folder_ui_found", - "unique": true, - "columnNames": [ - "msgid", - "folder", - "ui_found" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder_ui_found` ON `${TABLE_NAME}` (`msgid`, `folder`, `ui_found`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - }, - { - "name": "index_message_ui_ignored", - "unique": false, - "columnNames": [ - "ui_ignored" - ], - "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)" - } - ], - "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": "SET NULL", - "onUpdate": "NO ACTION", - "columns": [ - "identity" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "SET NULL", - "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, 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": "cid", - "columnName": "cid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "size", - "columnName": "size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "progress", - "columnName": "progress", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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`)" - }, - { - "name": "index_attachment_message_cid", - "unique": true, - "columnNames": [ - "message", - "cid" - ], - "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)" - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"5c3afb447322b3c4bb925b20e37ef66e\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/3.json b/app/schemas/eu.faircode.email.DB/3.json deleted file mode 100644 index dab80702b4..0000000000 --- a/app/schemas/eu.faircode.email.DB/3.json +++ /dev/null @@ -1,800 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 3, - "identityHash": "ec9474ecd53268ea20f0363e444d9fc1", - "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, `account` INTEGER NOT NULL, `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, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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 - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "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, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "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": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `state` TEXT, `error` TEXT, 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 - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `error` TEXT, 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": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "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 - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "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, \"ec9474ecd53268ea20f0363e444d9fc1\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/4.json b/app/schemas/eu.faircode.email.DB/4.json deleted file mode 100644 index 5397033efb..0000000000 --- a/app/schemas/eu.faircode.email.DB/4.json +++ /dev/null @@ -1,832 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 4, - "identityHash": "334fa594d108afe37ea079b4e2081e38", - "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, `account` INTEGER NOT NULL, `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, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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 - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "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, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "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": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `state` TEXT, `error` TEXT, 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 - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `error` TEXT, 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": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "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 - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - } - ], - "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, \"334fa594d108afe37ea079b4e2081e38\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/5.json b/app/schemas/eu.faircode.email.DB/5.json deleted file mode 100644 index e51cbf47dd..0000000000 --- a/app/schemas/eu.faircode.email.DB/5.json +++ /dev/null @@ -1,844 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 5, - "identityHash": "df70f524a0c744041e89eea7e7052e73", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "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, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `state` TEXT, `error` TEXT, 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 - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `error` TEXT, 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": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "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 - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - } - ], - "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, \"df70f524a0c744041e89eea7e7052e73\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/6.json b/app/schemas/eu.faircode.email.DB/6.json deleted file mode 100644 index 8302e5cfb4..0000000000 --- a/app/schemas/eu.faircode.email.DB/6.json +++ /dev/null @@ -1,850 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 6, - "identityHash": "e9ae946be1049502f01f8f30275abc2f", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "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, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `state` TEXT, `error` TEXT, 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 - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "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 - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - } - ], - "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, \"e9ae946be1049502f01f8f30275abc2f\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/7.json b/app/schemas/eu.faircode.email.DB/7.json deleted file mode 100644 index a660d8fb69..0000000000 --- a/app/schemas/eu.faircode.email.DB/7.json +++ /dev/null @@ -1,891 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 7, - "identityHash": "78658430615109b7c163e62ed1ad0a48", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "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, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `state` TEXT, `error` TEXT, 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 - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "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 - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"78658430615109b7c163e62ed1ad0a48\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/8.json b/app/schemas/eu.faircode.email.DB/8.json deleted file mode 100644 index b23d23c344..0000000000 --- a/app/schemas/eu.faircode.email.DB/8.json +++ /dev/null @@ -1,899 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 8, - "identityHash": "6127ad940456ed43d7551f7cd7b7ed18", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "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, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `state` TEXT, `error` TEXT, 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 - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "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 - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"6127ad940456ed43d7551f7cd7b7ed18\")" - ] - } -} \ No newline at end of file diff --git a/app/schemas/eu.faircode.email.DB/9.json b/app/schemas/eu.faircode.email.DB/9.json deleted file mode 100644 index d7566f89e8..0000000000 --- a/app/schemas/eu.faircode.email.DB/9.json +++ /dev/null @@ -1,905 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 9, - "identityHash": "67fade7db3a87ec2ef27dcec483c456f", - "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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "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": "account", - "columnName": "account", - "affinity": "INTEGER", - "notNull": true - }, - { - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_identity_account", - "unique": false, - "columnNames": [ - "account" - ], - "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)" - } - ], - "foreignKeys": [ - { - "table": "account", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "account" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "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, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", - "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": "auth_type", - "columnName": "auth_type", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "primary", - "columnName": "primary", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "synchronize", - "columnName": "synchronize", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "store_sent", - "columnName": "store_sent", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "poll_interval", - "columnName": "poll_interval", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "seen_until", - "columnName": "seen_until", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "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, `state` TEXT, `error` TEXT, 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 - }, - { - "fieldPath": "state", - "columnName": "state", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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, `headers` TEXT, `subject` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `error` TEXT, 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": "headers", - "columnName": "headers", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subject", - "columnName": "subject", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sent", - "columnName": "sent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "received", - "columnName": "received", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "stored", - "columnName": "stored", - "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 - }, - { - "fieldPath": "ui_found", - "columnName": "ui_found", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "error", - "columnName": "error", - "affinity": "TEXT", - "notNull": false - } - ], - "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_msgid_folder", - "unique": true, - "columnNames": [ - "msgid", - "folder" - ], - "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)" - }, - { - "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`)" - }, - { - "name": "index_message_ui_found", - "unique": false, - "columnNames": [ - "ui_found" - ], - "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)" - } - ], - "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, `available` INTEGER NOT NULL, 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": "available", - "columnName": "available", - "affinity": "INTEGER", - "notNull": true - } - ], - "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, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folder", - "columnName": "folder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "message", - "columnName": "message", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "args", - "columnName": "args", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "created", - "columnName": "created", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_operation_folder", - "unique": false, - "columnNames": [ - "folder" - ], - "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)" - }, - { - "name": "index_operation_message", - "unique": false, - "columnNames": [ - "message" - ], - "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)" - } - ], - "foreignKeys": [ - { - "table": "folder", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "folder" - ], - "referencedColumns": [ - "id" - ] - }, - { - "table": "message", - "onDelete": "CASCADE", - "onUpdate": "NO ACTION", - "columns": [ - "message" - ], - "referencedColumns": [ - "id" - ] - } - ] - }, - { - "tableName": "answer", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "text", - "columnName": "text", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "log", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "data", - "columnName": "data", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [ - { - "name": "index_log_time", - "unique": false, - "columnNames": [ - "time" - ], - "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)" - } - ], - "foreignKeys": [] - } - ], - "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, \"67fade7db3a87ec2ef27dcec483c456f\")" - ] - } -} \ No newline at end of file diff --git a/app/src/main/java/eu/faircode/email/DB.java b/app/src/main/java/eu/faircode/email/DB.java index 593ee0b188..d02f298389 100644 --- a/app/src/main/java/eu/faircode/email/DB.java +++ b/app/src/main/java/eu/faircode/email/DB.java @@ -46,7 +46,7 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory; // https://developer.android.com/topic/libraries/architecture/room.html @Database( - version = 28, + version = 1, entities = { EntityIdentity.class, EntityAccount.class, @@ -79,7 +79,7 @@ public abstract class DB extends RoomDatabase { private static DB sInstance; - private static final String DB_NAME = "email"; + private static final String DB_NAME = "fairemail"; public static synchronized DB getInstance(Context context) { if (sInstance == null) { @@ -111,6 +111,7 @@ public abstract class DB extends RoomDatabase { } private static DB migrate(RoomDatabase.Builder builder) { + // https://www.sqlite.org/lang_altertable.html return builder .addCallback(new Callback() { @Override @@ -320,9 +321,10 @@ public abstract class DB extends RoomDatabase { public void migrate(SupportSQLiteDatabase db) { Log.i(Helper.TAG, "DB migration from version " + startVersion + " to " + endVersion); - db.execSQL("ALTER TABLE `message` RENAME TO `message_old`;"); + // https://www.sqlite.org/lang_altertable.html + db.execSQL("PRAGMA foreign_keys=OFF;"); - db.execSQL("CREATE TABLE `message`" + + db.execSQL("CREATE TABLE `message_new`" + " (`id` INTEGER PRIMARY KEY AUTOINCREMENT," + " `account` INTEGER NOT NULL," + " `folder` INTEGER NOT NULL," + @@ -363,20 +365,10 @@ public abstract class DB extends RoomDatabase { " FOREIGN KEY(`replying`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE SET NULL" + " )"); - db.execSQL("INSERT INTO `message` SELECT * FROM `message_old`;"); - - db.execSQL("DROP INDEX `index_message_account`"); - db.execSQL("DROP INDEX `index_message_folder`"); - db.execSQL("DROP INDEX `index_message_identity`"); - db.execSQL("DROP INDEX `index_message_replying`"); - db.execSQL("DROP INDEX `index_message_folder_uid_ui_found`"); - db.execSQL("DROP INDEX `index_message_msgid_folder_ui_found`"); - db.execSQL("DROP INDEX `index_message_thread`"); - db.execSQL("DROP INDEX `index_message_received`"); - db.execSQL("DROP INDEX `index_message_ui_seen`"); - db.execSQL("DROP INDEX `index_message_ui_hide`"); - db.execSQL("DROP INDEX `index_message_ui_found`"); - db.execSQL("DROP INDEX `index_message_ui_ignored`"); + db.execSQL("DELETE from `message` WHERE account IS NULL;"); + db.execSQL("INSERT INTO `message_new` SELECT * FROM `message`;"); + db.execSQL("DROP TABLE `message`;"); + db.execSQL("ALTER TABLE `message_new` RENAME TO `message`"); db.execSQL("CREATE INDEX `index_message_account` ON `message` (`account`)"); db.execSQL("CREATE INDEX `index_message_folder` ON `message` (`folder`)"); @@ -391,7 +383,8 @@ public abstract class DB extends RoomDatabase { db.execSQL("CREATE INDEX `index_message_ui_found` ON `message` (`ui_found`)"); db.execSQL("CREATE INDEX `index_message_ui_ignored` ON `message` (`ui_ignored`)"); - db.execSQL("DROP TABLE `message_old`;"); + db.execSQL("PRAGMA foreign_key_check;"); + db.execSQL("PRAGMA foreign_keys=ON;"); } }) .build(); diff --git a/app/src/main/java/eu/faircode/email/EntityAccount.java b/app/src/main/java/eu/faircode/email/EntityAccount.java index c57628a186..f4cfbe9ec8 100644 --- a/app/src/main/java/eu/faircode/email/EntityAccount.java +++ b/app/src/main/java/eu/faircode/email/EntityAccount.java @@ -58,10 +58,7 @@ public class EntityAccount { public Boolean primary; public Integer color; @NonNull - public Boolean store_sent; // obsolete - @NonNull public Integer poll_interval; // keep-alive interval - public Long seen_until; // obsolete public Long created; public String state; public String error; diff --git a/app/src/main/java/eu/faircode/email/EntityFolder.java b/app/src/main/java/eu/faircode/email/EntityFolder.java index 3ad0547bf2..254a119c4b 100644 --- a/app/src/main/java/eu/faircode/email/EntityFolder.java +++ b/app/src/main/java/eu/faircode/email/EntityFolder.java @@ -60,7 +60,6 @@ public class EntityFolder implements Serializable { public String type; @NonNull public Boolean synchronize; - public Integer poll_interval; // obsolete @NonNull public Integer after; // days public String display; @@ -143,7 +142,6 @@ public class EntityFolder implements Serializable { this.name.equals(other.name) && this.type.equals(other.type) && this.synchronize.equals(other.synchronize) && - (this.poll_interval == null ? other.poll_interval == null : this.poll_interval.equals(other.poll_interval)) && this.after.equals(other.after) && (this.display == null ? other.display == null : this.display.equals(other.display)) && this.hide == other.hide && this.unified == other.unified && @@ -163,7 +161,6 @@ public class EntityFolder implements Serializable { json.put("name", name); json.put("type", type); json.put("synchronize", synchronize); - json.put("poll_interval", poll_interval); json.put("after", after); json.put("display", display); json.put("hide", hide); @@ -176,8 +173,6 @@ public class EntityFolder implements Serializable { folder.name = json.getString("name"); folder.type = json.getString("type"); folder.synchronize = json.getBoolean("synchronize"); - if (json.has("poll_interval")) - folder.poll_interval = json.getInt("poll_interval"); folder.after = json.getInt("after"); if (json.has("display")) folder.display = json.getString("display"); diff --git a/app/src/main/java/eu/faircode/email/EntityIdentity.java b/app/src/main/java/eu/faircode/email/EntityIdentity.java index f93b0335f8..0ac2b2c4d5 100644 --- a/app/src/main/java/eu/faircode/email/EntityIdentity.java +++ b/app/src/main/java/eu/faircode/email/EntityIdentity.java @@ -73,6 +73,7 @@ public class EntityIdentity { public Boolean synchronize; @NonNull public Boolean store_sent; + public Long sent_folder; public String state; public String error; @@ -94,6 +95,8 @@ public class EntityIdentity { json.put("color", color); json.put("synchronize", false); json.put("store_sent", store_sent); + if (sent_folder != null) + json.put("sent_folder", sent_folder); // not state // not error return json; @@ -117,6 +120,8 @@ public class EntityIdentity { identity.color = json.getInt("color"); identity.synchronize = json.getBoolean("synchronize"); identity.store_sent = json.getBoolean("store_sent"); + if (json.has("sent_folder")) + identity.sent_folder = json.getLong("sent_folder"); return identity; } @@ -138,6 +143,7 @@ public class EntityIdentity { (this.color == null ? other.color == null : this.color.equals(other.color)) && this.synchronize.equals(other.synchronize) && this.store_sent.equals(other.store_sent) && + (this.sent_folder == null ? other.sent_folder == null : this.sent_folder.equals(other.sent_folder)) && (this.state == null ? other.state == null : this.state.equals(other.state)) && (this.error == null ? other.error == null : this.error.equals(other.error))); } else diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index 9adca11f00..ec1d6cb148 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -728,8 +728,6 @@ public class FragmentAccount extends FragmentEx { account.primary = (account.synchronize && primary); account.poll_interval = Integer.parseInt(interval); - account.store_sent = false; // obsolete - account.seen_until = null; // obsolete account.created = new Date().getTime(); if (!synchronize) diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index e0f6db19de..ae7cea1218 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -634,7 +634,6 @@ public class FragmentSetup extends FragmentEx { for (int a = 0; a < jaccounts.length(); a++) { JSONObject jaccount = (JSONObject) jaccounts.get(a); EntityAccount account = EntityAccount.fromJSON(jaccount); - account.store_sent = false; account.created = new Date().getTime(); account.id = db.account().insertAccount(account); Log.i(Helper.TAG, "Imported account=" + account.name);