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.

975 lines
28 KiB

  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 16,
  5. "identityHash": "95bd1e083056fa7625f21430f7d53e2d",
  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, `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, `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": "size",
  484. "columnName": "size",
  485. "affinity": "INTEGER",
  486. "notNull": false
  487. },
  488. {
  489. "fieldPath": "content",
  490. "columnName": "content",
  491. "affinity": "INTEGER",
  492. "notNull": true
  493. },
  494. {
  495. "fieldPath": "sent",
  496. "columnName": "sent",
  497. "affinity": "INTEGER",
  498. "notNull": false
  499. },
  500. {
  501. "fieldPath": "received",
  502. "columnName": "received",
  503. "affinity": "INTEGER",
  504. "notNull": true
  505. },
  506. {
  507. "fieldPath": "stored",
  508. "columnName": "stored",
  509. "affinity": "INTEGER",
  510. "notNull": true
  511. },
  512. {
  513. "fieldPath": "seen",
  514. "columnName": "seen",
  515. "affinity": "INTEGER",
  516. "notNull": true
  517. },
  518. {
  519. "fieldPath": "flagged",
  520. "columnName": "flagged",
  521. "affinity": "INTEGER",
  522. "notNull": true
  523. },
  524. {
  525. "fieldPath": "ui_seen",
  526. "columnName": "ui_seen",
  527. "affinity": "INTEGER",
  528. "notNull": true
  529. },
  530. {
  531. "fieldPath": "ui_flagged",
  532. "columnName": "ui_flagged",
  533. "affinity": "INTEGER",
  534. "notNull": true
  535. },
  536. {
  537. "fieldPath": "ui_hide",
  538. "columnName": "ui_hide",
  539. "affinity": "INTEGER",
  540. "notNull": true
  541. },
  542. {
  543. "fieldPath": "ui_found",
  544. "columnName": "ui_found",
  545. "affinity": "INTEGER",
  546. "notNull": true
  547. },
  548. {
  549. "fieldPath": "error",
  550. "columnName": "error",
  551. "affinity": "TEXT",
  552. "notNull": false
  553. }
  554. ],
  555. "primaryKey": {
  556. "columnNames": [
  557. "id"
  558. ],
  559. "autoGenerate": true
  560. },
  561. "indices": [
  562. {
  563. "name": "index_message_account",
  564. "unique": false,
  565. "columnNames": [
  566. "account"
  567. ],
  568. "createSql": "CREATE INDEX `index_message_account` ON `${TABLE_NAME}` (`account`)"
  569. },
  570. {
  571. "name": "index_message_folder",
  572. "unique": false,
  573. "columnNames": [
  574. "folder"
  575. ],
  576. "createSql": "CREATE INDEX `index_message_folder` ON `${TABLE_NAME}` (`folder`)"
  577. },
  578. {
  579. "name": "index_message_identity",
  580. "unique": false,
  581. "columnNames": [
  582. "identity"
  583. ],
  584. "createSql": "CREATE INDEX `index_message_identity` ON `${TABLE_NAME}` (`identity`)"
  585. },
  586. {
  587. "name": "index_message_replying",
  588. "unique": false,
  589. "columnNames": [
  590. "replying"
  591. ],
  592. "createSql": "CREATE INDEX `index_message_replying` ON `${TABLE_NAME}` (`replying`)"
  593. },
  594. {
  595. "name": "index_message_folder_uid",
  596. "unique": true,
  597. "columnNames": [
  598. "folder",
  599. "uid"
  600. ],
  601. "createSql": "CREATE UNIQUE INDEX `index_message_folder_uid` ON `${TABLE_NAME}` (`folder`, `uid`)"
  602. },
  603. {
  604. "name": "index_message_msgid_folder",
  605. "unique": true,
  606. "columnNames": [
  607. "msgid",
  608. "folder"
  609. ],
  610. "createSql": "CREATE UNIQUE INDEX `index_message_msgid_folder` ON `${TABLE_NAME}` (`msgid`, `folder`)"
  611. },
  612. {
  613. "name": "index_message_thread",
  614. "unique": false,
  615. "columnNames": [
  616. "thread"
  617. ],
  618. "createSql": "CREATE INDEX `index_message_thread` ON `${TABLE_NAME}` (`thread`)"
  619. },
  620. {
  621. "name": "index_message_received",
  622. "unique": false,
  623. "columnNames": [
  624. "received"
  625. ],
  626. "createSql": "CREATE INDEX `index_message_received` ON `${TABLE_NAME}` (`received`)"
  627. },
  628. {
  629. "name": "index_message_ui_seen",
  630. "unique": false,
  631. "columnNames": [
  632. "ui_seen"
  633. ],
  634. "createSql": "CREATE INDEX `index_message_ui_seen` ON `${TABLE_NAME}` (`ui_seen`)"
  635. },
  636. {
  637. "name": "index_message_ui_hide",
  638. "unique": false,
  639. "columnNames": [
  640. "ui_hide"
  641. ],
  642. "createSql": "CREATE INDEX `index_message_ui_hide` ON `${TABLE_NAME}` (`ui_hide`)"
  643. },
  644. {
  645. "name": "index_message_ui_found",
  646. "unique": false,
  647. "columnNames": [
  648. "ui_found"
  649. ],
  650. "createSql": "CREATE INDEX `index_message_ui_found` ON `${TABLE_NAME}` (`ui_found`)"
  651. }
  652. ],
  653. "foreignKeys": [
  654. {
  655. "table": "account",
  656. "onDelete": "CASCADE",
  657. "onUpdate": "NO ACTION",
  658. "columns": [
  659. "account"
  660. ],
  661. "referencedColumns": [
  662. "id"
  663. ]
  664. },
  665. {
  666. "table": "folder",
  667. "onDelete": "CASCADE",
  668. "onUpdate": "NO ACTION",
  669. "columns": [
  670. "folder"
  671. ],
  672. "referencedColumns": [
  673. "id"
  674. ]
  675. },
  676. {
  677. "table": "identity",
  678. "onDelete": "CASCADE",
  679. "onUpdate": "NO ACTION",
  680. "columns": [
  681. "identity"
  682. ],
  683. "referencedColumns": [
  684. "id"
  685. ]
  686. },
  687. {
  688. "table": "message",
  689. "onDelete": "CASCADE",
  690. "onUpdate": "NO ACTION",
  691. "columns": [
  692. "replying"
  693. ],
  694. "referencedColumns": [
  695. "id"
  696. ]
  697. }
  698. ]
  699. },
  700. {
  701. "tableName": "attachment",
  702. "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 )",
  703. "fields": [
  704. {
  705. "fieldPath": "id",
  706. "columnName": "id",
  707. "affinity": "INTEGER",
  708. "notNull": false
  709. },
  710. {
  711. "fieldPath": "message",
  712. "columnName": "message",
  713. "affinity": "INTEGER",
  714. "notNull": true
  715. },
  716. {
  717. "fieldPath": "sequence",
  718. "columnName": "sequence",
  719. "affinity": "INTEGER",
  720. "notNull": true
  721. },
  722. {
  723. "fieldPath": "name",
  724. "columnName": "name",
  725. "affinity": "TEXT",
  726. "notNull": false
  727. },
  728. {
  729. "fieldPath": "type",
  730. "columnName": "type",
  731. "affinity": "TEXT",
  732. "notNull": true
  733. },
  734. {
  735. "fieldPath": "cid",
  736. "columnName": "cid",
  737. "affinity": "TEXT",
  738. "notNull": false
  739. },
  740. {
  741. "fieldPath": "size",
  742. "columnName": "size",
  743. "affinity": "INTEGER",
  744. "notNull": false
  745. },
  746. {
  747. "fieldPath": "progress",
  748. "columnName": "progress",
  749. "affinity": "INTEGER",
  750. "notNull": false
  751. },
  752. {
  753. "fieldPath": "available",
  754. "columnName": "available",
  755. "affinity": "INTEGER",
  756. "notNull": true
  757. }
  758. ],
  759. "primaryKey": {
  760. "columnNames": [
  761. "id"
  762. ],
  763. "autoGenerate": true
  764. },
  765. "indices": [
  766. {
  767. "name": "index_attachment_message",
  768. "unique": false,
  769. "columnNames": [
  770. "message"
  771. ],
  772. "createSql": "CREATE INDEX `index_attachment_message` ON `${TABLE_NAME}` (`message`)"
  773. },
  774. {
  775. "name": "index_attachment_message_sequence",
  776. "unique": true,
  777. "columnNames": [
  778. "message",
  779. "sequence"
  780. ],
  781. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_sequence` ON `${TABLE_NAME}` (`message`, `sequence`)"
  782. },
  783. {
  784. "name": "index_attachment_message_cid",
  785. "unique": true,
  786. "columnNames": [
  787. "message",
  788. "cid"
  789. ],
  790. "createSql": "CREATE UNIQUE INDEX `index_attachment_message_cid` ON `${TABLE_NAME}` (`message`, `cid`)"
  791. }
  792. ],
  793. "foreignKeys": [
  794. {
  795. "table": "message",
  796. "onDelete": "CASCADE",
  797. "onUpdate": "NO ACTION",
  798. "columns": [
  799. "message"
  800. ],
  801. "referencedColumns": [
  802. "id"
  803. ]
  804. }
  805. ]
  806. },
  807. {
  808. "tableName": "operation",
  809. "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 )",
  810. "fields": [
  811. {
  812. "fieldPath": "id",
  813. "columnName": "id",
  814. "affinity": "INTEGER",
  815. "notNull": false
  816. },
  817. {
  818. "fieldPath": "folder",
  819. "columnName": "folder",
  820. "affinity": "INTEGER",
  821. "notNull": true
  822. },
  823. {
  824. "fieldPath": "message",
  825. "columnName": "message",
  826. "affinity": "INTEGER",
  827. "notNull": true
  828. },
  829. {
  830. "fieldPath": "name",
  831. "columnName": "name",
  832. "affinity": "TEXT",
  833. "notNull": true
  834. },
  835. {
  836. "fieldPath": "args",
  837. "columnName": "args",
  838. "affinity": "TEXT",
  839. "notNull": true
  840. },
  841. {
  842. "fieldPath": "created",
  843. "columnName": "created",
  844. "affinity": "INTEGER",
  845. "notNull": true
  846. }
  847. ],
  848. "primaryKey": {
  849. "columnNames": [
  850. "id"
  851. ],
  852. "autoGenerate": true
  853. },
  854. "indices": [
  855. {
  856. "name": "index_operation_folder",
  857. "unique": false,
  858. "columnNames": [
  859. "folder"
  860. ],
  861. "createSql": "CREATE INDEX `index_operation_folder` ON `${TABLE_NAME}` (`folder`)"
  862. },
  863. {
  864. "name": "index_operation_message",
  865. "unique": false,
  866. "columnNames": [
  867. "message"
  868. ],
  869. "createSql": "CREATE INDEX `index_operation_message` ON `${TABLE_NAME}` (`message`)"
  870. }
  871. ],
  872. "foreignKeys": [
  873. {
  874. "table": "folder",
  875. "onDelete": "CASCADE",
  876. "onUpdate": "NO ACTION",
  877. "columns": [
  878. "folder"
  879. ],
  880. "referencedColumns": [
  881. "id"
  882. ]
  883. },
  884. {
  885. "table": "message",
  886. "onDelete": "CASCADE",
  887. "onUpdate": "NO ACTION",
  888. "columns": [
  889. "message"
  890. ],
  891. "referencedColumns": [
  892. "id"
  893. ]
  894. }
  895. ]
  896. },
  897. {
  898. "tableName": "answer",
  899. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT NOT NULL, `text` TEXT NOT NULL)",
  900. "fields": [
  901. {
  902. "fieldPath": "id",
  903. "columnName": "id",
  904. "affinity": "INTEGER",
  905. "notNull": false
  906. },
  907. {
  908. "fieldPath": "name",
  909. "columnName": "name",
  910. "affinity": "TEXT",
  911. "notNull": true
  912. },
  913. {
  914. "fieldPath": "text",
  915. "columnName": "text",
  916. "affinity": "TEXT",
  917. "notNull": true
  918. }
  919. ],
  920. "primaryKey": {
  921. "columnNames": [
  922. "id"
  923. ],
  924. "autoGenerate": true
  925. },
  926. "indices": [],
  927. "foreignKeys": []
  928. },
  929. {
  930. "tableName": "log",
  931. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `time` INTEGER NOT NULL, `data` TEXT NOT NULL)",
  932. "fields": [
  933. {
  934. "fieldPath": "id",
  935. "columnName": "id",
  936. "affinity": "INTEGER",
  937. "notNull": false
  938. },
  939. {
  940. "fieldPath": "time",
  941. "columnName": "time",
  942. "affinity": "INTEGER",
  943. "notNull": true
  944. },
  945. {
  946. "fieldPath": "data",
  947. "columnName": "data",
  948. "affinity": "TEXT",
  949. "notNull": true
  950. }
  951. ],
  952. "primaryKey": {
  953. "columnNames": [
  954. "id"
  955. ],
  956. "autoGenerate": true
  957. },
  958. "indices": [
  959. {
  960. "name": "index_log_time",
  961. "unique": false,
  962. "columnNames": [
  963. "time"
  964. ],
  965. "createSql": "CREATE INDEX `index_log_time` ON `${TABLE_NAME}` (`time`)"
  966. }
  967. ],
  968. "foreignKeys": []
  969. }
  970. ],
  971. "setupQueries": [
  972. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  973. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"95bd1e083056fa7625f21430f7d53e2d\")"
  974. ]
  975. }
  976. }