Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

769 lines
22 KiB

  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 1,
  5. "identityHash": "fc698ded287d449f2781e8efa338554d",
  6. "entities": [
  7. {
  8. "tableName": "identity",
  9. "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, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  10. "fields": [
  11. {
  12. "fieldPath": "id",
  13. "columnName": "id",
  14. "affinity": "INTEGER",
  15. "notNull": false
  16. },
  17. {
  18. "fieldPath": "name",
  19. "columnName": "name",
  20. "affinity": "TEXT",
  21. "notNull": true
  22. },
  23. {
  24. "fieldPath": "email",
  25. "columnName": "email",
  26. "affinity": "TEXT",
  27. "notNull": true
  28. },
  29. {
  30. "fieldPath": "replyto",
  31. "columnName": "replyto",
  32. "affinity": "TEXT",
  33. "notNull": false
  34. },
  35. {
  36. "fieldPath": "account",
  37. "columnName": "account",
  38. "affinity": "INTEGER",
  39. "notNull": true
  40. },
  41. {
  42. "fieldPath": "host",
  43. "columnName": "host",
  44. "affinity": "TEXT",
  45. "notNull": true
  46. },
  47. {
  48. "fieldPath": "port",
  49. "columnName": "port",
  50. "affinity": "INTEGER",
  51. "notNull": true
  52. },
  53. {
  54. "fieldPath": "starttls",
  55. "columnName": "starttls",
  56. "affinity": "INTEGER",
  57. "notNull": true
  58. },
  59. {
  60. "fieldPath": "user",
  61. "columnName": "user",
  62. "affinity": "TEXT",
  63. "notNull": true
  64. },
  65. {
  66. "fieldPath": "password",
  67. "columnName": "password",
  68. "affinity": "TEXT",
  69. "notNull": true
  70. },
  71. {
  72. "fieldPath": "primary",
  73. "columnName": "primary",
  74. "affinity": "INTEGER",
  75. "notNull": true
  76. },
  77. {
  78. "fieldPath": "synchronize",
  79. "columnName": "synchronize",
  80. "affinity": "INTEGER",
  81. "notNull": true
  82. }
  83. ],
  84. "primaryKey": {
  85. "columnNames": [
  86. "id"
  87. ],
  88. "autoGenerate": true
  89. },
  90. "indices": [
  91. {
  92. "name": "index_identity_account",
  93. "unique": false,
  94. "columnNames": [
  95. "account"
  96. ],
  97. "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)"
  98. }
  99. ],
  100. "foreignKeys": [
  101. {
  102. "table": "account",
  103. "onDelete": "CASCADE",
  104. "onUpdate": "NO ACTION",
  105. "columns": [
  106. "account"
  107. ],
  108. "referencedColumns": [
  109. "id"
  110. ]
  111. }
  112. ]
  113. },
  114. {
  115. "tableName": "account",
  116. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)",
  117. "fields": [
  118. {
  119. "fieldPath": "id",
  120. "columnName": "id",
  121. "affinity": "INTEGER",
  122. "notNull": false
  123. },
  124. {
  125. "fieldPath": "name",
  126. "columnName": "name",
  127. "affinity": "TEXT",
  128. "notNull": false
  129. },
  130. {
  131. "fieldPath": "host",
  132. "columnName": "host",
  133. "affinity": "TEXT",
  134. "notNull": true
  135. },
  136. {
  137. "fieldPath": "port",
  138. "columnName": "port",
  139. "affinity": "INTEGER",
  140. "notNull": true
  141. },
  142. {
  143. "fieldPath": "user",
  144. "columnName": "user",
  145. "affinity": "TEXT",
  146. "notNull": true
  147. },
  148. {
  149. "fieldPath": "password",
  150. "columnName": "password",
  151. "affinity": "TEXT",
  152. "notNull": true
  153. },
  154. {
  155. "fieldPath": "primary",
  156. "columnName": "primary",
  157. "affinity": "INTEGER",
  158. "notNull": true
  159. },
  160. {
  161. "fieldPath": "synchronize",
  162. "columnName": "synchronize",
  163. "affinity": "INTEGER",
  164. "notNull": true
  165. },
  166. {
  167. "fieldPath": "seen_until",
  168. "columnName": "seen_until",
  169. "affinity": "INTEGER",
  170. "notNull": false
  171. },
  172. {
  173. "fieldPath": "state",
  174. "columnName": "state",
  175. "affinity": "TEXT",
  176. "notNull": false
  177. },
  178. {
  179. "fieldPath": "error",
  180. "columnName": "error",
  181. "affinity": "TEXT",
  182. "notNull": false
  183. }
  184. ],
  185. "primaryKey": {
  186. "columnNames": [
  187. "id"
  188. ],
  189. "autoGenerate": true
  190. },
  191. "indices": [],
  192. "foreignKeys": []
  193. },
  194. {
  195. "tableName": "folder",
  196. "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 )",
  197. "fields": [
  198. {
  199. "fieldPath": "id",
  200. "columnName": "id",
  201. "affinity": "INTEGER",
  202. "notNull": false
  203. },
  204. {
  205. "fieldPath": "account",
  206. "columnName": "account",
  207. "affinity": "INTEGER",
  208. "notNull": false
  209. },
  210. {
  211. "fieldPath": "name",
  212. "columnName": "name",
  213. "affinity": "TEXT",
  214. "notNull": true
  215. },
  216. {
  217. "fieldPath": "type",
  218. "columnName": "type",
  219. "affinity": "TEXT",
  220. "notNull": true
  221. },
  222. {
  223. "fieldPath": "synchronize",
  224. "columnName": "synchronize",
  225. "affinity": "INTEGER",
  226. "notNull": true
  227. },
  228. {
  229. "fieldPath": "after",
  230. "columnName": "after",
  231. "affinity": "INTEGER",
  232. "notNull": true
  233. },
  234. {
  235. "fieldPath": "state",
  236. "columnName": "state",
  237. "affinity": "TEXT",
  238. "notNull": false
  239. },
  240. {
  241. "fieldPath": "error",
  242. "columnName": "error",
  243. "affinity": "TEXT",
  244. "notNull": false
  245. }
  246. ],
  247. "primaryKey": {
  248. "columnNames": [
  249. "id"
  250. ],
  251. "autoGenerate": true
  252. },
  253. "indices": [
  254. {
  255. "name": "index_folder_account_name",
  256. "unique": true,
  257. "columnNames": [
  258. "account",
  259. "name"
  260. ],
  261. "createSql": "CREATE UNIQUE INDEX `index_folder_account_name` ON `${TABLE_NAME}` (`account`, `name`)"
  262. },
  263. {
  264. "name": "index_folder_account",
  265. "unique": false,
  266. "columnNames": [
  267. "account"
  268. ],
  269. "createSql": "CREATE INDEX `index_folder_account` ON `${TABLE_NAME}` (`account`)"
  270. },
  271. {
  272. "name": "index_folder_name",
  273. "unique": false,
  274. "columnNames": [
  275. "name"
  276. ],
  277. "createSql": "CREATE INDEX `index_folder_name` ON `${TABLE_NAME}` (`name`)"
  278. },
  279. {
  280. "name": "index_folder_type",
  281. "unique": false,
  282. "columnNames": [
  283. "type"
  284. ],
  285. "createSql": "CREATE INDEX `index_folder_type` ON `${TABLE_NAME}` (`type`)"
  286. }
  287. ],
  288. "foreignKeys": [
  289. {
  290. "table": "account",
  291. "onDelete": "CASCADE",
  292. "onUpdate": "NO ACTION",
  293. "columns": [
  294. "account"
  295. ],
  296. "referencedColumns": [
  297. "id"
  298. ]
  299. }
  300. ]
  301. },
  302. {
  303. "tableName": "message",
  304. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `folder` INTEGER NOT NULL, `identity` INTEGER, `replying` INTEGER, `uid` INTEGER, `msgid` TEXT, `references` TEXT, `inreplyto` TEXT, `thread` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `subject` TEXT, `body` TEXT, `sent` INTEGER, `received` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `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 )",
  305. "fields": [
  306. {
  307. "fieldPath": "id",
  308. "columnName": "id",
  309. "affinity": "INTEGER",
  310. "notNull": false
  311. },
  312. {
  313. "fieldPath": "account",
  314. "columnName": "account",
  315. "affinity": "INTEGER",
  316. "notNull": false
  317. },
  318. {
  319. "fieldPath": "folder",
  320. "columnName": "folder",
  321. "affinity": "INTEGER",
  322. "notNull": true
  323. },
  324. {
  325. "fieldPath": "identity",
  326. "columnName": "identity",
  327. "affinity": "INTEGER",
  328. "notNull": false
  329. },
  330. {
  331. "fieldPath": "replying",
  332. "columnName": "replying",
  333. "affinity": "INTEGER",
  334. "notNull": false
  335. },
  336. {
  337. "fieldPath": "uid",
  338. "columnName": "uid",
  339. "affinity": "INTEGER",
  340. "notNull": false
  341. },
  342. {
  343. "fieldPath": "msgid",
  344. "columnName": "msgid",
  345. "affinity": "TEXT",
  346. "notNull": false
  347. },
  348. {
  349. "fieldPath": "references",
  350. "columnName": "references",
  351. "affinity": "TEXT",
  352. "notNull": false
  353. },
  354. {
  355. "fieldPath": "inreplyto",
  356. "columnName": "inreplyto",
  357. "affinity": "TEXT",
  358. "notNull": false
  359. },
  360. {
  361. "fieldPath": "thread",
  362. "columnName": "thread",
  363. "affinity": "TEXT",
  364. "notNull": false
  365. },
  366. {
  367. "fieldPath": "from",
  368. "columnName": "from",
  369. "affinity": "TEXT",
  370. "notNull": false
  371. },
  372. {
  373. "fieldPath": "to",
  374. "columnName": "to",
  375. "affinity": "TEXT",
  376. "notNull": false
  377. },
  378. {
  379. "fieldPath": "cc",
  380. "columnName": "cc",
  381. "affinity": "TEXT",
  382. "notNull": false
  383. },
  384. {
  385. "fieldPath": "bcc",
  386. "columnName": "bcc",
  387. "affinity": "TEXT",
  388. "notNull": false
  389. },
  390. {
  391. "fieldPath": "reply",
  392. "columnName": "reply",
  393. "affinity": "TEXT",
  394. "notNull": false
  395. },
  396. {
  397. "fieldPath": "subject",
  398. "columnName": "subject",
  399. "affinity": "TEXT",
  400. "notNull": false
  401. },
  402. {
  403. "fieldPath": "body",
  404. "columnName": "body",
  405. "affinity": "TEXT",
  406. "notNull": false
  407. },
  408. {
  409. "fieldPath": "sent",
  410. "columnName": "sent",
  411. "affinity": "INTEGER",
  412. "notNull": false
  413. },
  414. {
  415. "fieldPath": "received",
  416. "columnName": "received",
  417. "affinity": "INTEGER",
  418. "notNull": true
  419. },
  420. {
  421. "fieldPath": "seen",
  422. "columnName": "seen",
  423. "affinity": "INTEGER",
  424. "notNull": true
  425. },
  426. {
  427. "fieldPath": "ui_seen",
  428. "columnName": "ui_seen",
  429. "affinity": "INTEGER",
  430. "notNull": true
  431. },
  432. {
  433. "fieldPath": "ui_hide",
  434. "columnName": "ui_hide",
  435. "affinity": "INTEGER",
  436. "notNull": true
  437. },
  438. {
  439. "fieldPath": "error",
  440. "columnName": "error",
  441. "affinity": "TEXT",
  442. "notNull": false
  443. }
  444. ],
  445. "primaryKey": {
  446. "columnNames": [
  447. "id"
  448. ],
  449. "autoGenerate": true
  450. },
  451. "indices": [
  452. {
  453. "name": "index_message_account",
  454. "unique": false,
  455. "columnNames": [
  456. "account"
  457. ],
  458. "createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)"
  459. },
  460. {
  461. "name": "index_message_folder",
  462. "unique": false,
  463. "columnNames": [
  464. "folder"
  465. ],
  466. "createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)"
  467. },
  468. {
  469. "name": "index_message_identity",
  470. "unique": false,
  471. "columnNames": [
  472. "identity"
  473. ],
  474. "createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)"
  475. },
  476. {
  477. "name": "index_message_replying",
  478. "unique": false,
  479. "columnNames": [
  480. "replying"
  481. ],
  482. "createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)"
  483. },
  484. {
  485. "name": "index_message_folder_uid",
  486. "unique": true,
  487. "columnNames": [
  488. "folder",
  489. "uid"
  490. ],
  491. "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)"
  492. },
  493. {
  494. "name": "index_message_msgid_folder",
  495. "unique": true,
  496. "columnNames": [
  497. "msgid",
  498. "folder"
  499. ],
  500. "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)"
  501. },
  502. {
  503. "name": "index_message_thread",
  504. "unique": false,
  505. "columnNames": [
  506. "thread"
  507. ],
  508. "createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)"
  509. },
  510. {
  511. "name": "index_message_received",
  512. "unique": false,
  513. "columnNames": [
  514. "received"
  515. ],
  516. "createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)"
  517. },
  518. {
  519. "name": "index_message_ui_seen",
  520. "unique": false,
  521. "columnNames": [
  522. "ui_seen"
  523. ],
  524. "createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)"
  525. },
  526. {
  527. "name": "index_message_ui_hide",
  528. "unique": false,
  529. "columnNames": [
  530. "ui_hide"
  531. ],
  532. "createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)"
  533. }
  534. ],
  535. "foreignKeys": [
  536. {
  537. "table": "account",
  538. "onDelete": "CASCADE",
  539. "onUpdate": "NO ACTION",
  540. "columns": [
  541. "account"
  542. ],
  543. "referencedColumns": [
  544. "id"
  545. ]
  546. },
  547. {
  548. "table": "folder",
  549. "onDelete": "CASCADE",
  550. "onUpdate": "NO ACTION",
  551. "columns": [
  552. "folder"
  553. ],
  554. "referencedColumns": [
  555. "id"
  556. ]
  557. },
  558. {
  559. "table": "identity",
  560. "onDelete": "CASCADE",
  561. "onUpdate": "NO ACTION",
  562. "columns": [
  563. "identity"
  564. ],
  565. "referencedColumns": [
  566. "id"
  567. ]
  568. },
  569. {
  570. "table": "message",
  571. "onDelete": "CASCADE",
  572. "onUpdate": "NO ACTION",
  573. "columns": [
  574. "replying"
  575. ],
  576. "referencedColumns": [
  577. "id"
  578. ]
  579. }
  580. ]
  581. },
  582. {
  583. "tableName": "attachment",
  584. "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, `filename` TEXT, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  585. "fields": [
  586. {
  587. "fieldPath": "id",
  588. "columnName": "id",
  589. "affinity": "INTEGER",
  590. "notNull": false
  591. },
  592. {
  593. "fieldPath": "message",
  594. "columnName": "message",
  595. "affinity": "INTEGER",
  596. "notNull": true
  597. },
  598. {
  599. "fieldPath": "sequence",
  600. "columnName": "sequence",
  601. "affinity": "INTEGER",
  602. "notNull": true
  603. },
  604. {
  605. "fieldPath": "name",
  606. "columnName": "name",
  607. "affinity": "TEXT",
  608. "notNull": false
  609. },
  610. {
  611. "fieldPath": "type",
  612. "columnName": "type",
  613. "affinity": "TEXT",
  614. "notNull": true
  615. },
  616. {
  617. "fieldPath": "size",
  618. "columnName": "size",
  619. "affinity": "INTEGER",
  620. "notNull": false
  621. },
  622. {
  623. "fieldPath": "progress",
  624. "columnName": "progress",
  625. "affinity": "INTEGER",
  626. "notNull": false
  627. },
  628. {
  629. "fieldPath": "filename",
  630. "columnName": "filename",
  631. "affinity": "TEXT",
  632. "notNull": false
  633. }
  634. ],
  635. "primaryKey": {
  636. "columnNames": [
  637. "id"
  638. ],
  639. "autoGenerate": true
  640. },
  641. "indices": [
  642. {
  643. "name": "index_attachment_message",
  644. "unique": false,
  645. "columnNames": [
  646. "message"
  647. ],
  648. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  649. },
  650. {
  651. "name": "index_attachment_message_sequence",
  652. "unique": true,
  653. "columnNames": [
  654. "message",
  655. "sequence"
  656. ],
  657. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  658. }
  659. ],
  660. "foreignKeys": [
  661. {
  662. "table": "message",
  663. "onDelete": "CASCADE",
  664. "onUpdate": "NO ACTION",
  665. "columns": [
  666. "message"
  667. ],
  668. "referencedColumns": [
  669. "id"
  670. ]
  671. }
  672. ]
  673. },
  674. {
  675. "tableName": "operation",
  676. "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 )",
  677. "fields": [
  678. {
  679. "fieldPath": "id",
  680. "columnName": "id",
  681. "affinity": "INTEGER",
  682. "notNull": false
  683. },
  684. {
  685. "fieldPath": "folder",
  686. "columnName": "folder",
  687. "affinity": "INTEGER",
  688. "notNull": true
  689. },
  690. {
  691. "fieldPath": "message",
  692. "columnName": "message",
  693. "affinity": "INTEGER",
  694. "notNull": true
  695. },
  696. {
  697. "fieldPath": "name",
  698. "columnName": "name",
  699. "affinity": "TEXT",
  700. "notNull": true
  701. },
  702. {
  703. "fieldPath": "args",
  704. "columnName": "args",
  705. "affinity": "TEXT",
  706. "notNull": true
  707. },
  708. {
  709. "fieldPath": "created",
  710. "columnName": "created",
  711. "affinity": "INTEGER",
  712. "notNull": true
  713. }
  714. ],
  715. "primaryKey": {
  716. "columnNames": [
  717. "id"
  718. ],
  719. "autoGenerate": true
  720. },
  721. "indices": [
  722. {
  723. "name": "index_operation_folder",
  724. "unique": false,
  725. "columnNames": [
  726. "folder"
  727. ],
  728. "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)"
  729. },
  730. {
  731. "name": "index_operation_message",
  732. "unique": false,
  733. "columnNames": [
  734. "message"
  735. ],
  736. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  737. }
  738. ],
  739. "foreignKeys": [
  740. {
  741. "table": "folder",
  742. "onDelete": "CASCADE",
  743. "onUpdate": "NO ACTION",
  744. "columns": [
  745. "folder"
  746. ],
  747. "referencedColumns": [
  748. "id"
  749. ]
  750. },
  751. {
  752. "table": "message",
  753. "onDelete": "CASCADE",
  754. "onUpdate": "NO ACTION",
  755. "columns": [
  756. "message"
  757. ],
  758. "referencedColumns": [
  759. "id"
  760. ]
  761. }
  762. ]
  763. }
  764. ],
  765. "setupQueries": [
  766. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  767. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"fc698ded287d449f2781e8efa338554d\")"
  768. ]
  769. }
  770. }