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.

942 lines
28 KiB

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