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.

936 lines
27 KiB

  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 12,
  5. "identityHash": "fe661376a25d2e8b6a9f3e1fa9956daf",
  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, `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": "from",
  430. "columnName": "from",
  431. "affinity": "TEXT",
  432. "notNull": false
  433. },
  434. {
  435. "fieldPath": "to",
  436. "columnName": "to",
  437. "affinity": "TEXT",
  438. "notNull": false
  439. },
  440. {
  441. "fieldPath": "cc",
  442. "columnName": "cc",
  443. "affinity": "TEXT",
  444. "notNull": false
  445. },
  446. {
  447. "fieldPath": "bcc",
  448. "columnName": "bcc",
  449. "affinity": "TEXT",
  450. "notNull": false
  451. },
  452. {
  453. "fieldPath": "reply",
  454. "columnName": "reply",
  455. "affinity": "TEXT",
  456. "notNull": false
  457. },
  458. {
  459. "fieldPath": "headers",
  460. "columnName": "headers",
  461. "affinity": "TEXT",
  462. "notNull": false
  463. },
  464. {
  465. "fieldPath": "subject",
  466. "columnName": "subject",
  467. "affinity": "TEXT",
  468. "notNull": false
  469. },
  470. {
  471. "fieldPath": "sent",
  472. "columnName": "sent",
  473. "affinity": "INTEGER",
  474. "notNull": false
  475. },
  476. {
  477. "fieldPath": "received",
  478. "columnName": "received",
  479. "affinity": "INTEGER",
  480. "notNull": true
  481. },
  482. {
  483. "fieldPath": "stored",
  484. "columnName": "stored",
  485. "affinity": "INTEGER",
  486. "notNull": true
  487. },
  488. {
  489. "fieldPath": "seen",
  490. "columnName": "seen",
  491. "affinity": "INTEGER",
  492. "notNull": true
  493. },
  494. {
  495. "fieldPath": "flagged",
  496. "columnName": "flagged",
  497. "affinity": "INTEGER",
  498. "notNull": true
  499. },
  500. {
  501. "fieldPath": "ui_seen",
  502. "columnName": "ui_seen",
  503. "affinity": "INTEGER",
  504. "notNull": true
  505. },
  506. {
  507. "fieldPath": "ui_flagged",
  508. "columnName": "ui_flagged",
  509. "affinity": "INTEGER",
  510. "notNull": true
  511. },
  512. {
  513. "fieldPath": "ui_hide",
  514. "columnName": "ui_hide",
  515. "affinity": "INTEGER",
  516. "notNull": true
  517. },
  518. {
  519. "fieldPath": "ui_found",
  520. "columnName": "ui_found",
  521. "affinity": "INTEGER",
  522. "notNull": true
  523. },
  524. {
  525. "fieldPath": "error",
  526. "columnName": "error",
  527. "affinity": "TEXT",
  528. "notNull": false
  529. }
  530. ],
  531. "primaryKey": {
  532. "columnNames": [
  533. "id"
  534. ],
  535. "autoGenerate": true
  536. },
  537. "indices": [
  538. {
  539. "name": "index_message_account",
  540. "unique": false,
  541. "columnNames": [
  542. "account"
  543. ],
  544. "createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)"
  545. },
  546. {
  547. "name": "index_message_folder",
  548. "unique": false,
  549. "columnNames": [
  550. "folder"
  551. ],
  552. "createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)"
  553. },
  554. {
  555. "name": "index_message_identity",
  556. "unique": false,
  557. "columnNames": [
  558. "identity"
  559. ],
  560. "createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)"
  561. },
  562. {
  563. "name": "index_message_replying",
  564. "unique": false,
  565. "columnNames": [
  566. "replying"
  567. ],
  568. "createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)"
  569. },
  570. {
  571. "name": "index_message_folder_uid",
  572. "unique": true,
  573. "columnNames": [
  574. "folder",
  575. "uid"
  576. ],
  577. "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)"
  578. },
  579. {
  580. "name": "index_message_msgid_folder",
  581. "unique": true,
  582. "columnNames": [
  583. "msgid",
  584. "folder"
  585. ],
  586. "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)"
  587. },
  588. {
  589. "name": "index_message_thread",
  590. "unique": false,
  591. "columnNames": [
  592. "thread"
  593. ],
  594. "createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)"
  595. },
  596. {
  597. "name": "index_message_received",
  598. "unique": false,
  599. "columnNames": [
  600. "received"
  601. ],
  602. "createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)"
  603. },
  604. {
  605. "name": "index_message_ui_seen",
  606. "unique": false,
  607. "columnNames": [
  608. "ui_seen"
  609. ],
  610. "createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)"
  611. },
  612. {
  613. "name": "index_message_ui_hide",
  614. "unique": false,
  615. "columnNames": [
  616. "ui_hide"
  617. ],
  618. "createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)"
  619. },
  620. {
  621. "name": "index_message_ui_found",
  622. "unique": false,
  623. "columnNames": [
  624. "ui_found"
  625. ],
  626. "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)"
  627. }
  628. ],
  629. "foreignKeys": [
  630. {
  631. "table": "account",
  632. "onDelete": "CASCADE",
  633. "onUpdate": "NO ACTION",
  634. "columns": [
  635. "account"
  636. ],
  637. "referencedColumns": [
  638. "id"
  639. ]
  640. },
  641. {
  642. "table": "folder",
  643. "onDelete": "CASCADE",
  644. "onUpdate": "NO ACTION",
  645. "columns": [
  646. "folder"
  647. ],
  648. "referencedColumns": [
  649. "id"
  650. ]
  651. },
  652. {
  653. "table": "identity",
  654. "onDelete": "CASCADE",
  655. "onUpdate": "NO ACTION",
  656. "columns": [
  657. "identity"
  658. ],
  659. "referencedColumns": [
  660. "id"
  661. ]
  662. },
  663. {
  664. "table": "message",
  665. "onDelete": "CASCADE",
  666. "onUpdate": "NO ACTION",
  667. "columns": [
  668. "replying"
  669. ],
  670. "referencedColumns": [
  671. "id"
  672. ]
  673. }
  674. ]
  675. },
  676. {
  677. "tableName": "attachment",
  678. "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 )",
  679. "fields": [
  680. {
  681. "fieldPath": "id",
  682. "columnName": "id",
  683. "affinity": "INTEGER",
  684. "notNull": false
  685. },
  686. {
  687. "fieldPath": "message",
  688. "columnName": "message",
  689. "affinity": "INTEGER",
  690. "notNull": true
  691. },
  692. {
  693. "fieldPath": "sequence",
  694. "columnName": "sequence",
  695. "affinity": "INTEGER",
  696. "notNull": true
  697. },
  698. {
  699. "fieldPath": "name",
  700. "columnName": "name",
  701. "affinity": "TEXT",
  702. "notNull": false
  703. },
  704. {
  705. "fieldPath": "type",
  706. "columnName": "type",
  707. "affinity": "TEXT",
  708. "notNull": true
  709. },
  710. {
  711. "fieldPath": "size",
  712. "columnName": "size",
  713. "affinity": "INTEGER",
  714. "notNull": false
  715. },
  716. {
  717. "fieldPath": "progress",
  718. "columnName": "progress",
  719. "affinity": "INTEGER",
  720. "notNull": false
  721. },
  722. {
  723. "fieldPath": "available",
  724. "columnName": "available",
  725. "affinity": "INTEGER",
  726. "notNull": true
  727. }
  728. ],
  729. "primaryKey": {
  730. "columnNames": [
  731. "id"
  732. ],
  733. "autoGenerate": true
  734. },
  735. "indices": [
  736. {
  737. "name": "index_attachment_message",
  738. "unique": false,
  739. "columnNames": [
  740. "message"
  741. ],
  742. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  743. },
  744. {
  745. "name": "index_attachment_message_sequence",
  746. "unique": true,
  747. "columnNames": [
  748. "message",
  749. "sequence"
  750. ],
  751. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  752. }
  753. ],
  754. "foreignKeys": [
  755. {
  756. "table": "message",
  757. "onDelete": "CASCADE",
  758. "onUpdate": "NO ACTION",
  759. "columns": [
  760. "message"
  761. ],
  762. "referencedColumns": [
  763. "id"
  764. ]
  765. }
  766. ]
  767. },
  768. {
  769. "tableName": "operation",
  770. "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 )",
  771. "fields": [
  772. {
  773. "fieldPath": "id",
  774. "columnName": "id",
  775. "affinity": "INTEGER",
  776. "notNull": false
  777. },
  778. {
  779. "fieldPath": "folder",
  780. "columnName": "folder",
  781. "affinity": "INTEGER",
  782. "notNull": true
  783. },
  784. {
  785. "fieldPath": "message",
  786. "columnName": "message",
  787. "affinity": "INTEGER",
  788. "notNull": true
  789. },
  790. {
  791. "fieldPath": "name",
  792. "columnName": "name",
  793. "affinity": "TEXT",
  794. "notNull": true
  795. },
  796. {
  797. "fieldPath": "args",
  798. "columnName": "args",
  799. "affinity": "TEXT",
  800. "notNull": true
  801. },
  802. {
  803. "fieldPath": "created",
  804. "columnName": "created",
  805. "affinity": "INTEGER",
  806. "notNull": true
  807. }
  808. ],
  809. "primaryKey": {
  810. "columnNames": [
  811. "id"
  812. ],
  813. "autoGenerate": true
  814. },
  815. "indices": [
  816. {
  817. "name": "index_operation_folder",
  818. "unique": false,
  819. "columnNames": [
  820. "folder"
  821. ],
  822. "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)"
  823. },
  824. {
  825. "name": "index_operation_message",
  826. "unique": false,
  827. "columnNames": [
  828. "message"
  829. ],
  830. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  831. }
  832. ],
  833. "foreignKeys": [
  834. {
  835. "table": "folder",
  836. "onDelete": "CASCADE",
  837. "onUpdate": "NO ACTION",
  838. "columns": [
  839. "folder"
  840. ],
  841. "referencedColumns": [
  842. "id"
  843. ]
  844. },
  845. {
  846. "table": "message",
  847. "onDelete": "CASCADE",
  848. "onUpdate": "NO ACTION",
  849. "columns": [
  850. "message"
  851. ],
  852. "referencedColumns": [
  853. "id"
  854. ]
  855. }
  856. ]
  857. },
  858. {
  859. "tableName": "answer",
  860. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)",
  861. "fields": [
  862. {
  863. "fieldPath": "id",
  864. "columnName": "id",
  865. "affinity": "INTEGER",
  866. "notNull": false
  867. },
  868. {
  869. "fieldPath": "name",
  870. "columnName": "name",
  871. "affinity": "TEXT",
  872. "notNull": true
  873. },
  874. {
  875. "fieldPath": "text",
  876. "columnName": "text",
  877. "affinity": "TEXT",
  878. "notNull": true
  879. }
  880. ],
  881. "primaryKey": {
  882. "columnNames": [
  883. "id"
  884. ],
  885. "autoGenerate": true
  886. },
  887. "indices": [],
  888. "foreignKeys": []
  889. },
  890. {
  891. "tableName": "log",
  892. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)",
  893. "fields": [
  894. {
  895. "fieldPath": "id",
  896. "columnName": "id",
  897. "affinity": "INTEGER",
  898. "notNull": false
  899. },
  900. {
  901. "fieldPath": "time",
  902. "columnName": "time",
  903. "affinity": "INTEGER",
  904. "notNull": true
  905. },
  906. {
  907. "fieldPath": "data",
  908. "columnName": "data",
  909. "affinity": "TEXT",
  910. "notNull": true
  911. }
  912. ],
  913. "primaryKey": {
  914. "columnNames": [
  915. "id"
  916. ],
  917. "autoGenerate": true
  918. },
  919. "indices": [
  920. {
  921. "name": "index_log_time",
  922. "unique": false,
  923. "columnNames": [
  924. "time"
  925. ],
  926. "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)"
  927. }
  928. ],
  929. "foreignKeys": []
  930. }
  931. ],
  932. "setupQueries": [
  933. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  934. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"fe661376a25d2e8b6a9f3e1fa9956daf\")"
  935. ]
  936. }
  937. }