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.

716 lines
21 KiB

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