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.

890 lines
26 KiB

6 years ago
  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 7,
  5. "identityHash": "78658430615109b7c163e62ed1ad0a48",
  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. "foreignKeys": [
  584. {
  585. "table": "account",
  586. "onDelete": "CASCADE",
  587. "onUpdate": "NO ACTION",
  588. "columns": [
  589. "account"
  590. ],
  591. "referencedColumns": [
  592. "id"
  593. ]
  594. },
  595. {
  596. "table": "folder",
  597. "onDelete": "CASCADE",
  598. "onUpdate": "NO ACTION",
  599. "columns": [
  600. "folder"
  601. ],
  602. "referencedColumns": [
  603. "id"
  604. ]
  605. },
  606. {
  607. "table": "identity",
  608. "onDelete": "CASCADE",
  609. "onUpdate": "NO ACTION",
  610. "columns": [
  611. "identity"
  612. ],
  613. "referencedColumns": [
  614. "id"
  615. ]
  616. },
  617. {
  618. "table": "message",
  619. "onDelete": "CASCADE",
  620. "onUpdate": "NO ACTION",
  621. "columns": [
  622. "replying"
  623. ],
  624. "referencedColumns": [
  625. "id"
  626. ]
  627. }
  628. ]
  629. },
  630. {
  631. "tableName": "attachment",
  632. "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 )",
  633. "fields": [
  634. {
  635. "fieldPath": "id",
  636. "columnName": "id",
  637. "affinity": "INTEGER",
  638. "notNull": false
  639. },
  640. {
  641. "fieldPath": "message",
  642. "columnName": "message",
  643. "affinity": "INTEGER",
  644. "notNull": true
  645. },
  646. {
  647. "fieldPath": "sequence",
  648. "columnName": "sequence",
  649. "affinity": "INTEGER",
  650. "notNull": true
  651. },
  652. {
  653. "fieldPath": "name",
  654. "columnName": "name",
  655. "affinity": "TEXT",
  656. "notNull": false
  657. },
  658. {
  659. "fieldPath": "type",
  660. "columnName": "type",
  661. "affinity": "TEXT",
  662. "notNull": true
  663. },
  664. {
  665. "fieldPath": "size",
  666. "columnName": "size",
  667. "affinity": "INTEGER",
  668. "notNull": false
  669. },
  670. {
  671. "fieldPath": "progress",
  672. "columnName": "progress",
  673. "affinity": "INTEGER",
  674. "notNull": false
  675. },
  676. {
  677. "fieldPath": "available",
  678. "columnName": "available",
  679. "affinity": "INTEGER",
  680. "notNull": true
  681. }
  682. ],
  683. "primaryKey": {
  684. "columnNames": [
  685. "id"
  686. ],
  687. "autoGenerate": true
  688. },
  689. "indices": [
  690. {
  691. "name": "index_attachment_message",
  692. "unique": false,
  693. "columnNames": [
  694. "message"
  695. ],
  696. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  697. },
  698. {
  699. "name": "index_attachment_message_sequence",
  700. "unique": true,
  701. "columnNames": [
  702. "message",
  703. "sequence"
  704. ],
  705. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  706. }
  707. ],
  708. "foreignKeys": [
  709. {
  710. "table": "message",
  711. "onDelete": "CASCADE",
  712. "onUpdate": "NO ACTION",
  713. "columns": [
  714. "message"
  715. ],
  716. "referencedColumns": [
  717. "id"
  718. ]
  719. }
  720. ]
  721. },
  722. {
  723. "tableName": "operation",
  724. "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 )",
  725. "fields": [
  726. {
  727. "fieldPath": "id",
  728. "columnName": "id",
  729. "affinity": "INTEGER",
  730. "notNull": false
  731. },
  732. {
  733. "fieldPath": "folder",
  734. "columnName": "folder",
  735. "affinity": "INTEGER",
  736. "notNull": true
  737. },
  738. {
  739. "fieldPath": "message",
  740. "columnName": "message",
  741. "affinity": "INTEGER",
  742. "notNull": true
  743. },
  744. {
  745. "fieldPath": "name",
  746. "columnName": "name",
  747. "affinity": "TEXT",
  748. "notNull": true
  749. },
  750. {
  751. "fieldPath": "args",
  752. "columnName": "args",
  753. "affinity": "TEXT",
  754. "notNull": true
  755. },
  756. {
  757. "fieldPath": "created",
  758. "columnName": "created",
  759. "affinity": "INTEGER",
  760. "notNull": true
  761. }
  762. ],
  763. "primaryKey": {
  764. "columnNames": [
  765. "id"
  766. ],
  767. "autoGenerate": true
  768. },
  769. "indices": [
  770. {
  771. "name": "index_operation_folder",
  772. "unique": false,
  773. "columnNames": [
  774. "folder"
  775. ],
  776. "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)"
  777. },
  778. {
  779. "name": "index_operation_message",
  780. "unique": false,
  781. "columnNames": [
  782. "message"
  783. ],
  784. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  785. }
  786. ],
  787. "foreignKeys": [
  788. {
  789. "table": "folder",
  790. "onDelete": "CASCADE",
  791. "onUpdate": "NO ACTION",
  792. "columns": [
  793. "folder"
  794. ],
  795. "referencedColumns": [
  796. "id"
  797. ]
  798. },
  799. {
  800. "table": "message",
  801. "onDelete": "CASCADE",
  802. "onUpdate": "NO ACTION",
  803. "columns": [
  804. "message"
  805. ],
  806. "referencedColumns": [
  807. "id"
  808. ]
  809. }
  810. ]
  811. },
  812. {
  813. "tableName": "answer",
  814. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)",
  815. "fields": [
  816. {
  817. "fieldPath": "id",
  818. "columnName": "id",
  819. "affinity": "INTEGER",
  820. "notNull": false
  821. },
  822. {
  823. "fieldPath": "name",
  824. "columnName": "name",
  825. "affinity": "TEXT",
  826. "notNull": true
  827. },
  828. {
  829. "fieldPath": "text",
  830. "columnName": "text",
  831. "affinity": "TEXT",
  832. "notNull": true
  833. }
  834. ],
  835. "primaryKey": {
  836. "columnNames": [
  837. "id"
  838. ],
  839. "autoGenerate": true
  840. },
  841. "indices": [],
  842. "foreignKeys": []
  843. },
  844. {
  845. "tableName": "log",
  846. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)",
  847. "fields": [
  848. {
  849. "fieldPath": "id",
  850. "columnName": "id",
  851. "affinity": "INTEGER",
  852. "notNull": false
  853. },
  854. {
  855. "fieldPath": "time",
  856. "columnName": "time",
  857. "affinity": "INTEGER",
  858. "notNull": true
  859. },
  860. {
  861. "fieldPath": "data",
  862. "columnName": "data",
  863. "affinity": "TEXT",
  864. "notNull": true
  865. }
  866. ],
  867. "primaryKey": {
  868. "columnNames": [
  869. "id"
  870. ],
  871. "autoGenerate": true
  872. },
  873. "indices": [
  874. {
  875. "name": "index_log_time",
  876. "unique": false,
  877. "columnNames": [
  878. "time"
  879. ],
  880. "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)"
  881. }
  882. ],
  883. "foreignKeys": []
  884. }
  885. ],
  886. "setupQueries": [
  887. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  888. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"78658430615109b7c163e62ed1ad0a48\")"
  889. ]
  890. }
  891. }