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.

672 lines
20 KiB

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