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.

775 lines
23 KiB

  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 1,
  5. "identityHash": "6213f410bff60ef85d8608f09052327d",
  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, `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 )",
  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": "stored",
  422. "columnName": "stored",
  423. "affinity": "INTEGER",
  424. "notNull": true
  425. },
  426. {
  427. "fieldPath": "seen",
  428. "columnName": "seen",
  429. "affinity": "INTEGER",
  430. "notNull": true
  431. },
  432. {
  433. "fieldPath": "ui_seen",
  434. "columnName": "ui_seen",
  435. "affinity": "INTEGER",
  436. "notNull": true
  437. },
  438. {
  439. "fieldPath": "ui_hide",
  440. "columnName": "ui_hide",
  441. "affinity": "INTEGER",
  442. "notNull": true
  443. },
  444. {
  445. "fieldPath": "error",
  446. "columnName": "error",
  447. "affinity": "TEXT",
  448. "notNull": false
  449. }
  450. ],
  451. "primaryKey": {
  452. "columnNames": [
  453. "id"
  454. ],
  455. "autoGenerate": true
  456. },
  457. "indices": [
  458. {
  459. "name": "index_message_account",
  460. "unique": false,
  461. "columnNames": [
  462. "account"
  463. ],
  464. "createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)"
  465. },
  466. {
  467. "name": "index_message_folder",
  468. "unique": false,
  469. "columnNames": [
  470. "folder"
  471. ],
  472. "createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)"
  473. },
  474. {
  475. "name": "index_message_identity",
  476. "unique": false,
  477. "columnNames": [
  478. "identity"
  479. ],
  480. "createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)"
  481. },
  482. {
  483. "name": "index_message_replying",
  484. "unique": false,
  485. "columnNames": [
  486. "replying"
  487. ],
  488. "createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)"
  489. },
  490. {
  491. "name": "index_message_folder_uid",
  492. "unique": true,
  493. "columnNames": [
  494. "folder",
  495. "uid"
  496. ],
  497. "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)"
  498. },
  499. {
  500. "name": "index_message_msgid_folder",
  501. "unique": true,
  502. "columnNames": [
  503. "msgid",
  504. "folder"
  505. ],
  506. "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)"
  507. },
  508. {
  509. "name": "index_message_thread",
  510. "unique": false,
  511. "columnNames": [
  512. "thread"
  513. ],
  514. "createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)"
  515. },
  516. {
  517. "name": "index_message_received",
  518. "unique": false,
  519. "columnNames": [
  520. "received"
  521. ],
  522. "createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)"
  523. },
  524. {
  525. "name": "index_message_ui_seen",
  526. "unique": false,
  527. "columnNames": [
  528. "ui_seen"
  529. ],
  530. "createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)"
  531. },
  532. {
  533. "name": "index_message_ui_hide",
  534. "unique": false,
  535. "columnNames": [
  536. "ui_hide"
  537. ],
  538. "createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)"
  539. }
  540. ],
  541. "foreignKeys": [
  542. {
  543. "table": "account",
  544. "onDelete": "CASCADE",
  545. "onUpdate": "NO ACTION",
  546. "columns": [
  547. "account"
  548. ],
  549. "referencedColumns": [
  550. "id"
  551. ]
  552. },
  553. {
  554. "table": "folder",
  555. "onDelete": "CASCADE",
  556. "onUpdate": "NO ACTION",
  557. "columns": [
  558. "folder"
  559. ],
  560. "referencedColumns": [
  561. "id"
  562. ]
  563. },
  564. {
  565. "table": "identity",
  566. "onDelete": "CASCADE",
  567. "onUpdate": "NO ACTION",
  568. "columns": [
  569. "identity"
  570. ],
  571. "referencedColumns": [
  572. "id"
  573. ]
  574. },
  575. {
  576. "table": "message",
  577. "onDelete": "CASCADE",
  578. "onUpdate": "NO ACTION",
  579. "columns": [
  580. "replying"
  581. ],
  582. "referencedColumns": [
  583. "id"
  584. ]
  585. }
  586. ]
  587. },
  588. {
  589. "tableName": "attachment",
  590. "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 )",
  591. "fields": [
  592. {
  593. "fieldPath": "id",
  594. "columnName": "id",
  595. "affinity": "INTEGER",
  596. "notNull": false
  597. },
  598. {
  599. "fieldPath": "message",
  600. "columnName": "message",
  601. "affinity": "INTEGER",
  602. "notNull": true
  603. },
  604. {
  605. "fieldPath": "sequence",
  606. "columnName": "sequence",
  607. "affinity": "INTEGER",
  608. "notNull": true
  609. },
  610. {
  611. "fieldPath": "name",
  612. "columnName": "name",
  613. "affinity": "TEXT",
  614. "notNull": false
  615. },
  616. {
  617. "fieldPath": "type",
  618. "columnName": "type",
  619. "affinity": "TEXT",
  620. "notNull": true
  621. },
  622. {
  623. "fieldPath": "size",
  624. "columnName": "size",
  625. "affinity": "INTEGER",
  626. "notNull": false
  627. },
  628. {
  629. "fieldPath": "progress",
  630. "columnName": "progress",
  631. "affinity": "INTEGER",
  632. "notNull": false
  633. },
  634. {
  635. "fieldPath": "filename",
  636. "columnName": "filename",
  637. "affinity": "TEXT",
  638. "notNull": false
  639. }
  640. ],
  641. "primaryKey": {
  642. "columnNames": [
  643. "id"
  644. ],
  645. "autoGenerate": true
  646. },
  647. "indices": [
  648. {
  649. "name": "index_attachment_message",
  650. "unique": false,
  651. "columnNames": [
  652. "message"
  653. ],
  654. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  655. },
  656. {
  657. "name": "index_attachment_message_sequence",
  658. "unique": true,
  659. "columnNames": [
  660. "message",
  661. "sequence"
  662. ],
  663. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  664. }
  665. ],
  666. "foreignKeys": [
  667. {
  668. "table": "message",
  669. "onDelete": "CASCADE",
  670. "onUpdate": "NO ACTION",
  671. "columns": [
  672. "message"
  673. ],
  674. "referencedColumns": [
  675. "id"
  676. ]
  677. }
  678. ]
  679. },
  680. {
  681. "tableName": "operation",
  682. "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 )",
  683. "fields": [
  684. {
  685. "fieldPath": "id",
  686. "columnName": "id",
  687. "affinity": "INTEGER",
  688. "notNull": false
  689. },
  690. {
  691. "fieldPath": "folder",
  692. "columnName": "folder",
  693. "affinity": "INTEGER",
  694. "notNull": true
  695. },
  696. {
  697. "fieldPath": "message",
  698. "columnName": "message",
  699. "affinity": "INTEGER",
  700. "notNull": true
  701. },
  702. {
  703. "fieldPath": "name",
  704. "columnName": "name",
  705. "affinity": "TEXT",
  706. "notNull": true
  707. },
  708. {
  709. "fieldPath": "args",
  710. "columnName": "args",
  711. "affinity": "TEXT",
  712. "notNull": true
  713. },
  714. {
  715. "fieldPath": "created",
  716. "columnName": "created",
  717. "affinity": "INTEGER",
  718. "notNull": true
  719. }
  720. ],
  721. "primaryKey": {
  722. "columnNames": [
  723. "id"
  724. ],
  725. "autoGenerate": true
  726. },
  727. "indices": [
  728. {
  729. "name": "index_operation_folder",
  730. "unique": false,
  731. "columnNames": [
  732. "folder"
  733. ],
  734. "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)"
  735. },
  736. {
  737. "name": "index_operation_message",
  738. "unique": false,
  739. "columnNames": [
  740. "message"
  741. ],
  742. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  743. }
  744. ],
  745. "foreignKeys": [
  746. {
  747. "table": "folder",
  748. "onDelete": "CASCADE",
  749. "onUpdate": "NO ACTION",
  750. "columns": [
  751. "folder"
  752. ],
  753. "referencedColumns": [
  754. "id"
  755. ]
  756. },
  757. {
  758. "table": "message",
  759. "onDelete": "CASCADE",
  760. "onUpdate": "NO ACTION",
  761. "columns": [
  762. "message"
  763. ],
  764. "referencedColumns": [
  765. "id"
  766. ]
  767. }
  768. ]
  769. }
  770. ],
  771. "setupQueries": [
  772. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  773. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"6213f410bff60ef85d8608f09052327d\")"
  774. ]
  775. }
  776. }