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.

666 lines
19 KiB

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