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.

898 lines
26 KiB

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