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.

993 lines
29 KiB

  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 19,
  5. "identityHash": "8be67722423e2c0044f7be118b861ea3",
  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, `unified` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `display` TEXT, `hide` 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": "unified",
  278. "columnName": "unified",
  279. "affinity": "INTEGER",
  280. "notNull": true
  281. },
  282. {
  283. "fieldPath": "synchronize",
  284. "columnName": "synchronize",
  285. "affinity": "INTEGER",
  286. "notNull": true
  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": "state",
  308. "columnName": "state",
  309. "affinity": "TEXT",
  310. "notNull": false
  311. },
  312. {
  313. "fieldPath": "error",
  314. "columnName": "error",
  315. "affinity": "TEXT",
  316. "notNull": false
  317. }
  318. ],
  319. "primaryKey": {
  320. "columnNames": [
  321. "id"
  322. ],
  323. "autoGenerate": true
  324. },
  325. "indices": [
  326. {
  327. "name": "index_folder_account_name",
  328. "unique": true,
  329. "columnNames": [
  330. "account",
  331. "name"
  332. ],
  333. "createSql": "CREATE UNIQUE INDEX `index_folder_account_name` ON `${TABLE_NAME}` (`account`, `name`)"
  334. },
  335. {
  336. "name": "index_folder_account",
  337. "unique": false,
  338. "columnNames": [
  339. "account"
  340. ],
  341. "createSql": "CREATE INDEX `index_folder_account` ON `${TABLE_NAME}` (`account`)"
  342. },
  343. {
  344. "name": "index_folder_name",
  345. "unique": false,
  346. "columnNames": [
  347. "name"
  348. ],
  349. "createSql": "CREATE INDEX `index_folder_name` ON `${TABLE_NAME}` (`name`)"
  350. },
  351. {
  352. "name": "index_folder_type",
  353. "unique": false,
  354. "columnNames": [
  355. "type"
  356. ],
  357. "createSql": "CREATE INDEX `index_folder_type` ON `${TABLE_NAME}` (`type`)"
  358. },
  359. {
  360. "name": "index_folder_unified",
  361. "unique": false,
  362. "columnNames": [
  363. "unified"
  364. ],
  365. "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)"
  366. }
  367. ],
  368. "foreignKeys": [
  369. {
  370. "table": "account",
  371. "onDelete": "CASCADE",
  372. "onUpdate": "NO ACTION",
  373. "columns": [
  374. "account"
  375. ],
  376. "referencedColumns": [
  377. "id"
  378. ]
  379. }
  380. ]
  381. },
  382. {
  383. "tableName": "message",
  384. "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 )",
  385. "fields": [
  386. {
  387. "fieldPath": "id",
  388. "columnName": "id",
  389. "affinity": "INTEGER",
  390. "notNull": false
  391. },
  392. {
  393. "fieldPath": "account",
  394. "columnName": "account",
  395. "affinity": "INTEGER",
  396. "notNull": false
  397. },
  398. {
  399. "fieldPath": "folder",
  400. "columnName": "folder",
  401. "affinity": "INTEGER",
  402. "notNull": true
  403. },
  404. {
  405. "fieldPath": "identity",
  406. "columnName": "identity",
  407. "affinity": "INTEGER",
  408. "notNull": false
  409. },
  410. {
  411. "fieldPath": "replying",
  412. "columnName": "replying",
  413. "affinity": "INTEGER",
  414. "notNull": false
  415. },
  416. {
  417. "fieldPath": "uid",
  418. "columnName": "uid",
  419. "affinity": "INTEGER",
  420. "notNull": false
  421. },
  422. {
  423. "fieldPath": "msgid",
  424. "columnName": "msgid",
  425. "affinity": "TEXT",
  426. "notNull": false
  427. },
  428. {
  429. "fieldPath": "references",
  430. "columnName": "references",
  431. "affinity": "TEXT",
  432. "notNull": false
  433. },
  434. {
  435. "fieldPath": "deliveredto",
  436. "columnName": "deliveredto",
  437. "affinity": "TEXT",
  438. "notNull": false
  439. },
  440. {
  441. "fieldPath": "inreplyto",
  442. "columnName": "inreplyto",
  443. "affinity": "TEXT",
  444. "notNull": false
  445. },
  446. {
  447. "fieldPath": "thread",
  448. "columnName": "thread",
  449. "affinity": "TEXT",
  450. "notNull": false
  451. },
  452. {
  453. "fieldPath": "avatar",
  454. "columnName": "avatar",
  455. "affinity": "TEXT",
  456. "notNull": false
  457. },
  458. {
  459. "fieldPath": "from",
  460. "columnName": "from",
  461. "affinity": "TEXT",
  462. "notNull": false
  463. },
  464. {
  465. "fieldPath": "to",
  466. "columnName": "to",
  467. "affinity": "TEXT",
  468. "notNull": false
  469. },
  470. {
  471. "fieldPath": "cc",
  472. "columnName": "cc",
  473. "affinity": "TEXT",
  474. "notNull": false
  475. },
  476. {
  477. "fieldPath": "bcc",
  478. "columnName": "bcc",
  479. "affinity": "TEXT",
  480. "notNull": false
  481. },
  482. {
  483. "fieldPath": "reply",
  484. "columnName": "reply",
  485. "affinity": "TEXT",
  486. "notNull": false
  487. },
  488. {
  489. "fieldPath": "headers",
  490. "columnName": "headers",
  491. "affinity": "TEXT",
  492. "notNull": false
  493. },
  494. {
  495. "fieldPath": "subject",
  496. "columnName": "subject",
  497. "affinity": "TEXT",
  498. "notNull": false
  499. },
  500. {
  501. "fieldPath": "size",
  502. "columnName": "size",
  503. "affinity": "INTEGER",
  504. "notNull": false
  505. },
  506. {
  507. "fieldPath": "content",
  508. "columnName": "content",
  509. "affinity": "INTEGER",
  510. "notNull": true
  511. },
  512. {
  513. "fieldPath": "sent",
  514. "columnName": "sent",
  515. "affinity": "INTEGER",
  516. "notNull": false
  517. },
  518. {
  519. "fieldPath": "received",
  520. "columnName": "received",
  521. "affinity": "INTEGER",
  522. "notNull": true
  523. },
  524. {
  525. "fieldPath": "stored",
  526. "columnName": "stored",
  527. "affinity": "INTEGER",
  528. "notNull": true
  529. },
  530. {
  531. "fieldPath": "seen",
  532. "columnName": "seen",
  533. "affinity": "INTEGER",
  534. "notNull": true
  535. },
  536. {
  537. "fieldPath": "flagged",
  538. "columnName": "flagged",
  539. "affinity": "INTEGER",
  540. "notNull": true
  541. },
  542. {
  543. "fieldPath": "ui_seen",
  544. "columnName": "ui_seen",
  545. "affinity": "INTEGER",
  546. "notNull": true
  547. },
  548. {
  549. "fieldPath": "ui_flagged",
  550. "columnName": "ui_flagged",
  551. "affinity": "INTEGER",
  552. "notNull": true
  553. },
  554. {
  555. "fieldPath": "ui_hide",
  556. "columnName": "ui_hide",
  557. "affinity": "INTEGER",
  558. "notNull": true
  559. },
  560. {
  561. "fieldPath": "ui_found",
  562. "columnName": "ui_found",
  563. "affinity": "INTEGER",
  564. "notNull": true
  565. },
  566. {
  567. "fieldPath": "error",
  568. "columnName": "error",
  569. "affinity": "TEXT",
  570. "notNull": false
  571. }
  572. ],
  573. "primaryKey": {
  574. "columnNames": [
  575. "id"
  576. ],
  577. "autoGenerate": true
  578. },
  579. "indices": [
  580. {
  581. "name": "index_message_account",
  582. "unique": false,
  583. "columnNames": [
  584. "account"
  585. ],
  586. "createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)"
  587. },
  588. {
  589. "name": "index_message_folder",
  590. "unique": false,
  591. "columnNames": [
  592. "folder"
  593. ],
  594. "createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)"
  595. },
  596. {
  597. "name": "index_message_identity",
  598. "unique": false,
  599. "columnNames": [
  600. "identity"
  601. ],
  602. "createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)"
  603. },
  604. {
  605. "name": "index_message_replying",
  606. "unique": false,
  607. "columnNames": [
  608. "replying"
  609. ],
  610. "createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)"
  611. },
  612. {
  613. "name": "index_message_folder_uid",
  614. "unique": true,
  615. "columnNames": [
  616. "folder",
  617. "uid"
  618. ],
  619. "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)"
  620. },
  621. {
  622. "name": "index_message_msgid_folder",
  623. "unique": true,
  624. "columnNames": [
  625. "msgid",
  626. "folder"
  627. ],
  628. "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)"
  629. },
  630. {
  631. "name": "index_message_thread",
  632. "unique": false,
  633. "columnNames": [
  634. "thread"
  635. ],
  636. "createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)"
  637. },
  638. {
  639. "name": "index_message_received",
  640. "unique": false,
  641. "columnNames": [
  642. "received"
  643. ],
  644. "createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)"
  645. },
  646. {
  647. "name": "index_message_ui_seen",
  648. "unique": false,
  649. "columnNames": [
  650. "ui_seen"
  651. ],
  652. "createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)"
  653. },
  654. {
  655. "name": "index_message_ui_hide",
  656. "unique": false,
  657. "columnNames": [
  658. "ui_hide"
  659. ],
  660. "createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)"
  661. },
  662. {
  663. "name": "index_message_ui_found",
  664. "unique": false,
  665. "columnNames": [
  666. "ui_found"
  667. ],
  668. "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)"
  669. }
  670. ],
  671. "foreignKeys": [
  672. {
  673. "table": "account",
  674. "onDelete": "CASCADE",
  675. "onUpdate": "NO ACTION",
  676. "columns": [
  677. "account"
  678. ],
  679. "referencedColumns": [
  680. "id"
  681. ]
  682. },
  683. {
  684. "table": "folder",
  685. "onDelete": "CASCADE",
  686. "onUpdate": "NO ACTION",
  687. "columns": [
  688. "folder"
  689. ],
  690. "referencedColumns": [
  691. "id"
  692. ]
  693. },
  694. {
  695. "table": "identity",
  696. "onDelete": "CASCADE",
  697. "onUpdate": "NO ACTION",
  698. "columns": [
  699. "identity"
  700. ],
  701. "referencedColumns": [
  702. "id"
  703. ]
  704. },
  705. {
  706. "table": "message",
  707. "onDelete": "CASCADE",
  708. "onUpdate": "NO ACTION",
  709. "columns": [
  710. "replying"
  711. ],
  712. "referencedColumns": [
  713. "id"
  714. ]
  715. }
  716. ]
  717. },
  718. {
  719. "tableName": "attachment",
  720. "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 )",
  721. "fields": [
  722. {
  723. "fieldPath": "id",
  724. "columnName": "id",
  725. "affinity": "INTEGER",
  726. "notNull": false
  727. },
  728. {
  729. "fieldPath": "message",
  730. "columnName": "message",
  731. "affinity": "INTEGER",
  732. "notNull": true
  733. },
  734. {
  735. "fieldPath": "sequence",
  736. "columnName": "sequence",
  737. "affinity": "INTEGER",
  738. "notNull": true
  739. },
  740. {
  741. "fieldPath": "name",
  742. "columnName": "name",
  743. "affinity": "TEXT",
  744. "notNull": false
  745. },
  746. {
  747. "fieldPath": "type",
  748. "columnName": "type",
  749. "affinity": "TEXT",
  750. "notNull": true
  751. },
  752. {
  753. "fieldPath": "cid",
  754. "columnName": "cid",
  755. "affinity": "TEXT",
  756. "notNull": false
  757. },
  758. {
  759. "fieldPath": "size",
  760. "columnName": "size",
  761. "affinity": "INTEGER",
  762. "notNull": false
  763. },
  764. {
  765. "fieldPath": "progress",
  766. "columnName": "progress",
  767. "affinity": "INTEGER",
  768. "notNull": false
  769. },
  770. {
  771. "fieldPath": "available",
  772. "columnName": "available",
  773. "affinity": "INTEGER",
  774. "notNull": true
  775. }
  776. ],
  777. "primaryKey": {
  778. "columnNames": [
  779. "id"
  780. ],
  781. "autoGenerate": true
  782. },
  783. "indices": [
  784. {
  785. "name": "index_attachment_message",
  786. "unique": false,
  787. "columnNames": [
  788. "message"
  789. ],
  790. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  791. },
  792. {
  793. "name": "index_attachment_message_sequence",
  794. "unique": true,
  795. "columnNames": [
  796. "message",
  797. "sequence"
  798. ],
  799. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  800. },
  801. {
  802. "name": "index_attachment_message_cid",
  803. "unique": true,
  804. "columnNames": [
  805. "message",
  806. "cid"
  807. ],
  808. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)"
  809. }
  810. ],
  811. "foreignKeys": [
  812. {
  813. "table": "message",
  814. "onDelete": "CASCADE",
  815. "onUpdate": "NO ACTION",
  816. "columns": [
  817. "message"
  818. ],
  819. "referencedColumns": [
  820. "id"
  821. ]
  822. }
  823. ]
  824. },
  825. {
  826. "tableName": "operation",
  827. "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 )",
  828. "fields": [
  829. {
  830. "fieldPath": "id",
  831. "columnName": "id",
  832. "affinity": "INTEGER",
  833. "notNull": false
  834. },
  835. {
  836. "fieldPath": "folder",
  837. "columnName": "folder",
  838. "affinity": "INTEGER",
  839. "notNull": true
  840. },
  841. {
  842. "fieldPath": "message",
  843. "columnName": "message",
  844. "affinity": "INTEGER",
  845. "notNull": true
  846. },
  847. {
  848. "fieldPath": "name",
  849. "columnName": "name",
  850. "affinity": "TEXT",
  851. "notNull": true
  852. },
  853. {
  854. "fieldPath": "args",
  855. "columnName": "args",
  856. "affinity": "TEXT",
  857. "notNull": true
  858. },
  859. {
  860. "fieldPath": "created",
  861. "columnName": "created",
  862. "affinity": "INTEGER",
  863. "notNull": true
  864. }
  865. ],
  866. "primaryKey": {
  867. "columnNames": [
  868. "id"
  869. ],
  870. "autoGenerate": true
  871. },
  872. "indices": [
  873. {
  874. "name": "index_operation_folder",
  875. "unique": false,
  876. "columnNames": [
  877. "folder"
  878. ],
  879. "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)"
  880. },
  881. {
  882. "name": "index_operation_message",
  883. "unique": false,
  884. "columnNames": [
  885. "message"
  886. ],
  887. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  888. }
  889. ],
  890. "foreignKeys": [
  891. {
  892. "table": "folder",
  893. "onDelete": "CASCADE",
  894. "onUpdate": "NO ACTION",
  895. "columns": [
  896. "folder"
  897. ],
  898. "referencedColumns": [
  899. "id"
  900. ]
  901. },
  902. {
  903. "table": "message",
  904. "onDelete": "CASCADE",
  905. "onUpdate": "NO ACTION",
  906. "columns": [
  907. "message"
  908. ],
  909. "referencedColumns": [
  910. "id"
  911. ]
  912. }
  913. ]
  914. },
  915. {
  916. "tableName": "answer",
  917. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)",
  918. "fields": [
  919. {
  920. "fieldPath": "id",
  921. "columnName": "id",
  922. "affinity": "INTEGER",
  923. "notNull": false
  924. },
  925. {
  926. "fieldPath": "name",
  927. "columnName": "name",
  928. "affinity": "TEXT",
  929. "notNull": true
  930. },
  931. {
  932. "fieldPath": "text",
  933. "columnName": "text",
  934. "affinity": "TEXT",
  935. "notNull": true
  936. }
  937. ],
  938. "primaryKey": {
  939. "columnNames": [
  940. "id"
  941. ],
  942. "autoGenerate": true
  943. },
  944. "indices": [],
  945. "foreignKeys": []
  946. },
  947. {
  948. "tableName": "log",
  949. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)",
  950. "fields": [
  951. {
  952. "fieldPath": "id",
  953. "columnName": "id",
  954. "affinity": "INTEGER",
  955. "notNull": false
  956. },
  957. {
  958. "fieldPath": "time",
  959. "columnName": "time",
  960. "affinity": "INTEGER",
  961. "notNull": true
  962. },
  963. {
  964. "fieldPath": "data",
  965. "columnName": "data",
  966. "affinity": "TEXT",
  967. "notNull": true
  968. }
  969. ],
  970. "primaryKey": {
  971. "columnNames": [
  972. "id"
  973. ],
  974. "autoGenerate": true
  975. },
  976. "indices": [
  977. {
  978. "name": "index_log_time",
  979. "unique": false,
  980. "columnNames": [
  981. "time"
  982. ],
  983. "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)"
  984. }
  985. ],
  986. "foreignKeys": []
  987. }
  988. ],
  989. "setupQueries": [
  990. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  991. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"8be67722423e2c0044f7be118b861ea3\")"
  992. ]
  993. }
  994. }