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.

999 lines
29 KiB

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