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.

658 lines
19 KiB

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