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.

1015 lines
30 KiB

  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 22,
  5. "identityHash": "4a69fca3293eda334465a8c9a5cda77f",
  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_ui_found",
  626. "unique": true,
  627. "columnNames": [
  628. "folder",
  629. "uid",
  630. "ui_found"
  631. ],
  632. "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid_ui_found` ON `${TABLE_NAME}` (`folder`, `uid`, `ui_found`)"
  633. },
  634. {
  635. "name": "index_message_msgid_folder_ui_found",
  636. "unique": true,
  637. "columnNames": [
  638. "msgid",
  639. "folder",
  640. "ui_found"
  641. ],
  642. "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder_ui_found` ON `${TABLE_NAME}` (`msgid`, `folder`, `ui_found`)"
  643. },
  644. {
  645. "name": "index_message_thread",
  646. "unique": false,
  647. "columnNames": [
  648. "thread"
  649. ],
  650. "createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)"
  651. },
  652. {
  653. "name": "index_message_received",
  654. "unique": false,
  655. "columnNames": [
  656. "received"
  657. ],
  658. "createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)"
  659. },
  660. {
  661. "name": "index_message_ui_seen",
  662. "unique": false,
  663. "columnNames": [
  664. "ui_seen"
  665. ],
  666. "createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)"
  667. },
  668. {
  669. "name": "index_message_ui_hide",
  670. "unique": false,
  671. "columnNames": [
  672. "ui_hide"
  673. ],
  674. "createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)"
  675. },
  676. {
  677. "name": "index_message_ui_found",
  678. "unique": false,
  679. "columnNames": [
  680. "ui_found"
  681. ],
  682. "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)"
  683. },
  684. {
  685. "name": "index_message_ui_ignored",
  686. "unique": false,
  687. "columnNames": [
  688. "ui_ignored"
  689. ],
  690. "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)"
  691. }
  692. ],
  693. "foreignKeys": [
  694. {
  695. "table": "account",
  696. "onDelete": "CASCADE",
  697. "onUpdate": "NO ACTION",
  698. "columns": [
  699. "account"
  700. ],
  701. "referencedColumns": [
  702. "id"
  703. ]
  704. },
  705. {
  706. "table": "folder",
  707. "onDelete": "CASCADE",
  708. "onUpdate": "NO ACTION",
  709. "columns": [
  710. "folder"
  711. ],
  712. "referencedColumns": [
  713. "id"
  714. ]
  715. },
  716. {
  717. "table": "identity",
  718. "onDelete": "CASCADE",
  719. "onUpdate": "NO ACTION",
  720. "columns": [
  721. "identity"
  722. ],
  723. "referencedColumns": [
  724. "id"
  725. ]
  726. },
  727. {
  728. "table": "message",
  729. "onDelete": "CASCADE",
  730. "onUpdate": "NO ACTION",
  731. "columns": [
  732. "replying"
  733. ],
  734. "referencedColumns": [
  735. "id"
  736. ]
  737. }
  738. ]
  739. },
  740. {
  741. "tableName": "attachment",
  742. "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 )",
  743. "fields": [
  744. {
  745. "fieldPath": "id",
  746. "columnName": "id",
  747. "affinity": "INTEGER",
  748. "notNull": false
  749. },
  750. {
  751. "fieldPath": "message",
  752. "columnName": "message",
  753. "affinity": "INTEGER",
  754. "notNull": true
  755. },
  756. {
  757. "fieldPath": "sequence",
  758. "columnName": "sequence",
  759. "affinity": "INTEGER",
  760. "notNull": true
  761. },
  762. {
  763. "fieldPath": "name",
  764. "columnName": "name",
  765. "affinity": "TEXT",
  766. "notNull": false
  767. },
  768. {
  769. "fieldPath": "type",
  770. "columnName": "type",
  771. "affinity": "TEXT",
  772. "notNull": true
  773. },
  774. {
  775. "fieldPath": "cid",
  776. "columnName": "cid",
  777. "affinity": "TEXT",
  778. "notNull": false
  779. },
  780. {
  781. "fieldPath": "size",
  782. "columnName": "size",
  783. "affinity": "INTEGER",
  784. "notNull": false
  785. },
  786. {
  787. "fieldPath": "progress",
  788. "columnName": "progress",
  789. "affinity": "INTEGER",
  790. "notNull": false
  791. },
  792. {
  793. "fieldPath": "available",
  794. "columnName": "available",
  795. "affinity": "INTEGER",
  796. "notNull": true
  797. }
  798. ],
  799. "primaryKey": {
  800. "columnNames": [
  801. "id"
  802. ],
  803. "autoGenerate": true
  804. },
  805. "indices": [
  806. {
  807. "name": "index_attachment_message",
  808. "unique": false,
  809. "columnNames": [
  810. "message"
  811. ],
  812. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  813. },
  814. {
  815. "name": "index_attachment_message_sequence",
  816. "unique": true,
  817. "columnNames": [
  818. "message",
  819. "sequence"
  820. ],
  821. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  822. },
  823. {
  824. "name": "index_attachment_message_cid",
  825. "unique": true,
  826. "columnNames": [
  827. "message",
  828. "cid"
  829. ],
  830. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)"
  831. }
  832. ],
  833. "foreignKeys": [
  834. {
  835. "table": "message",
  836. "onDelete": "CASCADE",
  837. "onUpdate": "NO ACTION",
  838. "columns": [
  839. "message"
  840. ],
  841. "referencedColumns": [
  842. "id"
  843. ]
  844. }
  845. ]
  846. },
  847. {
  848. "tableName": "operation",
  849. "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 )",
  850. "fields": [
  851. {
  852. "fieldPath": "id",
  853. "columnName": "id",
  854. "affinity": "INTEGER",
  855. "notNull": false
  856. },
  857. {
  858. "fieldPath": "folder",
  859. "columnName": "folder",
  860. "affinity": "INTEGER",
  861. "notNull": true
  862. },
  863. {
  864. "fieldPath": "message",
  865. "columnName": "message",
  866. "affinity": "INTEGER",
  867. "notNull": true
  868. },
  869. {
  870. "fieldPath": "name",
  871. "columnName": "name",
  872. "affinity": "TEXT",
  873. "notNull": true
  874. },
  875. {
  876. "fieldPath": "args",
  877. "columnName": "args",
  878. "affinity": "TEXT",
  879. "notNull": true
  880. },
  881. {
  882. "fieldPath": "created",
  883. "columnName": "created",
  884. "affinity": "INTEGER",
  885. "notNull": true
  886. }
  887. ],
  888. "primaryKey": {
  889. "columnNames": [
  890. "id"
  891. ],
  892. "autoGenerate": true
  893. },
  894. "indices": [
  895. {
  896. "name": "index_operation_folder",
  897. "unique": false,
  898. "columnNames": [
  899. "folder"
  900. ],
  901. "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)"
  902. },
  903. {
  904. "name": "index_operation_message",
  905. "unique": false,
  906. "columnNames": [
  907. "message"
  908. ],
  909. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  910. }
  911. ],
  912. "foreignKeys": [
  913. {
  914. "table": "folder",
  915. "onDelete": "CASCADE",
  916. "onUpdate": "NO ACTION",
  917. "columns": [
  918. "folder"
  919. ],
  920. "referencedColumns": [
  921. "id"
  922. ]
  923. },
  924. {
  925. "table": "message",
  926. "onDelete": "CASCADE",
  927. "onUpdate": "NO ACTION",
  928. "columns": [
  929. "message"
  930. ],
  931. "referencedColumns": [
  932. "id"
  933. ]
  934. }
  935. ]
  936. },
  937. {
  938. "tableName": "answer",
  939. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)",
  940. "fields": [
  941. {
  942. "fieldPath": "id",
  943. "columnName": "id",
  944. "affinity": "INTEGER",
  945. "notNull": false
  946. },
  947. {
  948. "fieldPath": "name",
  949. "columnName": "name",
  950. "affinity": "TEXT",
  951. "notNull": true
  952. },
  953. {
  954. "fieldPath": "text",
  955. "columnName": "text",
  956. "affinity": "TEXT",
  957. "notNull": true
  958. }
  959. ],
  960. "primaryKey": {
  961. "columnNames": [
  962. "id"
  963. ],
  964. "autoGenerate": true
  965. },
  966. "indices": [],
  967. "foreignKeys": []
  968. },
  969. {
  970. "tableName": "log",
  971. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)",
  972. "fields": [
  973. {
  974. "fieldPath": "id",
  975. "columnName": "id",
  976. "affinity": "INTEGER",
  977. "notNull": false
  978. },
  979. {
  980. "fieldPath": "time",
  981. "columnName": "time",
  982. "affinity": "INTEGER",
  983. "notNull": true
  984. },
  985. {
  986. "fieldPath": "data",
  987. "columnName": "data",
  988. "affinity": "TEXT",
  989. "notNull": true
  990. }
  991. ],
  992. "primaryKey": {
  993. "columnNames": [
  994. "id"
  995. ],
  996. "autoGenerate": true
  997. },
  998. "indices": [
  999. {
  1000. "name": "index_log_time",
  1001. "unique": false,
  1002. "columnNames": [
  1003. "time"
  1004. ],
  1005. "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)"
  1006. }
  1007. ],
  1008. "foreignKeys": []
  1009. }
  1010. ],
  1011. "setupQueries": [
  1012. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  1013. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"4a69fca3293eda334465a8c9a5cda77f\")"
  1014. ]
  1015. }
  1016. }