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.

987 lines
29 KiB

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