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.

918 lines
27 KiB

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