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.

1039 lines
30 KiB

  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 23,
  5. "identityHash": "c29c5644635baac82ae92f61d0cd624d",
  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, `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": "error",
  338. "columnName": "error",
  339. "affinity": "TEXT",
  340. "notNull": false
  341. }
  342. ],
  343. "primaryKey": {
  344. "columnNames": [
  345. "id"
  346. ],
  347. "autoGenerate": true
  348. },
  349. "indices": [
  350. {
  351. "name": "index_folder_account_name",
  352. "unique": true,
  353. "columnNames": [
  354. "account",
  355. "name"
  356. ],
  357. "createSql": "CREATE UNIQUE INDEX `index_folder_account_name` ON `${TABLE_NAME}` (`account`, `name`)"
  358. },
  359. {
  360. "name": "index_folder_account",
  361. "unique": false,
  362. "columnNames": [
  363. "account"
  364. ],
  365. "createSql": "CREATE INDEX `index_folder_account` ON `${TABLE_NAME}` (`account`)"
  366. },
  367. {
  368. "name": "index_folder_name",
  369. "unique": false,
  370. "columnNames": [
  371. "name"
  372. ],
  373. "createSql": "CREATE INDEX `index_folder_name` ON `${TABLE_NAME}` (`name`)"
  374. },
  375. {
  376. "name": "index_folder_type",
  377. "unique": false,
  378. "columnNames": [
  379. "type"
  380. ],
  381. "createSql": "CREATE INDEX `index_folder_type` ON `${TABLE_NAME}` (`type`)"
  382. },
  383. {
  384. "name": "index_folder_unified",
  385. "unique": false,
  386. "columnNames": [
  387. "unified"
  388. ],
  389. "createSql": "CREATE INDEX `index_folder_unified` ON `${TABLE_NAME}` (`unified`)"
  390. }
  391. ],
  392. "foreignKeys": [
  393. {
  394. "table": "account",
  395. "onDelete": "CASCADE",
  396. "onUpdate": "NO ACTION",
  397. "columns": [
  398. "account"
  399. ],
  400. "referencedColumns": [
  401. "id"
  402. ]
  403. }
  404. ]
  405. },
  406. {
  407. "tableName": "message",
  408. "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 )",
  409. "fields": [
  410. {
  411. "fieldPath": "id",
  412. "columnName": "id",
  413. "affinity": "INTEGER",
  414. "notNull": false
  415. },
  416. {
  417. "fieldPath": "account",
  418. "columnName": "account",
  419. "affinity": "INTEGER",
  420. "notNull": false
  421. },
  422. {
  423. "fieldPath": "account_name",
  424. "columnName": "account_name",
  425. "affinity": "TEXT",
  426. "notNull": false
  427. },
  428. {
  429. "fieldPath": "folder",
  430. "columnName": "folder",
  431. "affinity": "INTEGER",
  432. "notNull": true
  433. },
  434. {
  435. "fieldPath": "identity",
  436. "columnName": "identity",
  437. "affinity": "INTEGER",
  438. "notNull": false
  439. },
  440. {
  441. "fieldPath": "replying",
  442. "columnName": "replying",
  443. "affinity": "INTEGER",
  444. "notNull": false
  445. },
  446. {
  447. "fieldPath": "uid",
  448. "columnName": "uid",
  449. "affinity": "INTEGER",
  450. "notNull": false
  451. },
  452. {
  453. "fieldPath": "msgid",
  454. "columnName": "msgid",
  455. "affinity": "TEXT",
  456. "notNull": false
  457. },
  458. {
  459. "fieldPath": "references",
  460. "columnName": "references",
  461. "affinity": "TEXT",
  462. "notNull": false
  463. },
  464. {
  465. "fieldPath": "deliveredto",
  466. "columnName": "deliveredto",
  467. "affinity": "TEXT",
  468. "notNull": false
  469. },
  470. {
  471. "fieldPath": "inreplyto",
  472. "columnName": "inreplyto",
  473. "affinity": "TEXT",
  474. "notNull": false
  475. },
  476. {
  477. "fieldPath": "thread",
  478. "columnName": "thread",
  479. "affinity": "TEXT",
  480. "notNull": false
  481. },
  482. {
  483. "fieldPath": "avatar",
  484. "columnName": "avatar",
  485. "affinity": "TEXT",
  486. "notNull": false
  487. },
  488. {
  489. "fieldPath": "from",
  490. "columnName": "from",
  491. "affinity": "TEXT",
  492. "notNull": false
  493. },
  494. {
  495. "fieldPath": "to",
  496. "columnName": "to",
  497. "affinity": "TEXT",
  498. "notNull": false
  499. },
  500. {
  501. "fieldPath": "cc",
  502. "columnName": "cc",
  503. "affinity": "TEXT",
  504. "notNull": false
  505. },
  506. {
  507. "fieldPath": "bcc",
  508. "columnName": "bcc",
  509. "affinity": "TEXT",
  510. "notNull": false
  511. },
  512. {
  513. "fieldPath": "reply",
  514. "columnName": "reply",
  515. "affinity": "TEXT",
  516. "notNull": false
  517. },
  518. {
  519. "fieldPath": "headers",
  520. "columnName": "headers",
  521. "affinity": "TEXT",
  522. "notNull": false
  523. },
  524. {
  525. "fieldPath": "subject",
  526. "columnName": "subject",
  527. "affinity": "TEXT",
  528. "notNull": false
  529. },
  530. {
  531. "fieldPath": "size",
  532. "columnName": "size",
  533. "affinity": "INTEGER",
  534. "notNull": false
  535. },
  536. {
  537. "fieldPath": "content",
  538. "columnName": "content",
  539. "affinity": "INTEGER",
  540. "notNull": true
  541. },
  542. {
  543. "fieldPath": "sent",
  544. "columnName": "sent",
  545. "affinity": "INTEGER",
  546. "notNull": false
  547. },
  548. {
  549. "fieldPath": "received",
  550. "columnName": "received",
  551. "affinity": "INTEGER",
  552. "notNull": true
  553. },
  554. {
  555. "fieldPath": "stored",
  556. "columnName": "stored",
  557. "affinity": "INTEGER",
  558. "notNull": true
  559. },
  560. {
  561. "fieldPath": "seen",
  562. "columnName": "seen",
  563. "affinity": "INTEGER",
  564. "notNull": true
  565. },
  566. {
  567. "fieldPath": "flagged",
  568. "columnName": "flagged",
  569. "affinity": "INTEGER",
  570. "notNull": true
  571. },
  572. {
  573. "fieldPath": "ui_seen",
  574. "columnName": "ui_seen",
  575. "affinity": "INTEGER",
  576. "notNull": true
  577. },
  578. {
  579. "fieldPath": "ui_flagged",
  580. "columnName": "ui_flagged",
  581. "affinity": "INTEGER",
  582. "notNull": true
  583. },
  584. {
  585. "fieldPath": "ui_hide",
  586. "columnName": "ui_hide",
  587. "affinity": "INTEGER",
  588. "notNull": true
  589. },
  590. {
  591. "fieldPath": "ui_found",
  592. "columnName": "ui_found",
  593. "affinity": "INTEGER",
  594. "notNull": true
  595. },
  596. {
  597. "fieldPath": "ui_ignored",
  598. "columnName": "ui_ignored",
  599. "affinity": "INTEGER",
  600. "notNull": true
  601. },
  602. {
  603. "fieldPath": "error",
  604. "columnName": "error",
  605. "affinity": "TEXT",
  606. "notNull": false
  607. }
  608. ],
  609. "primaryKey": {
  610. "columnNames": [
  611. "id"
  612. ],
  613. "autoGenerate": true
  614. },
  615. "indices": [
  616. {
  617. "name": "index_message_account",
  618. "unique": false,
  619. "columnNames": [
  620. "account"
  621. ],
  622. "createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)"
  623. },
  624. {
  625. "name": "index_message_folder",
  626. "unique": false,
  627. "columnNames": [
  628. "folder"
  629. ],
  630. "createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)"
  631. },
  632. {
  633. "name": "index_message_identity",
  634. "unique": false,
  635. "columnNames": [
  636. "identity"
  637. ],
  638. "createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)"
  639. },
  640. {
  641. "name": "index_message_replying",
  642. "unique": false,
  643. "columnNames": [
  644. "replying"
  645. ],
  646. "createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)"
  647. },
  648. {
  649. "name": "index_message_folder_uid_ui_found",
  650. "unique": true,
  651. "columnNames": [
  652. "folder",
  653. "uid",
  654. "ui_found"
  655. ],
  656. "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid_ui_found` ON `${TABLE_NAME}` (`folder`, `uid`, `ui_found`)"
  657. },
  658. {
  659. "name": "index_message_msgid_folder_ui_found",
  660. "unique": true,
  661. "columnNames": [
  662. "msgid",
  663. "folder",
  664. "ui_found"
  665. ],
  666. "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder_ui_found` ON `${TABLE_NAME}` (`msgid`, `folder`, `ui_found`)"
  667. },
  668. {
  669. "name": "index_message_thread",
  670. "unique": false,
  671. "columnNames": [
  672. "thread"
  673. ],
  674. "createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)"
  675. },
  676. {
  677. "name": "index_message_received",
  678. "unique": false,
  679. "columnNames": [
  680. "received"
  681. ],
  682. "createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)"
  683. },
  684. {
  685. "name": "index_message_ui_seen",
  686. "unique": false,
  687. "columnNames": [
  688. "ui_seen"
  689. ],
  690. "createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)"
  691. },
  692. {
  693. "name": "index_message_ui_hide",
  694. "unique": false,
  695. "columnNames": [
  696. "ui_hide"
  697. ],
  698. "createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)"
  699. },
  700. {
  701. "name": "index_message_ui_found",
  702. "unique": false,
  703. "columnNames": [
  704. "ui_found"
  705. ],
  706. "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)"
  707. },
  708. {
  709. "name": "index_message_ui_ignored",
  710. "unique": false,
  711. "columnNames": [
  712. "ui_ignored"
  713. ],
  714. "createSql": "CREATE INDEX `index_message_ui_ignored` ON `${TABLE_NAME}` (`ui_ignored`)"
  715. }
  716. ],
  717. "foreignKeys": [
  718. {
  719. "table": "account",
  720. "onDelete": "CASCADE",
  721. "onUpdate": "NO ACTION",
  722. "columns": [
  723. "account"
  724. ],
  725. "referencedColumns": [
  726. "id"
  727. ]
  728. },
  729. {
  730. "table": "folder",
  731. "onDelete": "CASCADE",
  732. "onUpdate": "NO ACTION",
  733. "columns": [
  734. "folder"
  735. ],
  736. "referencedColumns": [
  737. "id"
  738. ]
  739. },
  740. {
  741. "table": "identity",
  742. "onDelete": "CASCADE",
  743. "onUpdate": "NO ACTION",
  744. "columns": [
  745. "identity"
  746. ],
  747. "referencedColumns": [
  748. "id"
  749. ]
  750. },
  751. {
  752. "table": "message",
  753. "onDelete": "CASCADE",
  754. "onUpdate": "NO ACTION",
  755. "columns": [
  756. "replying"
  757. ],
  758. "referencedColumns": [
  759. "id"
  760. ]
  761. }
  762. ]
  763. },
  764. {
  765. "tableName": "attachment",
  766. "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 )",
  767. "fields": [
  768. {
  769. "fieldPath": "id",
  770. "columnName": "id",
  771. "affinity": "INTEGER",
  772. "notNull": false
  773. },
  774. {
  775. "fieldPath": "message",
  776. "columnName": "message",
  777. "affinity": "INTEGER",
  778. "notNull": true
  779. },
  780. {
  781. "fieldPath": "sequence",
  782. "columnName": "sequence",
  783. "affinity": "INTEGER",
  784. "notNull": true
  785. },
  786. {
  787. "fieldPath": "name",
  788. "columnName": "name",
  789. "affinity": "TEXT",
  790. "notNull": false
  791. },
  792. {
  793. "fieldPath": "type",
  794. "columnName": "type",
  795. "affinity": "TEXT",
  796. "notNull": true
  797. },
  798. {
  799. "fieldPath": "cid",
  800. "columnName": "cid",
  801. "affinity": "TEXT",
  802. "notNull": false
  803. },
  804. {
  805. "fieldPath": "size",
  806. "columnName": "size",
  807. "affinity": "INTEGER",
  808. "notNull": false
  809. },
  810. {
  811. "fieldPath": "progress",
  812. "columnName": "progress",
  813. "affinity": "INTEGER",
  814. "notNull": false
  815. },
  816. {
  817. "fieldPath": "available",
  818. "columnName": "available",
  819. "affinity": "INTEGER",
  820. "notNull": true
  821. }
  822. ],
  823. "primaryKey": {
  824. "columnNames": [
  825. "id"
  826. ],
  827. "autoGenerate": true
  828. },
  829. "indices": [
  830. {
  831. "name": "index_attachment_message",
  832. "unique": false,
  833. "columnNames": [
  834. "message"
  835. ],
  836. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  837. },
  838. {
  839. "name": "index_attachment_message_sequence",
  840. "unique": true,
  841. "columnNames": [
  842. "message",
  843. "sequence"
  844. ],
  845. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  846. },
  847. {
  848. "name": "index_attachment_message_cid",
  849. "unique": true,
  850. "columnNames": [
  851. "message",
  852. "cid"
  853. ],
  854. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)"
  855. }
  856. ],
  857. "foreignKeys": [
  858. {
  859. "table": "message",
  860. "onDelete": "CASCADE",
  861. "onUpdate": "NO ACTION",
  862. "columns": [
  863. "message"
  864. ],
  865. "referencedColumns": [
  866. "id"
  867. ]
  868. }
  869. ]
  870. },
  871. {
  872. "tableName": "operation",
  873. "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 )",
  874. "fields": [
  875. {
  876. "fieldPath": "id",
  877. "columnName": "id",
  878. "affinity": "INTEGER",
  879. "notNull": false
  880. },
  881. {
  882. "fieldPath": "folder",
  883. "columnName": "folder",
  884. "affinity": "INTEGER",
  885. "notNull": true
  886. },
  887. {
  888. "fieldPath": "message",
  889. "columnName": "message",
  890. "affinity": "INTEGER",
  891. "notNull": true
  892. },
  893. {
  894. "fieldPath": "name",
  895. "columnName": "name",
  896. "affinity": "TEXT",
  897. "notNull": true
  898. },
  899. {
  900. "fieldPath": "args",
  901. "columnName": "args",
  902. "affinity": "TEXT",
  903. "notNull": true
  904. },
  905. {
  906. "fieldPath": "created",
  907. "columnName": "created",
  908. "affinity": "INTEGER",
  909. "notNull": true
  910. }
  911. ],
  912. "primaryKey": {
  913. "columnNames": [
  914. "id"
  915. ],
  916. "autoGenerate": true
  917. },
  918. "indices": [
  919. {
  920. "name": "index_operation_folder",
  921. "unique": false,
  922. "columnNames": [
  923. "folder"
  924. ],
  925. "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)"
  926. },
  927. {
  928. "name": "index_operation_message",
  929. "unique": false,
  930. "columnNames": [
  931. "message"
  932. ],
  933. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  934. }
  935. ],
  936. "foreignKeys": [
  937. {
  938. "table": "folder",
  939. "onDelete": "CASCADE",
  940. "onUpdate": "NO ACTION",
  941. "columns": [
  942. "folder"
  943. ],
  944. "referencedColumns": [
  945. "id"
  946. ]
  947. },
  948. {
  949. "table": "message",
  950. "onDelete": "CASCADE",
  951. "onUpdate": "NO ACTION",
  952. "columns": [
  953. "message"
  954. ],
  955. "referencedColumns": [
  956. "id"
  957. ]
  958. }
  959. ]
  960. },
  961. {
  962. "tableName": "answer",
  963. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)",
  964. "fields": [
  965. {
  966. "fieldPath": "id",
  967. "columnName": "id",
  968. "affinity": "INTEGER",
  969. "notNull": false
  970. },
  971. {
  972. "fieldPath": "name",
  973. "columnName": "name",
  974. "affinity": "TEXT",
  975. "notNull": true
  976. },
  977. {
  978. "fieldPath": "text",
  979. "columnName": "text",
  980. "affinity": "TEXT",
  981. "notNull": true
  982. }
  983. ],
  984. "primaryKey": {
  985. "columnNames": [
  986. "id"
  987. ],
  988. "autoGenerate": true
  989. },
  990. "indices": [],
  991. "foreignKeys": []
  992. },
  993. {
  994. "tableName": "log",
  995. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)",
  996. "fields": [
  997. {
  998. "fieldPath": "id",
  999. "columnName": "id",
  1000. "affinity": "INTEGER",
  1001. "notNull": false
  1002. },
  1003. {
  1004. "fieldPath": "time",
  1005. "columnName": "time",
  1006. "affinity": "INTEGER",
  1007. "notNull": true
  1008. },
  1009. {
  1010. "fieldPath": "data",
  1011. "columnName": "data",
  1012. "affinity": "TEXT",
  1013. "notNull": true
  1014. }
  1015. ],
  1016. "primaryKey": {
  1017. "columnNames": [
  1018. "id"
  1019. ],
  1020. "autoGenerate": true
  1021. },
  1022. "indices": [
  1023. {
  1024. "name": "index_log_time",
  1025. "unique": false,
  1026. "columnNames": [
  1027. "time"
  1028. ],
  1029. "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)"
  1030. }
  1031. ],
  1032. "foreignKeys": []
  1033. }
  1034. ],
  1035. "setupQueries": [
  1036. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  1037. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"c29c5644635baac82ae92f61d0cd624d\")"
  1038. ]
  1039. }
  1040. }