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.

1013 lines
30 KiB

  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 21,
  5. "identityHash": "0242a5b831bc703170c3222a5339126a",
  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, `account` INTEGER NOT NULL, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `starttls` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `store_sent` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  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": "account",
  37. "columnName": "account",
  38. "affinity": "INTEGER",
  39. "notNull": true
  40. },
  41. {
  42. "fieldPath": "host",
  43. "columnName": "host",
  44. "affinity": "TEXT",
  45. "notNull": true
  46. },
  47. {
  48. "fieldPath": "port",
  49. "columnName": "port",
  50. "affinity": "INTEGER",
  51. "notNull": true
  52. },
  53. {
  54. "fieldPath": "starttls",
  55. "columnName": "starttls",
  56. "affinity": "INTEGER",
  57. "notNull": true
  58. },
  59. {
  60. "fieldPath": "user",
  61. "columnName": "user",
  62. "affinity": "TEXT",
  63. "notNull": true
  64. },
  65. {
  66. "fieldPath": "password",
  67. "columnName": "password",
  68. "affinity": "TEXT",
  69. "notNull": true
  70. },
  71. {
  72. "fieldPath": "auth_type",
  73. "columnName": "auth_type",
  74. "affinity": "INTEGER",
  75. "notNull": true
  76. },
  77. {
  78. "fieldPath": "primary",
  79. "columnName": "primary",
  80. "affinity": "INTEGER",
  81. "notNull": true
  82. },
  83. {
  84. "fieldPath": "synchronize",
  85. "columnName": "synchronize",
  86. "affinity": "INTEGER",
  87. "notNull": true
  88. },
  89. {
  90. "fieldPath": "store_sent",
  91. "columnName": "store_sent",
  92. "affinity": "INTEGER",
  93. "notNull": true
  94. },
  95. {
  96. "fieldPath": "state",
  97. "columnName": "state",
  98. "affinity": "TEXT",
  99. "notNull": false
  100. },
  101. {
  102. "fieldPath": "error",
  103. "columnName": "error",
  104. "affinity": "TEXT",
  105. "notNull": false
  106. }
  107. ],
  108. "primaryKey": {
  109. "columnNames": [
  110. "id"
  111. ],
  112. "autoGenerate": true
  113. },
  114. "indices": [
  115. {
  116. "name": "index_identity_account",
  117. "unique": false,
  118. "columnNames": [
  119. "account"
  120. ],
  121. "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)"
  122. }
  123. ],
  124. "foreignKeys": [
  125. {
  126. "table": "account",
  127. "onDelete": "CASCADE",
  128. "onUpdate": "NO ACTION",
  129. "columns": [
  130. "account"
  131. ],
  132. "referencedColumns": [
  133. "id"
  134. ]
  135. }
  136. ]
  137. },
  138. {
  139. "tableName": "account",
  140. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)",
  141. "fields": [
  142. {
  143. "fieldPath": "id",
  144. "columnName": "id",
  145. "affinity": "INTEGER",
  146. "notNull": false
  147. },
  148. {
  149. "fieldPath": "name",
  150. "columnName": "name",
  151. "affinity": "TEXT",
  152. "notNull": false
  153. },
  154. {
  155. "fieldPath": "signature",
  156. "columnName": "signature",
  157. "affinity": "TEXT",
  158. "notNull": false
  159. },
  160. {
  161. "fieldPath": "host",
  162. "columnName": "host",
  163. "affinity": "TEXT",
  164. "notNull": true
  165. },
  166. {
  167. "fieldPath": "port",
  168. "columnName": "port",
  169. "affinity": "INTEGER",
  170. "notNull": true
  171. },
  172. {
  173. "fieldPath": "user",
  174. "columnName": "user",
  175. "affinity": "TEXT",
  176. "notNull": true
  177. },
  178. {
  179. "fieldPath": "password",
  180. "columnName": "password",
  181. "affinity": "TEXT",
  182. "notNull": true
  183. },
  184. {
  185. "fieldPath": "auth_type",
  186. "columnName": "auth_type",
  187. "affinity": "INTEGER",
  188. "notNull": true
  189. },
  190. {
  191. "fieldPath": "synchronize",
  192. "columnName": "synchronize",
  193. "affinity": "INTEGER",
  194. "notNull": true
  195. },
  196. {
  197. "fieldPath": "primary",
  198. "columnName": "primary",
  199. "affinity": "INTEGER",
  200. "notNull": true
  201. },
  202. {
  203. "fieldPath": "color",
  204. "columnName": "color",
  205. "affinity": "INTEGER",
  206. "notNull": false
  207. },
  208. {
  209. "fieldPath": "store_sent",
  210. "columnName": "store_sent",
  211. "affinity": "INTEGER",
  212. "notNull": true
  213. },
  214. {
  215. "fieldPath": "poll_interval",
  216. "columnName": "poll_interval",
  217. "affinity": "INTEGER",
  218. "notNull": true
  219. },
  220. {
  221. "fieldPath": "seen_until",
  222. "columnName": "seen_until",
  223. "affinity": "INTEGER",
  224. "notNull": false
  225. },
  226. {
  227. "fieldPath": "state",
  228. "columnName": "state",
  229. "affinity": "TEXT",
  230. "notNull": false
  231. },
  232. {
  233. "fieldPath": "error",
  234. "columnName": "error",
  235. "affinity": "TEXT",
  236. "notNull": false
  237. }
  238. ],
  239. "primaryKey": {
  240. "columnNames": [
  241. "id"
  242. ],
  243. "autoGenerate": true
  244. },
  245. "indices": [],
  246. "foreignKeys": []
  247. },
  248. {
  249. "tableName": "folder",
  250. "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, `poll_interval` INTEGER, `after` INTEGER NOT NULL, `display` TEXT, `hide` INTEGER NOT NULL, `unified` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  251. "fields": [
  252. {
  253. "fieldPath": "id",
  254. "columnName": "id",
  255. "affinity": "INTEGER",
  256. "notNull": false
  257. },
  258. {
  259. "fieldPath": "account",
  260. "columnName": "account",
  261. "affinity": "INTEGER",
  262. "notNull": false
  263. },
  264. {
  265. "fieldPath": "name",
  266. "columnName": "name",
  267. "affinity": "TEXT",
  268. "notNull": true
  269. },
  270. {
  271. "fieldPath": "type",
  272. "columnName": "type",
  273. "affinity": "TEXT",
  274. "notNull": true
  275. },
  276. {
  277. "fieldPath": "synchronize",
  278. "columnName": "synchronize",
  279. "affinity": "INTEGER",
  280. "notNull": true
  281. },
  282. {
  283. "fieldPath": "poll_interval",
  284. "columnName": "poll_interval",
  285. "affinity": "INTEGER",
  286. "notNull": false
  287. },
  288. {
  289. "fieldPath": "after",
  290. "columnName": "after",
  291. "affinity": "INTEGER",
  292. "notNull": true
  293. },
  294. {
  295. "fieldPath": "display",
  296. "columnName": "display",
  297. "affinity": "TEXT",
  298. "notNull": false
  299. },
  300. {
  301. "fieldPath": "hide",
  302. "columnName": "hide",
  303. "affinity": "INTEGER",
  304. "notNull": true
  305. },
  306. {
  307. "fieldPath": "unified",
  308. "columnName": "unified",
  309. "affinity": "INTEGER",
  310. "notNull": true
  311. },
  312. {
  313. "fieldPath": "state",
  314. "columnName": "state",
  315. "affinity": "TEXT",
  316. "notNull": false
  317. },
  318. {
  319. "fieldPath": "error",
  320. "columnName": "error",
  321. "affinity": "TEXT",
  322. "notNull": false
  323. }
  324. ],
  325. "primaryKey": {
  326. "columnNames": [
  327. "id"
  328. ],
  329. "autoGenerate": true
  330. },
  331. "indices": [
  332. {
  333. "name": "index_folder_account_name",
  334. "unique": true,
  335. "columnNames": [
  336. "account",
  337. "name"
  338. ],
  339. "createSql": "CREATE UNIQUE INDEX `index_folder_account_name` ON `${TABLE_NAME}` (`account`, `name`)"
  340. },
  341. {
  342. "name": "index_folder_account",
  343. "unique": false,
  344. "columnNames": [
  345. "account"
  346. ],
  347. "createSql": "CREATE INDEX `index_folder_account` ON `${TABLE_NAME}` (`account`)"
  348. },
  349. {
  350. "name": "index_folder_name",
  351. "unique": false,
  352. "columnNames": [
  353. "name"
  354. ],
  355. "createSql": "CREATE INDEX `index_folder_name` ON `${TABLE_NAME}` (`name`)"
  356. },
  357. {
  358. "name": "index_folder_type",
  359. "unique": false,
  360. "columnNames": [
  361. "type"
  362. ],
  363. "createSql": "CREATE INDEX `index_folder_type` ON `${TABLE_NAME}` (`type`)"
  364. },
  365. {
  366. "name": "index_folder_unified",
  367. "unique": false,
  368. "columnNames": [
  369. "unified"
  370. ],
  371. "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)"
  372. }
  373. ],
  374. "foreignKeys": [
  375. {
  376. "table": "account",
  377. "onDelete": "CASCADE",
  378. "onUpdate": "NO ACTION",
  379. "columns": [
  380. "account"
  381. ],
  382. "referencedColumns": [
  383. "id"
  384. ]
  385. }
  386. ]
  387. },
  388. {
  389. "tableName": "message",
  390. "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, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `sent` INTEGER, `received` INTEGER NOT NULL, `stored` INTEGER NOT NULL, `seen` INTEGER NOT NULL, `flagged` INTEGER NOT NULL, `ui_seen` INTEGER NOT NULL, `ui_flagged` INTEGER NOT NULL, `ui_hide` INTEGER NOT NULL, `ui_found` INTEGER NOT NULL, `ui_ignored` INTEGER NOT NULL, `error` TEXT, 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 )",
  391. "fields": [
  392. {
  393. "fieldPath": "id",
  394. "columnName": "id",
  395. "affinity": "INTEGER",
  396. "notNull": false
  397. },
  398. {
  399. "fieldPath": "account",
  400. "columnName": "account",
  401. "affinity": "INTEGER",
  402. "notNull": false
  403. },
  404. {
  405. "fieldPath": "folder",
  406. "columnName": "folder",
  407. "affinity": "INTEGER",
  408. "notNull": true
  409. },
  410. {
  411. "fieldPath": "identity",
  412. "columnName": "identity",
  413. "affinity": "INTEGER",
  414. "notNull": false
  415. },
  416. {
  417. "fieldPath": "replying",
  418. "columnName": "replying",
  419. "affinity": "INTEGER",
  420. "notNull": false
  421. },
  422. {
  423. "fieldPath": "uid",
  424. "columnName": "uid",
  425. "affinity": "INTEGER",
  426. "notNull": false
  427. },
  428. {
  429. "fieldPath": "msgid",
  430. "columnName": "msgid",
  431. "affinity": "TEXT",
  432. "notNull": false
  433. },
  434. {
  435. "fieldPath": "references",
  436. "columnName": "references",
  437. "affinity": "TEXT",
  438. "notNull": false
  439. },
  440. {
  441. "fieldPath": "deliveredto",
  442. "columnName": "deliveredto",
  443. "affinity": "TEXT",
  444. "notNull": false
  445. },
  446. {
  447. "fieldPath": "inreplyto",
  448. "columnName": "inreplyto",
  449. "affinity": "TEXT",
  450. "notNull": false
  451. },
  452. {
  453. "fieldPath": "thread",
  454. "columnName": "thread",
  455. "affinity": "TEXT",
  456. "notNull": false
  457. },
  458. {
  459. "fieldPath": "avatar",
  460. "columnName": "avatar",
  461. "affinity": "TEXT",
  462. "notNull": false
  463. },
  464. {
  465. "fieldPath": "from",
  466. "columnName": "from",
  467. "affinity": "TEXT",
  468. "notNull": false
  469. },
  470. {
  471. "fieldPath": "to",
  472. "columnName": "to",
  473. "affinity": "TEXT",
  474. "notNull": false
  475. },
  476. {
  477. "fieldPath": "cc",
  478. "columnName": "cc",
  479. "affinity": "TEXT",
  480. "notNull": false
  481. },
  482. {
  483. "fieldPath": "bcc",
  484. "columnName": "bcc",
  485. "affinity": "TEXT",
  486. "notNull": false
  487. },
  488. {
  489. "fieldPath": "reply",
  490. "columnName": "reply",
  491. "affinity": "TEXT",
  492. "notNull": false
  493. },
  494. {
  495. "fieldPath": "headers",
  496. "columnName": "headers",
  497. "affinity": "TEXT",
  498. "notNull": false
  499. },
  500. {
  501. "fieldPath": "subject",
  502. "columnName": "subject",
  503. "affinity": "TEXT",
  504. "notNull": false
  505. },
  506. {
  507. "fieldPath": "size",
  508. "columnName": "size",
  509. "affinity": "INTEGER",
  510. "notNull": false
  511. },
  512. {
  513. "fieldPath": "content",
  514. "columnName": "content",
  515. "affinity": "INTEGER",
  516. "notNull": true
  517. },
  518. {
  519. "fieldPath": "sent",
  520. "columnName": "sent",
  521. "affinity": "INTEGER",
  522. "notNull": false
  523. },
  524. {
  525. "fieldPath": "received",
  526. "columnName": "received",
  527. "affinity": "INTEGER",
  528. "notNull": true
  529. },
  530. {
  531. "fieldPath": "stored",
  532. "columnName": "stored",
  533. "affinity": "INTEGER",
  534. "notNull": true
  535. },
  536. {
  537. "fieldPath": "seen",
  538. "columnName": "seen",
  539. "affinity": "INTEGER",
  540. "notNull": true
  541. },
  542. {
  543. "fieldPath": "flagged",
  544. "columnName": "flagged",
  545. "affinity": "INTEGER",
  546. "notNull": true
  547. },
  548. {
  549. "fieldPath": "ui_seen",
  550. "columnName": "ui_seen",
  551. "affinity": "INTEGER",
  552. "notNull": true
  553. },
  554. {
  555. "fieldPath": "ui_flagged",
  556. "columnName": "ui_flagged",
  557. "affinity": "INTEGER",
  558. "notNull": true
  559. },
  560. {
  561. "fieldPath": "ui_hide",
  562. "columnName": "ui_hide",
  563. "affinity": "INTEGER",
  564. "notNull": true
  565. },
  566. {
  567. "fieldPath": "ui_found",
  568. "columnName": "ui_found",
  569. "affinity": "INTEGER",
  570. "notNull": true
  571. },
  572. {
  573. "fieldPath": "ui_ignored",
  574. "columnName": "ui_ignored",
  575. "affinity": "INTEGER",
  576. "notNull": true
  577. },
  578. {
  579. "fieldPath": "error",
  580. "columnName": "error",
  581. "affinity": "TEXT",
  582. "notNull": false
  583. }
  584. ],
  585. "primaryKey": {
  586. "columnNames": [
  587. "id"
  588. ],
  589. "autoGenerate": true
  590. },
  591. "indices": [
  592. {
  593. "name": "index_message_account",
  594. "unique": false,
  595. "columnNames": [
  596. "account"
  597. ],
  598. "createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)"
  599. },
  600. {
  601. "name": "index_message_folder",
  602. "unique": false,
  603. "columnNames": [
  604. "folder"
  605. ],
  606. "createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)"
  607. },
  608. {
  609. "name": "index_message_identity",
  610. "unique": false,
  611. "columnNames": [
  612. "identity"
  613. ],
  614. "createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)"
  615. },
  616. {
  617. "name": "index_message_replying",
  618. "unique": false,
  619. "columnNames": [
  620. "replying"
  621. ],
  622. "createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)"
  623. },
  624. {
  625. "name": "index_message_folder_uid",
  626. "unique": true,
  627. "columnNames": [
  628. "folder",
  629. "uid"
  630. ],
  631. "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)"
  632. },
  633. {
  634. "name": "index_message_msgid_folder",
  635. "unique": true,
  636. "columnNames": [
  637. "msgid",
  638. "folder"
  639. ],
  640. "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)"
  641. },
  642. {
  643. "name": "index_message_thread",
  644. "unique": false,
  645. "columnNames": [
  646. "thread"
  647. ],
  648. "createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)"
  649. },
  650. {
  651. "name": "index_message_received",
  652. "unique": false,
  653. "columnNames": [
  654. "received"
  655. ],
  656. "createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)"
  657. },
  658. {
  659. "name": "index_message_ui_seen",
  660. "unique": false,
  661. "columnNames": [
  662. "ui_seen"
  663. ],
  664. "createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)"
  665. },
  666. {
  667. "name": "index_message_ui_hide",
  668. "unique": false,
  669. "columnNames": [
  670. "ui_hide"
  671. ],
  672. "createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)"
  673. },
  674. {
  675. "name": "index_message_ui_found",
  676. "unique": false,
  677. "columnNames": [
  678. "ui_found"
  679. ],
  680. "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)"
  681. },
  682. {
  683. "name": "index_message_ui_ignored",
  684. "unique": false,
  685. "columnNames": [
  686. "ui_ignored"
  687. ],
  688. "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)"
  689. }
  690. ],
  691. "foreignKeys": [
  692. {
  693. "table": "account",
  694. "onDelete": "CASCADE",
  695. "onUpdate": "NO ACTION",
  696. "columns": [
  697. "account"
  698. ],
  699. "referencedColumns": [
  700. "id"
  701. ]
  702. },
  703. {
  704. "table": "folder",
  705. "onDelete": "CASCADE",
  706. "onUpdate": "NO ACTION",
  707. "columns": [
  708. "folder"
  709. ],
  710. "referencedColumns": [
  711. "id"
  712. ]
  713. },
  714. {
  715. "table": "identity",
  716. "onDelete": "CASCADE",
  717. "onUpdate": "NO ACTION",
  718. "columns": [
  719. "identity"
  720. ],
  721. "referencedColumns": [
  722. "id"
  723. ]
  724. },
  725. {
  726. "table": "message",
  727. "onDelete": "CASCADE",
  728. "onUpdate": "NO ACTION",
  729. "columns": [
  730. "replying"
  731. ],
  732. "referencedColumns": [
  733. "id"
  734. ]
  735. }
  736. ]
  737. },
  738. {
  739. "tableName": "attachment",
  740. "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  741. "fields": [
  742. {
  743. "fieldPath": "id",
  744. "columnName": "id",
  745. "affinity": "INTEGER",
  746. "notNull": false
  747. },
  748. {
  749. "fieldPath": "message",
  750. "columnName": "message",
  751. "affinity": "INTEGER",
  752. "notNull": true
  753. },
  754. {
  755. "fieldPath": "sequence",
  756. "columnName": "sequence",
  757. "affinity": "INTEGER",
  758. "notNull": true
  759. },
  760. {
  761. "fieldPath": "name",
  762. "columnName": "name",
  763. "affinity": "TEXT",
  764. "notNull": false
  765. },
  766. {
  767. "fieldPath": "type",
  768. "columnName": "type",
  769. "affinity": "TEXT",
  770. "notNull": true
  771. },
  772. {
  773. "fieldPath": "cid",
  774. "columnName": "cid",
  775. "affinity": "TEXT",
  776. "notNull": false
  777. },
  778. {
  779. "fieldPath": "size",
  780. "columnName": "size",
  781. "affinity": "INTEGER",
  782. "notNull": false
  783. },
  784. {
  785. "fieldPath": "progress",
  786. "columnName": "progress",
  787. "affinity": "INTEGER",
  788. "notNull": false
  789. },
  790. {
  791. "fieldPath": "available",
  792. "columnName": "available",
  793. "affinity": "INTEGER",
  794. "notNull": true
  795. }
  796. ],
  797. "primaryKey": {
  798. "columnNames": [
  799. "id"
  800. ],
  801. "autoGenerate": true
  802. },
  803. "indices": [
  804. {
  805. "name": "index_attachment_message",
  806. "unique": false,
  807. "columnNames": [
  808. "message"
  809. ],
  810. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  811. },
  812. {
  813. "name": "index_attachment_message_sequence",
  814. "unique": true,
  815. "columnNames": [
  816. "message",
  817. "sequence"
  818. ],
  819. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  820. },
  821. {
  822. "name": "index_attachment_message_cid",
  823. "unique": true,
  824. "columnNames": [
  825. "message",
  826. "cid"
  827. ],
  828. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)"
  829. }
  830. ],
  831. "foreignKeys": [
  832. {
  833. "table": "message",
  834. "onDelete": "CASCADE",
  835. "onUpdate": "NO ACTION",
  836. "columns": [
  837. "message"
  838. ],
  839. "referencedColumns": [
  840. "id"
  841. ]
  842. }
  843. ]
  844. },
  845. {
  846. "tableName": "operation",
  847. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `folder` INTEGER NOT NULL, `message` INTEGER NOT NULL, `name` TEXT NOT NULL, `args` TEXT NOT NULL, `created` INTEGER NOT NULL, FOREIGN KEY(`folder`) REFERENCES `folder`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  848. "fields": [
  849. {
  850. "fieldPath": "id",
  851. "columnName": "id",
  852. "affinity": "INTEGER",
  853. "notNull": false
  854. },
  855. {
  856. "fieldPath": "folder",
  857. "columnName": "folder",
  858. "affinity": "INTEGER",
  859. "notNull": true
  860. },
  861. {
  862. "fieldPath": "message",
  863. "columnName": "message",
  864. "affinity": "INTEGER",
  865. "notNull": true
  866. },
  867. {
  868. "fieldPath": "name",
  869. "columnName": "name",
  870. "affinity": "TEXT",
  871. "notNull": true
  872. },
  873. {
  874. "fieldPath": "args",
  875. "columnName": "args",
  876. "affinity": "TEXT",
  877. "notNull": true
  878. },
  879. {
  880. "fieldPath": "created",
  881. "columnName": "created",
  882. "affinity": "INTEGER",
  883. "notNull": true
  884. }
  885. ],
  886. "primaryKey": {
  887. "columnNames": [
  888. "id"
  889. ],
  890. "autoGenerate": true
  891. },
  892. "indices": [
  893. {
  894. "name": "index_operation_folder",
  895. "unique": false,
  896. "columnNames": [
  897. "folder"
  898. ],
  899. "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)"
  900. },
  901. {
  902. "name": "index_operation_message",
  903. "unique": false,
  904. "columnNames": [
  905. "message"
  906. ],
  907. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  908. }
  909. ],
  910. "foreignKeys": [
  911. {
  912. "table": "folder",
  913. "onDelete": "CASCADE",
  914. "onUpdate": "NO ACTION",
  915. "columns": [
  916. "folder"
  917. ],
  918. "referencedColumns": [
  919. "id"
  920. ]
  921. },
  922. {
  923. "table": "message",
  924. "onDelete": "CASCADE",
  925. "onUpdate": "NO ACTION",
  926. "columns": [
  927. "message"
  928. ],
  929. "referencedColumns": [
  930. "id"
  931. ]
  932. }
  933. ]
  934. },
  935. {
  936. "tableName": "answer",
  937. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)",
  938. "fields": [
  939. {
  940. "fieldPath": "id",
  941. "columnName": "id",
  942. "affinity": "INTEGER",
  943. "notNull": false
  944. },
  945. {
  946. "fieldPath": "name",
  947. "columnName": "name",
  948. "affinity": "TEXT",
  949. "notNull": true
  950. },
  951. {
  952. "fieldPath": "text",
  953. "columnName": "text",
  954. "affinity": "TEXT",
  955. "notNull": true
  956. }
  957. ],
  958. "primaryKey": {
  959. "columnNames": [
  960. "id"
  961. ],
  962. "autoGenerate": true
  963. },
  964. "indices": [],
  965. "foreignKeys": []
  966. },
  967. {
  968. "tableName": "log",
  969. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)",
  970. "fields": [
  971. {
  972. "fieldPath": "id",
  973. "columnName": "id",
  974. "affinity": "INTEGER",
  975. "notNull": false
  976. },
  977. {
  978. "fieldPath": "time",
  979. "columnName": "time",
  980. "affinity": "INTEGER",
  981. "notNull": true
  982. },
  983. {
  984. "fieldPath": "data",
  985. "columnName": "data",
  986. "affinity": "TEXT",
  987. "notNull": true
  988. }
  989. ],
  990. "primaryKey": {
  991. "columnNames": [
  992. "id"
  993. ],
  994. "autoGenerate": true
  995. },
  996. "indices": [
  997. {
  998. "name": "index_log_time",
  999. "unique": false,
  1000. "columnNames": [
  1001. "time"
  1002. ],
  1003. "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)"
  1004. }
  1005. ],
  1006. "foreignKeys": []
  1007. }
  1008. ],
  1009. "setupQueries": [
  1010. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  1011. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"0242a5b831bc703170c3222a5339126a\")"
  1012. ]
  1013. }
  1014. }