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.

1045 lines
31 KiB

  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 25,
  5. "identityHash": "0e5181b4dbd365cbcda7fef652ef9629",
  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, `starttls` INTEGER NOT NULL, `insecure` INTEGER 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, `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": "starttls",
  49. "columnName": "starttls",
  50. "affinity": "INTEGER",
  51. "notNull": true
  52. },
  53. {
  54. "fieldPath": "insecure",
  55. "columnName": "insecure",
  56. "affinity": "INTEGER",
  57. "notNull": true
  58. },
  59. {
  60. "fieldPath": "port",
  61. "columnName": "port",
  62. "affinity": "INTEGER",
  63. "notNull": true
  64. },
  65. {
  66. "fieldPath": "user",
  67. "columnName": "user",
  68. "affinity": "TEXT",
  69. "notNull": true
  70. },
  71. {
  72. "fieldPath": "password",
  73. "columnName": "password",
  74. "affinity": "TEXT",
  75. "notNull": true
  76. },
  77. {
  78. "fieldPath": "auth_type",
  79. "columnName": "auth_type",
  80. "affinity": "INTEGER",
  81. "notNull": true
  82. },
  83. {
  84. "fieldPath": "primary",
  85. "columnName": "primary",
  86. "affinity": "INTEGER",
  87. "notNull": true
  88. },
  89. {
  90. "fieldPath": "synchronize",
  91. "columnName": "synchronize",
  92. "affinity": "INTEGER",
  93. "notNull": true
  94. },
  95. {
  96. "fieldPath": "store_sent",
  97. "columnName": "store_sent",
  98. "affinity": "INTEGER",
  99. "notNull": true
  100. },
  101. {
  102. "fieldPath": "state",
  103. "columnName": "state",
  104. "affinity": "TEXT",
  105. "notNull": false
  106. },
  107. {
  108. "fieldPath": "error",
  109. "columnName": "error",
  110. "affinity": "TEXT",
  111. "notNull": false
  112. }
  113. ],
  114. "primaryKey": {
  115. "columnNames": [
  116. "id"
  117. ],
  118. "autoGenerate": true
  119. },
  120. "indices": [
  121. {
  122. "name": "index_identity_account",
  123. "unique": false,
  124. "columnNames": [
  125. "account"
  126. ],
  127. "createSql": "CREATE INDEX `index_identity_account` ON `${TABLE_NAME}` (`account`)"
  128. }
  129. ],
  130. "foreignKeys": [
  131. {
  132. "table": "account",
  133. "onDelete": "CASCADE",
  134. "onUpdate": "NO ACTION",
  135. "columns": [
  136. "account"
  137. ],
  138. "referencedColumns": [
  139. "id"
  140. ]
  141. }
  142. ]
  143. },
  144. {
  145. "tableName": "account",
  146. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `signature` TEXT, `host` TEXT NOT NULL, `starttls` INTEGER NOT NULL, `insecure` INTEGER NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `auth_type` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `primary` INTEGER NOT NULL, `color` INTEGER, `store_sent` INTEGER NOT NULL, `poll_interval` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)",
  147. "fields": [
  148. {
  149. "fieldPath": "id",
  150. "columnName": "id",
  151. "affinity": "INTEGER",
  152. "notNull": false
  153. },
  154. {
  155. "fieldPath": "name",
  156. "columnName": "name",
  157. "affinity": "TEXT",
  158. "notNull": false
  159. },
  160. {
  161. "fieldPath": "signature",
  162. "columnName": "signature",
  163. "affinity": "TEXT",
  164. "notNull": false
  165. },
  166. {
  167. "fieldPath": "host",
  168. "columnName": "host",
  169. "affinity": "TEXT",
  170. "notNull": true
  171. },
  172. {
  173. "fieldPath": "starttls",
  174. "columnName": "starttls",
  175. "affinity": "INTEGER",
  176. "notNull": true
  177. },
  178. {
  179. "fieldPath": "insecure",
  180. "columnName": "insecure",
  181. "affinity": "INTEGER",
  182. "notNull": true
  183. },
  184. {
  185. "fieldPath": "port",
  186. "columnName": "port",
  187. "affinity": "INTEGER",
  188. "notNull": true
  189. },
  190. {
  191. "fieldPath": "user",
  192. "columnName": "user",
  193. "affinity": "TEXT",
  194. "notNull": true
  195. },
  196. {
  197. "fieldPath": "password",
  198. "columnName": "password",
  199. "affinity": "TEXT",
  200. "notNull": true
  201. },
  202. {
  203. "fieldPath": "auth_type",
  204. "columnName": "auth_type",
  205. "affinity": "INTEGER",
  206. "notNull": true
  207. },
  208. {
  209. "fieldPath": "synchronize",
  210. "columnName": "synchronize",
  211. "affinity": "INTEGER",
  212. "notNull": true
  213. },
  214. {
  215. "fieldPath": "primary",
  216. "columnName": "primary",
  217. "affinity": "INTEGER",
  218. "notNull": true
  219. },
  220. {
  221. "fieldPath": "color",
  222. "columnName": "color",
  223. "affinity": "INTEGER",
  224. "notNull": false
  225. },
  226. {
  227. "fieldPath": "store_sent",
  228. "columnName": "store_sent",
  229. "affinity": "INTEGER",
  230. "notNull": true
  231. },
  232. {
  233. "fieldPath": "poll_interval",
  234. "columnName": "poll_interval",
  235. "affinity": "INTEGER",
  236. "notNull": true
  237. },
  238. {
  239. "fieldPath": "seen_until",
  240. "columnName": "seen_until",
  241. "affinity": "INTEGER",
  242. "notNull": false
  243. },
  244. {
  245. "fieldPath": "state",
  246. "columnName": "state",
  247. "affinity": "TEXT",
  248. "notNull": false
  249. },
  250. {
  251. "fieldPath": "error",
  252. "columnName": "error",
  253. "affinity": "TEXT",
  254. "notNull": false
  255. }
  256. ],
  257. "primaryKey": {
  258. "columnNames": [
  259. "id"
  260. ],
  261. "autoGenerate": true
  262. },
  263. "indices": [],
  264. "foreignKeys": []
  265. },
  266. {
  267. "tableName": "folder",
  268. "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, `poll_interval` INTEGER, `after` INTEGER NOT NULL, `display` TEXT, `hide` INTEGER NOT NULL, `unified` INTEGER NOT NULL, `state` TEXT, `sync_state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  269. "fields": [
  270. {
  271. "fieldPath": "id",
  272. "columnName": "id",
  273. "affinity": "INTEGER",
  274. "notNull": false
  275. },
  276. {
  277. "fieldPath": "account",
  278. "columnName": "account",
  279. "affinity": "INTEGER",
  280. "notNull": false
  281. },
  282. {
  283. "fieldPath": "name",
  284. "columnName": "name",
  285. "affinity": "TEXT",
  286. "notNull": true
  287. },
  288. {
  289. "fieldPath": "type",
  290. "columnName": "type",
  291. "affinity": "TEXT",
  292. "notNull": true
  293. },
  294. {
  295. "fieldPath": "synchronize",
  296. "columnName": "synchronize",
  297. "affinity": "INTEGER",
  298. "notNull": true
  299. },
  300. {
  301. "fieldPath": "poll_interval",
  302. "columnName": "poll_interval",
  303. "affinity": "INTEGER",
  304. "notNull": false
  305. },
  306. {
  307. "fieldPath": "after",
  308. "columnName": "after",
  309. "affinity": "INTEGER",
  310. "notNull": true
  311. },
  312. {
  313. "fieldPath": "display",
  314. "columnName": "display",
  315. "affinity": "TEXT",
  316. "notNull": false
  317. },
  318. {
  319. "fieldPath": "hide",
  320. "columnName": "hide",
  321. "affinity": "INTEGER",
  322. "notNull": true
  323. },
  324. {
  325. "fieldPath": "unified",
  326. "columnName": "unified",
  327. "affinity": "INTEGER",
  328. "notNull": true
  329. },
  330. {
  331. "fieldPath": "state",
  332. "columnName": "state",
  333. "affinity": "TEXT",
  334. "notNull": false
  335. },
  336. {
  337. "fieldPath": "sync_state",
  338. "columnName": "sync_state",
  339. "affinity": "TEXT",
  340. "notNull": false
  341. },
  342. {
  343. "fieldPath": "error",
  344. "columnName": "error",
  345. "affinity": "TEXT",
  346. "notNull": false
  347. }
  348. ],
  349. "primaryKey": {
  350. "columnNames": [
  351. "id"
  352. ],
  353. "autoGenerate": true
  354. },
  355. "indices": [
  356. {
  357. "name": "index_folder_account_name",
  358. "unique": true,
  359. "columnNames": [
  360. "account",
  361. "name"
  362. ],
  363. "createSql": "CREATE UNIQUE INDEX `index_folder_account_name` ON `${TABLE_NAME}` (`account`, `name`)"
  364. },
  365. {
  366. "name": "index_folder_account",
  367. "unique": false,
  368. "columnNames": [
  369. "account"
  370. ],
  371. "createSql": "CREATE INDEX `index_folder_account` ON `${TABLE_NAME}` (`account`)"
  372. },
  373. {
  374. "name": "index_folder_name",
  375. "unique": false,
  376. "columnNames": [
  377. "name"
  378. ],
  379. "createSql": "CREATE INDEX `index_folder_name` ON `${TABLE_NAME}` (`name`)"
  380. },
  381. {
  382. "name": "index_folder_type",
  383. "unique": false,
  384. "columnNames": [
  385. "type"
  386. ],
  387. "createSql": "CREATE INDEX `index_folder_type` ON `${TABLE_NAME}` (`type`)"
  388. },
  389. {
  390. "name": "index_folder_unified",
  391. "unique": false,
  392. "columnNames": [
  393. "unified"
  394. ],
  395. "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)"
  396. }
  397. ],
  398. "foreignKeys": [
  399. {
  400. "table": "account",
  401. "onDelete": "CASCADE",
  402. "onUpdate": "NO ACTION",
  403. "columns": [
  404. "account"
  405. ],
  406. "referencedColumns": [
  407. "id"
  408. ]
  409. }
  410. ]
  411. },
  412. {
  413. "tableName": "message",
  414. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `account_name` TEXT, `folder` INTEGER NOT NULL, `identity` INTEGER, `replying` INTEGER, `uid` INTEGER, `msgid` TEXT, `references` TEXT, `deliveredto` TEXT, `inreplyto` TEXT, `thread` TEXT, `avatar` TEXT, `from` TEXT, `to` TEXT, `cc` TEXT, `bcc` TEXT, `reply` TEXT, `headers` TEXT, `subject` TEXT, `size` INTEGER, `content` INTEGER NOT NULL, `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, `ui_ignored` 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 )",
  415. "fields": [
  416. {
  417. "fieldPath": "id",
  418. "columnName": "id",
  419. "affinity": "INTEGER",
  420. "notNull": false
  421. },
  422. {
  423. "fieldPath": "account",
  424. "columnName": "account",
  425. "affinity": "INTEGER",
  426. "notNull": false
  427. },
  428. {
  429. "fieldPath": "account_name",
  430. "columnName": "account_name",
  431. "affinity": "TEXT",
  432. "notNull": false
  433. },
  434. {
  435. "fieldPath": "folder",
  436. "columnName": "folder",
  437. "affinity": "INTEGER",
  438. "notNull": true
  439. },
  440. {
  441. "fieldPath": "identity",
  442. "columnName": "identity",
  443. "affinity": "INTEGER",
  444. "notNull": false
  445. },
  446. {
  447. "fieldPath": "replying",
  448. "columnName": "replying",
  449. "affinity": "INTEGER",
  450. "notNull": false
  451. },
  452. {
  453. "fieldPath": "uid",
  454. "columnName": "uid",
  455. "affinity": "INTEGER",
  456. "notNull": false
  457. },
  458. {
  459. "fieldPath": "msgid",
  460. "columnName": "msgid",
  461. "affinity": "TEXT",
  462. "notNull": false
  463. },
  464. {
  465. "fieldPath": "references",
  466. "columnName": "references",
  467. "affinity": "TEXT",
  468. "notNull": false
  469. },
  470. {
  471. "fieldPath": "deliveredto",
  472. "columnName": "deliveredto",
  473. "affinity": "TEXT",
  474. "notNull": false
  475. },
  476. {
  477. "fieldPath": "inreplyto",
  478. "columnName": "inreplyto",
  479. "affinity": "TEXT",
  480. "notNull": false
  481. },
  482. {
  483. "fieldPath": "thread",
  484. "columnName": "thread",
  485. "affinity": "TEXT",
  486. "notNull": false
  487. },
  488. {
  489. "fieldPath": "avatar",
  490. "columnName": "avatar",
  491. "affinity": "TEXT",
  492. "notNull": false
  493. },
  494. {
  495. "fieldPath": "from",
  496. "columnName": "from",
  497. "affinity": "TEXT",
  498. "notNull": false
  499. },
  500. {
  501. "fieldPath": "to",
  502. "columnName": "to",
  503. "affinity": "TEXT",
  504. "notNull": false
  505. },
  506. {
  507. "fieldPath": "cc",
  508. "columnName": "cc",
  509. "affinity": "TEXT",
  510. "notNull": false
  511. },
  512. {
  513. "fieldPath": "bcc",
  514. "columnName": "bcc",
  515. "affinity": "TEXT",
  516. "notNull": false
  517. },
  518. {
  519. "fieldPath": "reply",
  520. "columnName": "reply",
  521. "affinity": "TEXT",
  522. "notNull": false
  523. },
  524. {
  525. "fieldPath": "headers",
  526. "columnName": "headers",
  527. "affinity": "TEXT",
  528. "notNull": false
  529. },
  530. {
  531. "fieldPath": "subject",
  532. "columnName": "subject",
  533. "affinity": "TEXT",
  534. "notNull": false
  535. },
  536. {
  537. "fieldPath": "size",
  538. "columnName": "size",
  539. "affinity": "INTEGER",
  540. "notNull": false
  541. },
  542. {
  543. "fieldPath": "content",
  544. "columnName": "content",
  545. "affinity": "INTEGER",
  546. "notNull": true
  547. },
  548. {
  549. "fieldPath": "sent",
  550. "columnName": "sent",
  551. "affinity": "INTEGER",
  552. "notNull": false
  553. },
  554. {
  555. "fieldPath": "received",
  556. "columnName": "received",
  557. "affinity": "INTEGER",
  558. "notNull": true
  559. },
  560. {
  561. "fieldPath": "stored",
  562. "columnName": "stored",
  563. "affinity": "INTEGER",
  564. "notNull": true
  565. },
  566. {
  567. "fieldPath": "seen",
  568. "columnName": "seen",
  569. "affinity": "INTEGER",
  570. "notNull": true
  571. },
  572. {
  573. "fieldPath": "flagged",
  574. "columnName": "flagged",
  575. "affinity": "INTEGER",
  576. "notNull": true
  577. },
  578. {
  579. "fieldPath": "ui_seen",
  580. "columnName": "ui_seen",
  581. "affinity": "INTEGER",
  582. "notNull": true
  583. },
  584. {
  585. "fieldPath": "ui_flagged",
  586. "columnName": "ui_flagged",
  587. "affinity": "INTEGER",
  588. "notNull": true
  589. },
  590. {
  591. "fieldPath": "ui_hide",
  592. "columnName": "ui_hide",
  593. "affinity": "INTEGER",
  594. "notNull": true
  595. },
  596. {
  597. "fieldPath": "ui_found",
  598. "columnName": "ui_found",
  599. "affinity": "INTEGER",
  600. "notNull": true
  601. },
  602. {
  603. "fieldPath": "ui_ignored",
  604. "columnName": "ui_ignored",
  605. "affinity": "INTEGER",
  606. "notNull": true
  607. },
  608. {
  609. "fieldPath": "error",
  610. "columnName": "error",
  611. "affinity": "TEXT",
  612. "notNull": false
  613. }
  614. ],
  615. "primaryKey": {
  616. "columnNames": [
  617. "id"
  618. ],
  619. "autoGenerate": true
  620. },
  621. "indices": [
  622. {
  623. "name": "index_message_account",
  624. "unique": false,
  625. "columnNames": [
  626. "account"
  627. ],
  628. "createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)"
  629. },
  630. {
  631. "name": "index_message_folder",
  632. "unique": false,
  633. "columnNames": [
  634. "folder"
  635. ],
  636. "createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)"
  637. },
  638. {
  639. "name": "index_message_identity",
  640. "unique": false,
  641. "columnNames": [
  642. "identity"
  643. ],
  644. "createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)"
  645. },
  646. {
  647. "name": "index_message_replying",
  648. "unique": false,
  649. "columnNames": [
  650. "replying"
  651. ],
  652. "createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)"
  653. },
  654. {
  655. "name": "index_message_folder_uid_ui_found",
  656. "unique": true,
  657. "columnNames": [
  658. "folder",
  659. "uid",
  660. "ui_found"
  661. ],
  662. "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid_ui_found` ON `${TABLE_NAME}` (`folder`, `uid`, `ui_found`)"
  663. },
  664. {
  665. "name": "index_message_msgid_folder_ui_found",
  666. "unique": true,
  667. "columnNames": [
  668. "msgid",
  669. "folder",
  670. "ui_found"
  671. ],
  672. "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder_ui_found` ON `${TABLE_NAME}` (`msgid`, `folder`, `ui_found`)"
  673. },
  674. {
  675. "name": "index_message_thread",
  676. "unique": false,
  677. "columnNames": [
  678. "thread"
  679. ],
  680. "createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)"
  681. },
  682. {
  683. "name": "index_message_received",
  684. "unique": false,
  685. "columnNames": [
  686. "received"
  687. ],
  688. "createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)"
  689. },
  690. {
  691. "name": "index_message_ui_seen",
  692. "unique": false,
  693. "columnNames": [
  694. "ui_seen"
  695. ],
  696. "createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)"
  697. },
  698. {
  699. "name": "index_message_ui_hide",
  700. "unique": false,
  701. "columnNames": [
  702. "ui_hide"
  703. ],
  704. "createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)"
  705. },
  706. {
  707. "name": "index_message_ui_found",
  708. "unique": false,
  709. "columnNames": [
  710. "ui_found"
  711. ],
  712. "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)"
  713. },
  714. {
  715. "name": "index_message_ui_ignored",
  716. "unique": false,
  717. "columnNames": [
  718. "ui_ignored"
  719. ],
  720. "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)"
  721. }
  722. ],
  723. "foreignKeys": [
  724. {
  725. "table": "account",
  726. "onDelete": "CASCADE",
  727. "onUpdate": "NO ACTION",
  728. "columns": [
  729. "account"
  730. ],
  731. "referencedColumns": [
  732. "id"
  733. ]
  734. },
  735. {
  736. "table": "folder",
  737. "onDelete": "CASCADE",
  738. "onUpdate": "NO ACTION",
  739. "columns": [
  740. "folder"
  741. ],
  742. "referencedColumns": [
  743. "id"
  744. ]
  745. },
  746. {
  747. "table": "identity",
  748. "onDelete": "CASCADE",
  749. "onUpdate": "NO ACTION",
  750. "columns": [
  751. "identity"
  752. ],
  753. "referencedColumns": [
  754. "id"
  755. ]
  756. },
  757. {
  758. "table": "message",
  759. "onDelete": "CASCADE",
  760. "onUpdate": "NO ACTION",
  761. "columns": [
  762. "replying"
  763. ],
  764. "referencedColumns": [
  765. "id"
  766. ]
  767. }
  768. ]
  769. },
  770. {
  771. "tableName": "attachment",
  772. "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, `cid` TEXT, `size` INTEGER, `progress` INTEGER, `available` INTEGER NOT NULL, FOREIGN KEY(`message`) REFERENCES `message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  773. "fields": [
  774. {
  775. "fieldPath": "id",
  776. "columnName": "id",
  777. "affinity": "INTEGER",
  778. "notNull": false
  779. },
  780. {
  781. "fieldPath": "message",
  782. "columnName": "message",
  783. "affinity": "INTEGER",
  784. "notNull": true
  785. },
  786. {
  787. "fieldPath": "sequence",
  788. "columnName": "sequence",
  789. "affinity": "INTEGER",
  790. "notNull": true
  791. },
  792. {
  793. "fieldPath": "name",
  794. "columnName": "name",
  795. "affinity": "TEXT",
  796. "notNull": false
  797. },
  798. {
  799. "fieldPath": "type",
  800. "columnName": "type",
  801. "affinity": "TEXT",
  802. "notNull": true
  803. },
  804. {
  805. "fieldPath": "cid",
  806. "columnName": "cid",
  807. "affinity": "TEXT",
  808. "notNull": false
  809. },
  810. {
  811. "fieldPath": "size",
  812. "columnName": "size",
  813. "affinity": "INTEGER",
  814. "notNull": false
  815. },
  816. {
  817. "fieldPath": "progress",
  818. "columnName": "progress",
  819. "affinity": "INTEGER",
  820. "notNull": false
  821. },
  822. {
  823. "fieldPath": "available",
  824. "columnName": "available",
  825. "affinity": "INTEGER",
  826. "notNull": true
  827. }
  828. ],
  829. "primaryKey": {
  830. "columnNames": [
  831. "id"
  832. ],
  833. "autoGenerate": true
  834. },
  835. "indices": [
  836. {
  837. "name": "index_attachment_message",
  838. "unique": false,
  839. "columnNames": [
  840. "message"
  841. ],
  842. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  843. },
  844. {
  845. "name": "index_attachment_message_sequence",
  846. "unique": true,
  847. "columnNames": [
  848. "message",
  849. "sequence"
  850. ],
  851. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  852. },
  853. {
  854. "name": "index_attachment_message_cid",
  855. "unique": true,
  856. "columnNames": [
  857. "message",
  858. "cid"
  859. ],
  860. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)"
  861. }
  862. ],
  863. "foreignKeys": [
  864. {
  865. "table": "message",
  866. "onDelete": "CASCADE",
  867. "onUpdate": "NO ACTION",
  868. "columns": [
  869. "message"
  870. ],
  871. "referencedColumns": [
  872. "id"
  873. ]
  874. }
  875. ]
  876. },
  877. {
  878. "tableName": "operation",
  879. "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 )",
  880. "fields": [
  881. {
  882. "fieldPath": "id",
  883. "columnName": "id",
  884. "affinity": "INTEGER",
  885. "notNull": false
  886. },
  887. {
  888. "fieldPath": "folder",
  889. "columnName": "folder",
  890. "affinity": "INTEGER",
  891. "notNull": true
  892. },
  893. {
  894. "fieldPath": "message",
  895. "columnName": "message",
  896. "affinity": "INTEGER",
  897. "notNull": true
  898. },
  899. {
  900. "fieldPath": "name",
  901. "columnName": "name",
  902. "affinity": "TEXT",
  903. "notNull": true
  904. },
  905. {
  906. "fieldPath": "args",
  907. "columnName": "args",
  908. "affinity": "TEXT",
  909. "notNull": true
  910. },
  911. {
  912. "fieldPath": "created",
  913. "columnName": "created",
  914. "affinity": "INTEGER",
  915. "notNull": true
  916. }
  917. ],
  918. "primaryKey": {
  919. "columnNames": [
  920. "id"
  921. ],
  922. "autoGenerate": true
  923. },
  924. "indices": [
  925. {
  926. "name": "index_operation_folder",
  927. "unique": false,
  928. "columnNames": [
  929. "folder"
  930. ],
  931. "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)"
  932. },
  933. {
  934. "name": "index_operation_message",
  935. "unique": false,
  936. "columnNames": [
  937. "message"
  938. ],
  939. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  940. }
  941. ],
  942. "foreignKeys": [
  943. {
  944. "table": "folder",
  945. "onDelete": "CASCADE",
  946. "onUpdate": "NO ACTION",
  947. "columns": [
  948. "folder"
  949. ],
  950. "referencedColumns": [
  951. "id"
  952. ]
  953. },
  954. {
  955. "table": "message",
  956. "onDelete": "CASCADE",
  957. "onUpdate": "NO ACTION",
  958. "columns": [
  959. "message"
  960. ],
  961. "referencedColumns": [
  962. "id"
  963. ]
  964. }
  965. ]
  966. },
  967. {
  968. "tableName": "answer",
  969. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)",
  970. "fields": [
  971. {
  972. "fieldPath": "id",
  973. "columnName": "id",
  974. "affinity": "INTEGER",
  975. "notNull": false
  976. },
  977. {
  978. "fieldPath": "name",
  979. "columnName": "name",
  980. "affinity": "TEXT",
  981. "notNull": true
  982. },
  983. {
  984. "fieldPath": "text",
  985. "columnName": "text",
  986. "affinity": "TEXT",
  987. "notNull": true
  988. }
  989. ],
  990. "primaryKey": {
  991. "columnNames": [
  992. "id"
  993. ],
  994. "autoGenerate": true
  995. },
  996. "indices": [],
  997. "foreignKeys": []
  998. },
  999. {
  1000. "tableName": "log",
  1001. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)",
  1002. "fields": [
  1003. {
  1004. "fieldPath": "id",
  1005. "columnName": "id",
  1006. "affinity": "INTEGER",
  1007. "notNull": false
  1008. },
  1009. {
  1010. "fieldPath": "time",
  1011. "columnName": "time",
  1012. "affinity": "INTEGER",
  1013. "notNull": true
  1014. },
  1015. {
  1016. "fieldPath": "data",
  1017. "columnName": "data",
  1018. "affinity": "TEXT",
  1019. "notNull": true
  1020. }
  1021. ],
  1022. "primaryKey": {
  1023. "columnNames": [
  1024. "id"
  1025. ],
  1026. "autoGenerate": true
  1027. },
  1028. "indices": [
  1029. {
  1030. "name": "index_log_time",
  1031. "unique": false,
  1032. "columnNames": [
  1033. "time"
  1034. ],
  1035. "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)"
  1036. }
  1037. ],
  1038. "foreignKeys": []
  1039. }
  1040. ],
  1041. "setupQueries": [
  1042. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  1043. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"0e5181b4dbd365cbcda7fef652ef9629\")"
  1044. ]
  1045. }
  1046. }