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.

748 lines
22 KiB

  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 1,
  5. "identityHash": "9fd2cb9e7b45bf1dbddced278a737dfa",
  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_thread",
  483. "unique": false,
  484. "columnNames": [
  485. "thread"
  486. ],
  487. "createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)"
  488. },
  489. {
  490. "name": "index_message_received",
  491. "unique": false,
  492. "columnNames": [
  493. "received"
  494. ],
  495. "createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)"
  496. },
  497. {
  498. "name": "index_message_ui_seen",
  499. "unique": false,
  500. "columnNames": [
  501. "ui_seen"
  502. ],
  503. "createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)"
  504. },
  505. {
  506. "name": "index_message_ui_hide",
  507. "unique": false,
  508. "columnNames": [
  509. "ui_hide"
  510. ],
  511. "createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)"
  512. }
  513. ],
  514. "foreignKeys": [
  515. {
  516. "table": "account",
  517. "onDelete": "CASCADE",
  518. "onUpdate": "NO ACTION",
  519. "columns": [
  520. "account"
  521. ],
  522. "referencedColumns": [
  523. "id"
  524. ]
  525. },
  526. {
  527. "table": "folder",
  528. "onDelete": "CASCADE",
  529. "onUpdate": "NO ACTION",
  530. "columns": [
  531. "folder"
  532. ],
  533. "referencedColumns": [
  534. "id"
  535. ]
  536. },
  537. {
  538. "table": "identity",
  539. "onDelete": "CASCADE",
  540. "onUpdate": "NO ACTION",
  541. "columns": [
  542. "identity"
  543. ],
  544. "referencedColumns": [
  545. "id"
  546. ]
  547. },
  548. {
  549. "table": "message",
  550. "onDelete": "CASCADE",
  551. "onUpdate": "NO ACTION",
  552. "columns": [
  553. "replying"
  554. ],
  555. "referencedColumns": [
  556. "id"
  557. ]
  558. }
  559. ]
  560. },
  561. {
  562. "tableName": "attachment",
  563. "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 )",
  564. "fields": [
  565. {
  566. "fieldPath": "id",
  567. "columnName": "id",
  568. "affinity": "INTEGER",
  569. "notNull": false
  570. },
  571. {
  572. "fieldPath": "message",
  573. "columnName": "message",
  574. "affinity": "INTEGER",
  575. "notNull": true
  576. },
  577. {
  578. "fieldPath": "sequence",
  579. "columnName": "sequence",
  580. "affinity": "INTEGER",
  581. "notNull": true
  582. },
  583. {
  584. "fieldPath": "name",
  585. "columnName": "name",
  586. "affinity": "TEXT",
  587. "notNull": false
  588. },
  589. {
  590. "fieldPath": "type",
  591. "columnName": "type",
  592. "affinity": "TEXT",
  593. "notNull": true
  594. },
  595. {
  596. "fieldPath": "size",
  597. "columnName": "size",
  598. "affinity": "INTEGER",
  599. "notNull": false
  600. },
  601. {
  602. "fieldPath": "progress",
  603. "columnName": "progress",
  604. "affinity": "INTEGER",
  605. "notNull": false
  606. },
  607. {
  608. "fieldPath": "content",
  609. "columnName": "content",
  610. "affinity": "BLOB",
  611. "notNull": false
  612. }
  613. ],
  614. "primaryKey": {
  615. "columnNames": [
  616. "id"
  617. ],
  618. "autoGenerate": true
  619. },
  620. "indices": [
  621. {
  622. "name": "index_attachment_message",
  623. "unique": false,
  624. "columnNames": [
  625. "message"
  626. ],
  627. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  628. },
  629. {
  630. "name": "index_attachment_message_sequence",
  631. "unique": true,
  632. "columnNames": [
  633. "message",
  634. "sequence"
  635. ],
  636. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  637. }
  638. ],
  639. "foreignKeys": [
  640. {
  641. "table": "message",
  642. "onDelete": "CASCADE",
  643. "onUpdate": "NO ACTION",
  644. "columns": [
  645. "message"
  646. ],
  647. "referencedColumns": [
  648. "id"
  649. ]
  650. }
  651. ]
  652. },
  653. {
  654. "tableName": "operation",
  655. "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 )",
  656. "fields": [
  657. {
  658. "fieldPath": "id",
  659. "columnName": "id",
  660. "affinity": "INTEGER",
  661. "notNull": false
  662. },
  663. {
  664. "fieldPath": "folder",
  665. "columnName": "folder",
  666. "affinity": "INTEGER",
  667. "notNull": true
  668. },
  669. {
  670. "fieldPath": "message",
  671. "columnName": "message",
  672. "affinity": "INTEGER",
  673. "notNull": true
  674. },
  675. {
  676. "fieldPath": "name",
  677. "columnName": "name",
  678. "affinity": "TEXT",
  679. "notNull": true
  680. },
  681. {
  682. "fieldPath": "args",
  683. "columnName": "args",
  684. "affinity": "TEXT",
  685. "notNull": true
  686. },
  687. {
  688. "fieldPath": "error",
  689. "columnName": "error",
  690. "affinity": "TEXT",
  691. "notNull": false
  692. }
  693. ],
  694. "primaryKey": {
  695. "columnNames": [
  696. "id"
  697. ],
  698. "autoGenerate": true
  699. },
  700. "indices": [
  701. {
  702. "name": "index_operation_folder",
  703. "unique": false,
  704. "columnNames": [
  705. "folder"
  706. ],
  707. "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)"
  708. },
  709. {
  710. "name": "index_operation_message",
  711. "unique": false,
  712. "columnNames": [
  713. "message"
  714. ],
  715. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  716. }
  717. ],
  718. "foreignKeys": [
  719. {
  720. "table": "folder",
  721. "onDelete": "CASCADE",
  722. "onUpdate": "NO ACTION",
  723. "columns": [
  724. "folder"
  725. ],
  726. "referencedColumns": [
  727. "id"
  728. ]
  729. },
  730. {
  731. "table": "message",
  732. "onDelete": "CASCADE",
  733. "onUpdate": "NO ACTION",
  734. "columns": [
  735. "message"
  736. ],
  737. "referencedColumns": [
  738. "id"
  739. ]
  740. }
  741. ]
  742. }
  743. ],
  744. "setupQueries": [
  745. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  746. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"9fd2cb9e7b45bf1dbddced278a737dfa\")"
  747. ]
  748. }
  749. }