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.

981 lines
29 KiB

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