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.

638 lines
18 KiB

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