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.

948 lines
28 KiB

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