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.

664 lines
19 KiB

  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 5,
  5. "identityHash": "f6603ac36cf520d5bfc2662bf7853c70",
  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, `capabilities` TEXT NOT NULL)",
  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": "capabilities",
  141. "columnName": "capabilities",
  142. "affinity": "TEXT",
  143. "notNull": true
  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. "foreignKeys": [
  462. {
  463. "table": "account",
  464. "onDelete": "CASCADE",
  465. "onUpdate": "NO ACTION",
  466. "columns": [
  467. "account"
  468. ],
  469. "referencedColumns": [
  470. "id"
  471. ]
  472. },
  473. {
  474. "table": "folder",
  475. "onDelete": "CASCADE",
  476. "onUpdate": "NO ACTION",
  477. "columns": [
  478. "folder"
  479. ],
  480. "referencedColumns": [
  481. "id"
  482. ]
  483. },
  484. {
  485. "table": "identity",
  486. "onDelete": "CASCADE",
  487. "onUpdate": "NO ACTION",
  488. "columns": [
  489. "identity"
  490. ],
  491. "referencedColumns": [
  492. "id"
  493. ]
  494. },
  495. {
  496. "table": "message",
  497. "onDelete": "CASCADE",
  498. "onUpdate": "NO ACTION",
  499. "columns": [
  500. "replying"
  501. ],
  502. "referencedColumns": [
  503. "id"
  504. ]
  505. }
  506. ]
  507. },
  508. {
  509. "tableName": "attachment",
  510. "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 )",
  511. "fields": [
  512. {
  513. "fieldPath": "id",
  514. "columnName": "id",
  515. "affinity": "INTEGER",
  516. "notNull": false
  517. },
  518. {
  519. "fieldPath": "message",
  520. "columnName": "message",
  521. "affinity": "INTEGER",
  522. "notNull": true
  523. },
  524. {
  525. "fieldPath": "sequence",
  526. "columnName": "sequence",
  527. "affinity": "INTEGER",
  528. "notNull": true
  529. },
  530. {
  531. "fieldPath": "name",
  532. "columnName": "name",
  533. "affinity": "TEXT",
  534. "notNull": false
  535. },
  536. {
  537. "fieldPath": "type",
  538. "columnName": "type",
  539. "affinity": "TEXT",
  540. "notNull": true
  541. },
  542. {
  543. "fieldPath": "size",
  544. "columnName": "size",
  545. "affinity": "INTEGER",
  546. "notNull": false
  547. },
  548. {
  549. "fieldPath": "progress",
  550. "columnName": "progress",
  551. "affinity": "INTEGER",
  552. "notNull": false
  553. },
  554. {
  555. "fieldPath": "content",
  556. "columnName": "content",
  557. "affinity": "BLOB",
  558. "notNull": false
  559. }
  560. ],
  561. "primaryKey": {
  562. "columnNames": [
  563. "id"
  564. ],
  565. "autoGenerate": true
  566. },
  567. "indices": [
  568. {
  569. "name": "index_attachment_message",
  570. "unique": false,
  571. "columnNames": [
  572. "message"
  573. ],
  574. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  575. },
  576. {
  577. "name": "index_attachment_message_sequence",
  578. "unique": true,
  579. "columnNames": [
  580. "message",
  581. "sequence"
  582. ],
  583. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  584. }
  585. ],
  586. "foreignKeys": [
  587. {
  588. "table": "message",
  589. "onDelete": "CASCADE",
  590. "onUpdate": "NO ACTION",
  591. "columns": [
  592. "message"
  593. ],
  594. "referencedColumns": [
  595. "id"
  596. ]
  597. }
  598. ]
  599. },
  600. {
  601. "tableName": "operation",
  602. "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 )",
  603. "fields": [
  604. {
  605. "fieldPath": "id",
  606. "columnName": "id",
  607. "affinity": "INTEGER",
  608. "notNull": false
  609. },
  610. {
  611. "fieldPath": "message",
  612. "columnName": "message",
  613. "affinity": "INTEGER",
  614. "notNull": true
  615. },
  616. {
  617. "fieldPath": "name",
  618. "columnName": "name",
  619. "affinity": "TEXT",
  620. "notNull": true
  621. },
  622. {
  623. "fieldPath": "args",
  624. "columnName": "args",
  625. "affinity": "TEXT",
  626. "notNull": false
  627. }
  628. ],
  629. "primaryKey": {
  630. "columnNames": [
  631. "id"
  632. ],
  633. "autoGenerate": true
  634. },
  635. "indices": [
  636. {
  637. "name": "index_operation_message",
  638. "unique": false,
  639. "columnNames": [
  640. "message"
  641. ],
  642. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  643. }
  644. ],
  645. "foreignKeys": [
  646. {
  647. "table": "message",
  648. "onDelete": "CASCADE",
  649. "onUpdate": "NO ACTION",
  650. "columns": [
  651. "message"
  652. ],
  653. "referencedColumns": [
  654. "id"
  655. ]
  656. }
  657. ]
  658. }
  659. ],
  660. "setupQueries": [
  661. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  662. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"f6603ac36cf520d5bfc2662bf7853c70\")"
  663. ]
  664. }
  665. }