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.

756 lines
22 KiB

  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 1,
  5. "identityHash": "7814b856d44afe54b8912106df1e673b",
  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, `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": "error",
  174. "columnName": "error",
  175. "affinity": "TEXT",
  176. "notNull": false
  177. }
  178. ],
  179. "primaryKey": {
  180. "columnNames": [
  181. "id"
  182. ],
  183. "autoGenerate": true
  184. },
  185. "indices": [],
  186. "foreignKeys": []
  187. },
  188. {
  189. "tableName": "folder",
  190. "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, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  191. "fields": [
  192. {
  193. "fieldPath": "id",
  194. "columnName": "id",
  195. "affinity": "INTEGER",
  196. "notNull": false
  197. },
  198. {
  199. "fieldPath": "account",
  200. "columnName": "account",
  201. "affinity": "INTEGER",
  202. "notNull": false
  203. },
  204. {
  205. "fieldPath": "name",
  206. "columnName": "name",
  207. "affinity": "TEXT",
  208. "notNull": true
  209. },
  210. {
  211. "fieldPath": "type",
  212. "columnName": "type",
  213. "affinity": "TEXT",
  214. "notNull": true
  215. },
  216. {
  217. "fieldPath": "synchronize",
  218. "columnName": "synchronize",
  219. "affinity": "INTEGER",
  220. "notNull": true
  221. },
  222. {
  223. "fieldPath": "after",
  224. "columnName": "after",
  225. "affinity": "INTEGER",
  226. "notNull": true
  227. },
  228. {
  229. "fieldPath": "error",
  230. "columnName": "error",
  231. "affinity": "TEXT",
  232. "notNull": false
  233. }
  234. ],
  235. "primaryKey": {
  236. "columnNames": [
  237. "id"
  238. ],
  239. "autoGenerate": true
  240. },
  241. "indices": [
  242. {
  243. "name": "index_folder_account_name",
  244. "unique": true,
  245. "columnNames": [
  246. "account",
  247. "name"
  248. ],
  249. "createSql": "CREATE UNIQUE INDEX `index_folder_account_name` ON `${TABLE_NAME}` (`account`, `name`)"
  250. },
  251. {
  252. "name": "index_folder_account",
  253. "unique": false,
  254. "columnNames": [
  255. "account"
  256. ],
  257. "createSql": "CREATE INDEX `index_folder_account` ON `${TABLE_NAME}` (`account`)"
  258. },
  259. {
  260. "name": "index_folder_name",
  261. "unique": false,
  262. "columnNames": [
  263. "name"
  264. ],
  265. "createSql": "CREATE INDEX `index_folder_name` ON `${TABLE_NAME}` (`name`)"
  266. },
  267. {
  268. "name": "index_folder_type",
  269. "unique": false,
  270. "columnNames": [
  271. "type"
  272. ],
  273. "createSql": "CREATE INDEX `index_folder_type` ON `${TABLE_NAME}` (`type`)"
  274. }
  275. ],
  276. "foreignKeys": [
  277. {
  278. "table": "account",
  279. "onDelete": "CASCADE",
  280. "onUpdate": "NO ACTION",
  281. "columns": [
  282. "account"
  283. ],
  284. "referencedColumns": [
  285. "id"
  286. ]
  287. }
  288. ]
  289. },
  290. {
  291. "tableName": "message",
  292. "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 )",
  293. "fields": [
  294. {
  295. "fieldPath": "id",
  296. "columnName": "id",
  297. "affinity": "INTEGER",
  298. "notNull": false
  299. },
  300. {
  301. "fieldPath": "account",
  302. "columnName": "account",
  303. "affinity": "INTEGER",
  304. "notNull": false
  305. },
  306. {
  307. "fieldPath": "folder",
  308. "columnName": "folder",
  309. "affinity": "INTEGER",
  310. "notNull": true
  311. },
  312. {
  313. "fieldPath": "identity",
  314. "columnName": "identity",
  315. "affinity": "INTEGER",
  316. "notNull": false
  317. },
  318. {
  319. "fieldPath": "replying",
  320. "columnName": "replying",
  321. "affinity": "INTEGER",
  322. "notNull": false
  323. },
  324. {
  325. "fieldPath": "uid",
  326. "columnName": "uid",
  327. "affinity": "INTEGER",
  328. "notNull": false
  329. },
  330. {
  331. "fieldPath": "msgid",
  332. "columnName": "msgid",
  333. "affinity": "TEXT",
  334. "notNull": false
  335. },
  336. {
  337. "fieldPath": "references",
  338. "columnName": "references",
  339. "affinity": "TEXT",
  340. "notNull": false
  341. },
  342. {
  343. "fieldPath": "inreplyto",
  344. "columnName": "inreplyto",
  345. "affinity": "TEXT",
  346. "notNull": false
  347. },
  348. {
  349. "fieldPath": "thread",
  350. "columnName": "thread",
  351. "affinity": "TEXT",
  352. "notNull": false
  353. },
  354. {
  355. "fieldPath": "from",
  356. "columnName": "from",
  357. "affinity": "TEXT",
  358. "notNull": false
  359. },
  360. {
  361. "fieldPath": "to",
  362. "columnName": "to",
  363. "affinity": "TEXT",
  364. "notNull": false
  365. },
  366. {
  367. "fieldPath": "cc",
  368. "columnName": "cc",
  369. "affinity": "TEXT",
  370. "notNull": false
  371. },
  372. {
  373. "fieldPath": "bcc",
  374. "columnName": "bcc",
  375. "affinity": "TEXT",
  376. "notNull": false
  377. },
  378. {
  379. "fieldPath": "reply",
  380. "columnName": "reply",
  381. "affinity": "TEXT",
  382. "notNull": false
  383. },
  384. {
  385. "fieldPath": "subject",
  386. "columnName": "subject",
  387. "affinity": "TEXT",
  388. "notNull": false
  389. },
  390. {
  391. "fieldPath": "body",
  392. "columnName": "body",
  393. "affinity": "TEXT",
  394. "notNull": false
  395. },
  396. {
  397. "fieldPath": "sent",
  398. "columnName": "sent",
  399. "affinity": "INTEGER",
  400. "notNull": false
  401. },
  402. {
  403. "fieldPath": "received",
  404. "columnName": "received",
  405. "affinity": "INTEGER",
  406. "notNull": true
  407. },
  408. {
  409. "fieldPath": "seen",
  410. "columnName": "seen",
  411. "affinity": "INTEGER",
  412. "notNull": true
  413. },
  414. {
  415. "fieldPath": "ui_seen",
  416. "columnName": "ui_seen",
  417. "affinity": "INTEGER",
  418. "notNull": true
  419. },
  420. {
  421. "fieldPath": "ui_hide",
  422. "columnName": "ui_hide",
  423. "affinity": "INTEGER",
  424. "notNull": true
  425. },
  426. {
  427. "fieldPath": "error",
  428. "columnName": "error",
  429. "affinity": "TEXT",
  430. "notNull": false
  431. }
  432. ],
  433. "primaryKey": {
  434. "columnNames": [
  435. "id"
  436. ],
  437. "autoGenerate": true
  438. },
  439. "indices": [
  440. {
  441. "name": "index_message_account",
  442. "unique": false,
  443. "columnNames": [
  444. "account"
  445. ],
  446. "createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)"
  447. },
  448. {
  449. "name": "index_message_folder",
  450. "unique": false,
  451. "columnNames": [
  452. "folder"
  453. ],
  454. "createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)"
  455. },
  456. {
  457. "name": "index_message_identity",
  458. "unique": false,
  459. "columnNames": [
  460. "identity"
  461. ],
  462. "createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)"
  463. },
  464. {
  465. "name": "index_message_replying",
  466. "unique": false,
  467. "columnNames": [
  468. "replying"
  469. ],
  470. "createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)"
  471. },
  472. {
  473. "name": "index_message_folder_uid",
  474. "unique": true,
  475. "columnNames": [
  476. "folder",
  477. "uid"
  478. ],
  479. "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)"
  480. },
  481. {
  482. "name": "index_message_msgid",
  483. "unique": true,
  484. "columnNames": [
  485. "msgid"
  486. ],
  487. "createSql": "CREATE UNIQUE INDEX `index_message_msgid` ON `${TABLE_NAME}` (`msgid`)"
  488. },
  489. {
  490. "name": "index_message_thread",
  491. "unique": false,
  492. "columnNames": [
  493. "thread"
  494. ],
  495. "createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)"
  496. },
  497. {
  498. "name": "index_message_received",
  499. "unique": false,
  500. "columnNames": [
  501. "received"
  502. ],
  503. "createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)"
  504. },
  505. {
  506. "name": "index_message_ui_seen",
  507. "unique": false,
  508. "columnNames": [
  509. "ui_seen"
  510. ],
  511. "createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)"
  512. },
  513. {
  514. "name": "index_message_ui_hide",
  515. "unique": false,
  516. "columnNames": [
  517. "ui_hide"
  518. ],
  519. "createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)"
  520. }
  521. ],
  522. "foreignKeys": [
  523. {
  524. "table": "account",
  525. "onDelete": "CASCADE",
  526. "onUpdate": "NO ACTION",
  527. "columns": [
  528. "account"
  529. ],
  530. "referencedColumns": [
  531. "id"
  532. ]
  533. },
  534. {
  535. "table": "folder",
  536. "onDelete": "CASCADE",
  537. "onUpdate": "NO ACTION",
  538. "columns": [
  539. "folder"
  540. ],
  541. "referencedColumns": [
  542. "id"
  543. ]
  544. },
  545. {
  546. "table": "identity",
  547. "onDelete": "CASCADE",
  548. "onUpdate": "NO ACTION",
  549. "columns": [
  550. "identity"
  551. ],
  552. "referencedColumns": [
  553. "id"
  554. ]
  555. },
  556. {
  557. "table": "message",
  558. "onDelete": "CASCADE",
  559. "onUpdate": "NO ACTION",
  560. "columns": [
  561. "replying"
  562. ],
  563. "referencedColumns": [
  564. "id"
  565. ]
  566. }
  567. ]
  568. },
  569. {
  570. "tableName": "attachment",
  571. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `message` INTEGER NOT NULL, `sequence` INTEGER NOT NULL, `name` TEXT, `type` TEXT NOT NULL, `size` INTEGER, `progress` INTEGER, `content` BLOB, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  572. "fields": [
  573. {
  574. "fieldPath": "id",
  575. "columnName": "id",
  576. "affinity": "INTEGER",
  577. "notNull": false
  578. },
  579. {
  580. "fieldPath": "message",
  581. "columnName": "message",
  582. "affinity": "INTEGER",
  583. "notNull": true
  584. },
  585. {
  586. "fieldPath": "sequence",
  587. "columnName": "sequence",
  588. "affinity": "INTEGER",
  589. "notNull": true
  590. },
  591. {
  592. "fieldPath": "name",
  593. "columnName": "name",
  594. "affinity": "TEXT",
  595. "notNull": false
  596. },
  597. {
  598. "fieldPath": "type",
  599. "columnName": "type",
  600. "affinity": "TEXT",
  601. "notNull": true
  602. },
  603. {
  604. "fieldPath": "size",
  605. "columnName": "size",
  606. "affinity": "INTEGER",
  607. "notNull": false
  608. },
  609. {
  610. "fieldPath": "progress",
  611. "columnName": "progress",
  612. "affinity": "INTEGER",
  613. "notNull": false
  614. },
  615. {
  616. "fieldPath": "content",
  617. "columnName": "content",
  618. "affinity": "BLOB",
  619. "notNull": false
  620. }
  621. ],
  622. "primaryKey": {
  623. "columnNames": [
  624. "id"
  625. ],
  626. "autoGenerate": true
  627. },
  628. "indices": [
  629. {
  630. "name": "index_attachment_message",
  631. "unique": false,
  632. "columnNames": [
  633. "message"
  634. ],
  635. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  636. },
  637. {
  638. "name": "index_attachment_message_sequence",
  639. "unique": true,
  640. "columnNames": [
  641. "message",
  642. "sequence"
  643. ],
  644. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  645. }
  646. ],
  647. "foreignKeys": [
  648. {
  649. "table": "message",
  650. "onDelete": "CASCADE",
  651. "onUpdate": "NO ACTION",
  652. "columns": [
  653. "message"
  654. ],
  655. "referencedColumns": [
  656. "id"
  657. ]
  658. }
  659. ]
  660. },
  661. {
  662. "tableName": "operation",
  663. "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, `error` TEXT, 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 )",
  664. "fields": [
  665. {
  666. "fieldPath": "id",
  667. "columnName": "id",
  668. "affinity": "INTEGER",
  669. "notNull": false
  670. },
  671. {
  672. "fieldPath": "folder",
  673. "columnName": "folder",
  674. "affinity": "INTEGER",
  675. "notNull": true
  676. },
  677. {
  678. "fieldPath": "message",
  679. "columnName": "message",
  680. "affinity": "INTEGER",
  681. "notNull": true
  682. },
  683. {
  684. "fieldPath": "name",
  685. "columnName": "name",
  686. "affinity": "TEXT",
  687. "notNull": true
  688. },
  689. {
  690. "fieldPath": "args",
  691. "columnName": "args",
  692. "affinity": "TEXT",
  693. "notNull": true
  694. },
  695. {
  696. "fieldPath": "error",
  697. "columnName": "error",
  698. "affinity": "TEXT",
  699. "notNull": false
  700. }
  701. ],
  702. "primaryKey": {
  703. "columnNames": [
  704. "id"
  705. ],
  706. "autoGenerate": true
  707. },
  708. "indices": [
  709. {
  710. "name": "index_operation_folder",
  711. "unique": false,
  712. "columnNames": [
  713. "folder"
  714. ],
  715. "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)"
  716. },
  717. {
  718. "name": "index_operation_message",
  719. "unique": false,
  720. "columnNames": [
  721. "message"
  722. ],
  723. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  724. }
  725. ],
  726. "foreignKeys": [
  727. {
  728. "table": "folder",
  729. "onDelete": "CASCADE",
  730. "onUpdate": "NO ACTION",
  731. "columns": [
  732. "folder"
  733. ],
  734. "referencedColumns": [
  735. "id"
  736. ]
  737. },
  738. {
  739. "table": "message",
  740. "onDelete": "CASCADE",
  741. "onUpdate": "NO ACTION",
  742. "columns": [
  743. "message"
  744. ],
  745. "referencedColumns": [
  746. "id"
  747. ]
  748. }
  749. ]
  750. }
  751. ],
  752. "setupQueries": [
  753. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  754. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"7814b856d44afe54b8912106df1e673b\")"
  755. ]
  756. }
  757. }