@rfc0/patty 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (465) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +214 -2
  3. package/dist/adapters/access-tokens.js +7 -0
  4. package/dist/adapters/accounts.js +37 -0
  5. package/dist/adapters/auth.js +11 -0
  6. package/dist/adapters/bills.js +32 -0
  7. package/dist/adapters/budgets.js +29 -0
  8. package/dist/adapters/categories.js +32 -0
  9. package/dist/adapters/client-grants.js +7 -0
  10. package/dist/adapters/credit-cards.js +33 -0
  11. package/dist/adapters/currencies.js +2 -0
  12. package/dist/adapters/currency-rates.js +18 -0
  13. package/dist/adapters/dashboards.js +43 -0
  14. package/dist/adapters/demo.js +13 -0
  15. package/dist/adapters/instance-settings.js +7 -0
  16. package/dist/adapters/invites.js +7 -0
  17. package/dist/adapters/recurring.js +55 -0
  18. package/dist/adapters/sessions.js +7 -0
  19. package/dist/adapters/settings.js +4 -0
  20. package/dist/adapters/setup-codes.js +7 -0
  21. package/dist/adapters/tags.js +9 -0
  22. package/dist/adapters/transactions.js +95 -0
  23. package/dist/adapters/users.js +7 -0
  24. package/dist/common/build-version.js +5 -0
  25. package/dist/common/errors.js +118 -0
  26. package/dist/common/net.js +71 -0
  27. package/dist/common/result.js +7 -0
  28. package/dist/composition/auth.js +106 -0
  29. package/dist/composition/boot.js +27 -0
  30. package/dist/composition/cli.js +86 -0
  31. package/dist/composition/demo/seed.js +92 -0
  32. package/dist/composition/demo/shell.js +107 -0
  33. package/dist/composition/export.js +89 -0
  34. package/dist/composition/http.js +110 -0
  35. package/dist/composition/import.js +55 -0
  36. package/dist/composition/lazy-modules.js +2 -0
  37. package/dist/composition/runtime.js +115 -0
  38. package/dist/composition/sign-in/interpreter.js +154 -0
  39. package/dist/composition/sign-in/server.js +36 -0
  40. package/dist/composition/sign-in/wiring.js +23 -0
  41. package/dist/composition/stdio.js +69 -0
  42. package/dist/config.js +136 -0
  43. package/dist/controllers/account/account.js +88 -0
  44. package/dist/controllers/account/transaction.js +119 -0
  45. package/dist/controllers/account/transfer.js +34 -0
  46. package/dist/controllers/aggregate.js +40 -0
  47. package/dist/controllers/auth/access-tokens.js +61 -0
  48. package/dist/controllers/auth/grants.js +136 -0
  49. package/dist/controllers/auth/key-export.js +20 -0
  50. package/dist/controllers/auth/owner.js +80 -0
  51. package/dist/controllers/auth/password.js +35 -0
  52. package/dist/controllers/auth/session.js +50 -0
  53. package/dist/controllers/auth/step-up.js +8 -0
  54. package/dist/controllers/auth/users.js +183 -0
  55. package/dist/controllers/budgets.js +87 -0
  56. package/dist/controllers/categories.js +67 -0
  57. package/dist/controllers/correlations.js +112 -0
  58. package/dist/controllers/credit-card/bill.js +105 -0
  59. package/dist/controllers/credit-card/credit-card.js +129 -0
  60. package/dist/controllers/credit-card/transaction.js +181 -0
  61. package/dist/controllers/currencies.js +1 -0
  62. package/dist/controllers/currency-rates.js +40 -0
  63. package/dist/controllers/dashboards.js +68 -0
  64. package/dist/controllers/demo/seed.js +31 -0
  65. package/dist/controllers/demo/tour.js +12 -0
  66. package/dist/controllers/deps.js +6 -0
  67. package/dist/controllers/instance.js +6 -0
  68. package/dist/controllers/merchants.js +12 -0
  69. package/dist/controllers/recurring.js +70 -0
  70. package/dist/controllers/resolve.js +37 -0
  71. package/dist/controllers/settings.js +47 -0
  72. package/dist/controllers/status.js +19 -0
  73. package/dist/controllers/summary.js +21 -0
  74. package/dist/controllers/tags.js +19 -0
  75. package/dist/controllers/transaction/bulk.js +6 -0
  76. package/dist/controllers/transaction/core.js +49 -0
  77. package/dist/controllers/transaction/read.js +28 -0
  78. package/dist/diplomat/auth/credentials.js +58 -0
  79. package/dist/diplomat/auth/sign-in-store.js +18 -0
  80. package/dist/diplomat/cli/commands/auth.js +100 -0
  81. package/dist/diplomat/cli/commands/db.js +72 -0
  82. package/dist/diplomat/cli/commands/demo.js +68 -0
  83. package/dist/diplomat/cli/commands/key.js +119 -0
  84. package/dist/diplomat/cli/commands/login.js +151 -0
  85. package/dist/diplomat/cli/commands/setup.js +132 -0
  86. package/dist/diplomat/cli/commands/users.js +123 -0
  87. package/dist/diplomat/cli/commands.js +61 -0
  88. package/dist/diplomat/cli/export-file.js +37 -0
  89. package/dist/diplomat/cli/import-file.js +44 -0
  90. package/dist/diplomat/cli/io.js +61 -0
  91. package/dist/diplomat/cli/key-export-approval.js +37 -0
  92. package/dist/diplomat/cli/messages.js +96 -0
  93. package/dist/diplomat/cli/prompt.js +74 -0
  94. package/dist/diplomat/cli/terminal.js +81 -0
  95. package/dist/diplomat/client-config/clients.js +150 -0
  96. package/dist/diplomat/client-config/merge.js +41 -0
  97. package/dist/diplomat/db/bootstrap.js +98 -0
  98. package/dist/diplomat/db/database-files.js +147 -0
  99. package/dist/diplomat/db/driver.js +167 -0
  100. package/dist/diplomat/db/effects.js +101 -0
  101. package/dist/diplomat/db/engine.js +9 -0
  102. package/dist/diplomat/db/export.js +22 -0
  103. package/dist/diplomat/db/file-lock.js +82 -0
  104. package/dist/diplomat/db/key-lock.js +14 -0
  105. package/dist/diplomat/db/locale-cache.js +23 -0
  106. package/dist/diplomat/db/migration-barrier.js +57 -0
  107. package/dist/diplomat/db/migration-journal.js +18 -0
  108. package/dist/diplomat/db/migration-lock.js +15 -0
  109. package/dist/diplomat/db/migrations.js +11 -0
  110. package/dist/diplomat/db/present.js +17 -0
  111. package/dist/diplomat/db/queries/aggregate-whitelist.js +35 -0
  112. package/dist/diplomat/db/queries/filters.js +59 -0
  113. package/dist/diplomat/db/queries/fts.js +18 -0
  114. package/dist/diplomat/db/queries/scope.js +8 -0
  115. package/dist/diplomat/db/queries/transaction-select.js +26 -0
  116. package/dist/diplomat/db/queries/tx-predicates.js +13 -0
  117. package/dist/diplomat/db/repos/access-tokens.js +27 -0
  118. package/dist/diplomat/db/repos/accounts.js +91 -0
  119. package/dist/diplomat/db/repos/bills.js +93 -0
  120. package/dist/diplomat/db/repos/budgets.js +72 -0
  121. package/dist/diplomat/db/repos/categories.js +53 -0
  122. package/dist/diplomat/db/repos/client-grants.js +67 -0
  123. package/dist/diplomat/db/repos/correlations.js +66 -0
  124. package/dist/diplomat/db/repos/credit-cards.js +67 -0
  125. package/dist/diplomat/db/repos/currencies.js +8 -0
  126. package/dist/diplomat/db/repos/currency-rates.js +40 -0
  127. package/dist/diplomat/db/repos/dashboards.js +123 -0
  128. package/dist/diplomat/db/repos/health.js +12 -0
  129. package/dist/diplomat/db/repos/instance-settings.js +14 -0
  130. package/dist/diplomat/db/repos/instance.js +58 -0
  131. package/dist/diplomat/db/repos/invites.js +43 -0
  132. package/dist/diplomat/db/repos/merchants.js +121 -0
  133. package/dist/diplomat/db/repos/recurring.js +29 -0
  134. package/dist/diplomat/db/repos/sessions.js +19 -0
  135. package/dist/diplomat/db/repos/settings.js +41 -0
  136. package/dist/diplomat/db/repos/setup-codes.js +28 -0
  137. package/dist/diplomat/db/repos/sub-categories.js +67 -0
  138. package/dist/diplomat/db/repos/tags.js +51 -0
  139. package/dist/diplomat/db/repos/transaction-tags.js +57 -0
  140. package/dist/diplomat/db/repos/transactions.js +163 -0
  141. package/dist/diplomat/db/repos/users.js +47 -0
  142. package/dist/diplomat/db/safety-copy.js +87 -0
  143. package/dist/diplomat/db/schema.js +348 -0
  144. package/dist/diplomat/db/seed/categories.js +112 -0
  145. package/dist/diplomat/db/seed/currencies.js +9 -0
  146. package/dist/diplomat/db/seed/demo/br.js +98 -0
  147. package/dist/diplomat/db/seed/demo/co.js +89 -0
  148. package/dist/diplomat/db/seed/demo/index.js +12 -0
  149. package/dist/diplomat/db/seed/demo/mx.js +90 -0
  150. package/dist/diplomat/db/seed/demo/shared.js +39 -0
  151. package/dist/diplomat/db/seed/demo/us.js +90 -0
  152. package/dist/diplomat/db/seed/merchant-rules.js +188 -0
  153. package/dist/diplomat/db/sqlite-errors.js +40 -0
  154. package/dist/diplomat/db/tenancy-integrity.js +45 -0
  155. package/dist/diplomat/db/version-guard.js +16 -0
  156. package/dist/diplomat/http/auth-pages.js +41 -0
  157. package/dist/diplomat/http/auth-paths.js +46 -0
  158. package/dist/diplomat/http/bearer.js +15 -0
  159. package/dist/diplomat/http/connect-pages.js +51 -0
  160. package/dist/diplomat/http/context.js +17 -0
  161. package/dist/diplomat/http/cookies.js +27 -0
  162. package/dist/diplomat/http/form-pages.js +38 -0
  163. package/dist/diplomat/http/hooks/auth.js +106 -0
  164. package/dist/diplomat/http/hooks/demo-marker.js +59 -0
  165. package/dist/diplomat/http/openapi.js +73 -0
  166. package/dist/diplomat/http/principal.js +1 -0
  167. package/dist/diplomat/http/rate-limiter.js +78 -0
  168. package/dist/diplomat/http/remedy.js +26 -0
  169. package/dist/diplomat/http/respond.js +50 -0
  170. package/dist/diplomat/http/routes/account.js +226 -0
  171. package/dist/diplomat/http/routes/aggregate.js +28 -0
  172. package/dist/diplomat/http/routes/auth.js +105 -0
  173. package/dist/diplomat/http/routes/budget.js +34 -0
  174. package/dist/diplomat/http/routes/category.js +109 -0
  175. package/dist/diplomat/http/routes/connect.js +124 -0
  176. package/dist/diplomat/http/routes/credit-card.js +263 -0
  177. package/dist/diplomat/http/routes/currency-rates.js +60 -0
  178. package/dist/diplomat/http/routes/currency.js +16 -0
  179. package/dist/diplomat/http/routes/dashboard.js +93 -0
  180. package/dist/diplomat/http/routes/invite.js +63 -0
  181. package/dist/diplomat/http/routes/recurring.js +65 -0
  182. package/dist/diplomat/http/routes/settings.js +38 -0
  183. package/dist/diplomat/http/routes/summary.js +23 -0
  184. package/dist/diplomat/http/routes/system.js +29 -0
  185. package/dist/diplomat/http/routes/tag.js +51 -0
  186. package/dist/diplomat/http/routes/tokens.js +72 -0
  187. package/dist/diplomat/http/routes/transaction.js +55 -0
  188. package/dist/diplomat/http/routes/transfer.js +35 -0
  189. package/dist/diplomat/http/routes/ui.js +110 -0
  190. package/dist/diplomat/http/routes/users.js +156 -0
  191. package/dist/diplomat/http/routes/well-known.js +26 -0
  192. package/dist/diplomat/http/routes.js +85 -0
  193. package/dist/diplomat/http/session.js +34 -0
  194. package/dist/diplomat/http/token-pages.js +75 -0
  195. package/dist/diplomat/http/ui-files.js +21 -0
  196. package/dist/diplomat/http/user-pages.js +93 -0
  197. package/dist/diplomat/mcp/annotations.js +8 -0
  198. package/dist/diplomat/mcp/auth-info.js +20 -0
  199. package/dist/diplomat/mcp/context.js +14 -0
  200. package/dist/diplomat/mcp/definition.js +3 -0
  201. package/dist/diplomat/mcp/gate.js +15 -0
  202. package/dist/diplomat/mcp/instructions.js +19 -0
  203. package/dist/diplomat/mcp/prompts.js +125 -0
  204. package/dist/diplomat/mcp/register.js +12 -0
  205. package/dist/diplomat/mcp/remedy.js +17 -0
  206. package/dist/diplomat/mcp/resources.js +93 -0
  207. package/dist/diplomat/mcp/respond.js +20 -0
  208. package/dist/diplomat/mcp/route.js +62 -0
  209. package/dist/diplomat/mcp/scopes.js +53 -0
  210. package/dist/diplomat/mcp/server.js +26 -0
  211. package/dist/diplomat/mcp/shared.js +5 -0
  212. package/dist/diplomat/mcp/stdio-session.js +94 -0
  213. package/dist/diplomat/mcp/stdio.js +23 -0
  214. package/dist/diplomat/mcp/tool-name.js +59 -0
  215. package/dist/diplomat/mcp/tools/account.js +218 -0
  216. package/dist/diplomat/mcp/tools/aggregate.js +32 -0
  217. package/dist/diplomat/mcp/tools/budget.js +99 -0
  218. package/dist/diplomat/mcp/tools/category.js +103 -0
  219. package/dist/diplomat/mcp/tools/correlations.js +70 -0
  220. package/dist/diplomat/mcp/tools/credit-card.js +239 -0
  221. package/dist/diplomat/mcp/tools/currency-rates.js +62 -0
  222. package/dist/diplomat/mcp/tools/dashboard.js +75 -0
  223. package/dist/diplomat/mcp/tools/index.js +31 -0
  224. package/dist/diplomat/mcp/tools/recurring.js +62 -0
  225. package/dist/diplomat/mcp/tools/summary.js +30 -0
  226. package/dist/diplomat/mcp/tools/system.js +83 -0
  227. package/dist/diplomat/mcp/tools/tag.js +48 -0
  228. package/dist/diplomat/mcp/tools/transaction.js +53 -0
  229. package/dist/diplomat/mcp/tools/transfer.js +28 -0
  230. package/dist/diplomat/mcp/tour.js +87 -0
  231. package/dist/logic/account.js +79 -0
  232. package/dist/logic/aggregate.js +37 -0
  233. package/dist/logic/auth/bearer.js +35 -0
  234. package/dist/logic/auth/grant.js +126 -0
  235. package/dist/logic/auth/key-export.js +10 -0
  236. package/dist/logic/auth/keychain.js +3 -0
  237. package/dist/logic/auth/message.js +22 -0
  238. package/dist/logic/auth/origin.js +57 -0
  239. package/dist/logic/auth/owner.js +22 -0
  240. package/dist/logic/auth/password.js +3 -0
  241. package/dist/logic/auth/redact.js +25 -0
  242. package/dist/logic/auth/revoke.js +28 -0
  243. package/dist/logic/auth/scope.js +17 -0
  244. package/dist/logic/auth/session.js +30 -0
  245. package/dist/logic/auth/sign-in-flow.js +305 -0
  246. package/dist/logic/auth/time.js +2 -0
  247. package/dist/logic/auth/token.js +74 -0
  248. package/dist/logic/auth/user-plans.js +84 -0
  249. package/dist/logic/auth/users.js +78 -0
  250. package/dist/logic/balance.js +2 -0
  251. package/dist/logic/bill.js +74 -0
  252. package/dist/logic/budget.js +78 -0
  253. package/dist/logic/category.js +37 -0
  254. package/dist/logic/classify.js +21 -0
  255. package/dist/logic/correlations.js +147 -0
  256. package/dist/logic/credit-card.js +2 -0
  257. package/dist/logic/currency-rate.js +69 -0
  258. package/dist/logic/dashboard.js +40 -0
  259. package/dist/logic/demo/database.js +30 -0
  260. package/dist/logic/demo/plan.js +308 -0
  261. package/dist/logic/demo/tour.js +33 -0
  262. package/dist/logic/export-destination.js +12 -0
  263. package/dist/logic/key-import.js +15 -0
  264. package/dist/logic/locale.js +5 -0
  265. package/dist/logic/localize.js +12 -0
  266. package/dist/logic/merchant.js +31 -0
  267. package/dist/logic/migration.js +1 -0
  268. package/dist/logic/money.js +12 -0
  269. package/dist/logic/period.js +45 -0
  270. package/dist/logic/persistence.js +48 -0
  271. package/dist/logic/recurring.js +51 -0
  272. package/dist/logic/resolve.js +44 -0
  273. package/dist/logic/summary.js +29 -0
  274. package/dist/logic/tag.js +13 -0
  275. package/dist/logic/transaction.js +197 -0
  276. package/dist/main.js +42 -0
  277. package/dist/models/account.js +197 -0
  278. package/dist/models/aggregate.js +61 -0
  279. package/dist/models/auth/bearer.js +11 -0
  280. package/dist/models/auth/entity.js +17 -0
  281. package/dist/models/auth/errors.js +42 -0
  282. package/dist/models/auth/grant.js +58 -0
  283. package/dist/models/auth/key-export.js +11 -0
  284. package/dist/models/auth/message.js +50 -0
  285. package/dist/models/auth/mode.js +7 -0
  286. package/dist/models/auth/origin.js +16 -0
  287. package/dist/models/auth/owner.js +36 -0
  288. package/dist/models/auth/password.js +24 -0
  289. package/dist/models/auth/principal.js +26 -0
  290. package/dist/models/auth/redact.js +4 -0
  291. package/dist/models/auth/scope.js +9 -0
  292. package/dist/models/auth/session.js +19 -0
  293. package/dist/models/auth/sign-in-flow.js +102 -0
  294. package/dist/models/auth/sign-in.js +41 -0
  295. package/dist/models/auth/time.js +5 -0
  296. package/dist/models/auth/token.js +50 -0
  297. package/dist/models/auth/users.js +52 -0
  298. package/dist/models/bill.js +55 -0
  299. package/dist/models/budget.js +106 -0
  300. package/dist/models/category.js +52 -0
  301. package/dist/models/client-config.js +18 -0
  302. package/dist/models/correlations.js +215 -0
  303. package/dist/models/credit-card.js +156 -0
  304. package/dist/models/currency-rate.js +83 -0
  305. package/dist/models/dashboard.js +54 -0
  306. package/dist/models/database.js +16 -0
  307. package/dist/models/date.js +8 -0
  308. package/dist/models/demo/core.js +58 -0
  309. package/dist/models/demo/tour.js +41 -0
  310. package/dist/models/encryption-key.js +2 -0
  311. package/dist/models/error.js +13 -0
  312. package/dist/models/export.js +9 -0
  313. package/dist/models/id.js +2 -0
  314. package/dist/models/instance.js +7 -0
  315. package/dist/models/key-import.js +6 -0
  316. package/dist/models/locale.js +25 -0
  317. package/dist/models/merchant.js +12 -0
  318. package/dist/models/money.js +14 -0
  319. package/dist/models/package.js +12 -0
  320. package/dist/models/page.js +56 -0
  321. package/dist/models/persistence.js +1 -0
  322. package/dist/models/prompts.js +5 -0
  323. package/dist/models/recurring.js +54 -0
  324. package/dist/models/remedy.js +17 -0
  325. package/dist/models/resolution.js +1 -0
  326. package/dist/models/startup.js +7 -0
  327. package/dist/models/summary.js +24 -0
  328. package/dist/models/tag.js +14 -0
  329. package/dist/models/tenancy.js +10 -0
  330. package/dist/models/transaction-tag.js +6 -0
  331. package/dist/models/transaction.js +275 -0
  332. package/dist/wire/db/access-tokens.js +1 -0
  333. package/dist/wire/db/accounts.js +7 -0
  334. package/dist/wire/db/aggregate.js +16 -0
  335. package/dist/wire/db/bills.js +14 -0
  336. package/dist/wire/db/budgets.js +33 -0
  337. package/dist/wire/db/categories.js +14 -0
  338. package/dist/wire/db/client-grants.js +1 -0
  339. package/dist/wire/db/correlations.js +49 -0
  340. package/dist/wire/db/credit-cards.js +1 -0
  341. package/dist/wire/db/currencies.js +1 -0
  342. package/dist/wire/db/currency-rates.js +1 -0
  343. package/dist/wire/db/dashboards.js +1 -0
  344. package/dist/wire/db/instance-settings.js +1 -0
  345. package/dist/wire/db/invites.js +1 -0
  346. package/dist/wire/db/merchants.js +18 -0
  347. package/dist/wire/db/recurring.js +19 -0
  348. package/dist/wire/db/sessions.js +1 -0
  349. package/dist/wire/db/settings.js +1 -0
  350. package/dist/wire/db/setup-codes.js +1 -0
  351. package/dist/wire/db/tags.js +1 -0
  352. package/dist/wire/db/tenancy.js +1 -0
  353. package/dist/wire/db/transactions.js +89 -0
  354. package/dist/wire/db/users.js +1 -0
  355. package/dist/wire/in/accounts.js +26 -0
  356. package/dist/wire/in/aggregate.js +10 -0
  357. package/dist/wire/in/auth.js +107 -0
  358. package/dist/wire/in/bills.js +11 -0
  359. package/dist/wire/in/budgets.js +11 -0
  360. package/dist/wire/in/categories.js +9 -0
  361. package/dist/wire/in/cli.js +106 -0
  362. package/dist/wire/in/coerce.js +6 -0
  363. package/dist/wire/in/common.js +17 -0
  364. package/dist/wire/in/credit-cards.js +16 -0
  365. package/dist/wire/in/currency-rates.js +8 -0
  366. package/dist/wire/in/period.js +7 -0
  367. package/dist/wire/in/recurring.js +6 -0
  368. package/dist/wire/in/settings.js +5 -0
  369. package/dist/wire/in/summary.js +5 -0
  370. package/dist/wire/in/tags.js +2 -0
  371. package/dist/wire/in/transactions.js +31 -0
  372. package/dist/wire/out/bills.js +9 -0
  373. package/dist/wire/out/budgets.js +10 -0
  374. package/dist/wire/out/client-config.js +2 -0
  375. package/dist/wire/out/common.js +4 -0
  376. package/dist/wire/out/credit-cards.js +15 -0
  377. package/dist/wire/out/currency-rates.js +11 -0
  378. package/dist/wire/out/errors.js +58 -0
  379. package/dist/wire/out/recurring.js +6 -0
  380. package/dist/wire/out/status.js +10 -0
  381. package/dist/wire/out/summary.js +9 -0
  382. package/dist/wire/out/transactions.js +52 -0
  383. package/drizzle/0000_futuristic_umar.sql +124 -0
  384. package/drizzle/0001_fts5_search.sql +23 -0
  385. package/drizzle/0002_rename_graph_to_history.sql +7 -0
  386. package/drizzle/0003_lyrical_hairball.sql +2 -0
  387. package/drizzle/0004_misty_ikaris.sql +7 -0
  388. package/drizzle/0005_credit-liability-accounts.sql +14 -0
  389. package/drizzle/0006_smart_aqueduct.sql +1 -0
  390. package/drizzle/0007_add_dashboards.sql +5 -0
  391. package/drizzle/0008_yummy_madripoor.sql +1 -0
  392. package/drizzle/0009_version_groundwork.sql +9 -0
  393. package/drizzle/0010_category_merchant_association_cascade.sql +16 -0
  394. package/drizzle/0011_dashboard_id_normalization.sql +16 -0
  395. package/drizzle/0012_hot_the_spike.sql +12 -0
  396. package/drizzle/0013_recurring_rules_merchant.sql +1 -0
  397. package/drizzle/0014_dashboard_source_discriminator.sql +17 -0
  398. package/drizzle/0015_currencies_decimals.sql +1 -0
  399. package/drizzle/0016_unusual_zaran.sql +13 -0
  400. package/drizzle/0017_premium_blur.sql +1 -0
  401. package/drizzle/0018_auth_identity.sql +39 -0
  402. package/drizzle/0019_access_tokens.sql +16 -0
  403. package/drizzle/0020_stdio_sign_in.sql +27 -0
  404. package/drizzle/0021_tenancy_data.sql +289 -0
  405. package/drizzle/0022_user_management.sql +17 -0
  406. package/drizzle/0023_instance_settings_row.sql +2 -0
  407. package/drizzle/0024_credentials_changed_at.sql +2 -0
  408. package/drizzle/0025_instance_kind.sql +2 -0
  409. package/drizzle/0026_demo_seeded_at.sql +2 -0
  410. package/drizzle/0027_demo_country.sql +2 -0
  411. package/drizzle/0028_reset_sign_ins.sql +2 -0
  412. package/drizzle/meta/0000_snapshot.json +894 -0
  413. package/drizzle/meta/0003_snapshot.json +910 -0
  414. package/drizzle/meta/0004_snapshot.json +951 -0
  415. package/drizzle/meta/0005_snapshot.json +991 -0
  416. package/drizzle/meta/0006_snapshot.json +998 -0
  417. package/drizzle/meta/0007_snapshot.json +1029 -0
  418. package/drizzle/meta/0008_snapshot.json +1049 -0
  419. package/drizzle/meta/0009_snapshot.json +1121 -0
  420. package/drizzle/meta/0010_snapshot.json +1121 -0
  421. package/drizzle/meta/0011_snapshot.json +1136 -0
  422. package/drizzle/meta/0012_snapshot.json +1227 -0
  423. package/drizzle/meta/0013_snapshot.json +1247 -0
  424. package/drizzle/meta/0014_snapshot.json +1267 -0
  425. package/drizzle/meta/0015_snapshot.json +1275 -0
  426. package/drizzle/meta/0016_snapshot.json +1371 -0
  427. package/drizzle/meta/0017_snapshot.json +1392 -0
  428. package/drizzle/meta/0018_snapshot.json +1603 -0
  429. package/drizzle/meta/0019_snapshot.json +1713 -0
  430. package/drizzle/meta/0020_snapshot.json +1904 -0
  431. package/drizzle/meta/0021_snapshot.json +2186 -0
  432. package/drizzle/meta/0022_snapshot.json +2311 -0
  433. package/drizzle/meta/0023_snapshot.json +2311 -0
  434. package/drizzle/meta/0024_snapshot.json +2318 -0
  435. package/drizzle/meta/0025_snapshot.json +2326 -0
  436. package/drizzle/meta/0026_snapshot.json +2333 -0
  437. package/drizzle/meta/0027_snapshot.json +2340 -0
  438. package/drizzle/meta/0028_snapshot.json +2340 -0
  439. package/drizzle/meta/_journal.json +209 -0
  440. package/package.json +106 -4
  441. package/skills/dashboard-building/SKILL.md +201 -0
  442. package/skills/patty-tour/SKILL.md +34 -0
  443. package/ui/app.css +758 -0
  444. package/ui/app.js +493 -0
  445. package/ui/connect-result.html +16 -0
  446. package/ui/connect.html +53 -0
  447. package/ui/dashboards/accounts.html +3189 -0
  448. package/ui/dashboards/budget.html +1716 -0
  449. package/ui/dashboards/cards.html +4032 -0
  450. package/ui/dashboards/categories.html +4694 -0
  451. package/ui/dashboards/comparative.html +2464 -0
  452. package/ui/dashboards/dashboards.html +839 -0
  453. package/ui/dashboards/overview.html +2405 -0
  454. package/ui/dashboards/pending.html +2973 -0
  455. package/ui/dashboards/projections.html +2517 -0
  456. package/ui/dashboards/tags.html +1365 -0
  457. package/ui/invite.html +44 -0
  458. package/ui/login.html +26 -0
  459. package/ui/money.js +175 -0
  460. package/ui/setup.html +29 -0
  461. package/ui/shell.html +96 -0
  462. package/ui/token-created.html +24 -0
  463. package/ui/tokens.html +58 -0
  464. package/ui/user-invited.html +27 -0
  465. package/ui/users.html +60 -0
@@ -0,0 +1,2311 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "35d9efaf-fabb-4497-b341-1f7141fcb396",
5
+ "prevId": "40fe37de-98e3-46a2-9ff3-8220ca178bb0",
6
+ "tables": {
7
+ "access_tokens": {
8
+ "name": "access_tokens",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "user_id": {
18
+ "name": "user_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "kind": {
25
+ "name": "kind",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false,
30
+ "default": "'pat'"
31
+ },
32
+ "client_name": {
33
+ "name": "client_name",
34
+ "type": "text",
35
+ "primaryKey": false,
36
+ "notNull": false,
37
+ "autoincrement": false
38
+ },
39
+ "profile": {
40
+ "name": "profile",
41
+ "type": "text",
42
+ "primaryKey": false,
43
+ "notNull": false,
44
+ "autoincrement": false
45
+ },
46
+ "name": {
47
+ "name": "name",
48
+ "type": "text",
49
+ "primaryKey": false,
50
+ "notNull": true,
51
+ "autoincrement": false
52
+ },
53
+ "token_hash": {
54
+ "name": "token_hash",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": true,
58
+ "autoincrement": false
59
+ },
60
+ "prefix": {
61
+ "name": "prefix",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": true,
65
+ "autoincrement": false
66
+ },
67
+ "scopes": {
68
+ "name": "scopes",
69
+ "type": "text",
70
+ "primaryKey": false,
71
+ "notNull": true,
72
+ "autoincrement": false
73
+ },
74
+ "created_at": {
75
+ "name": "created_at",
76
+ "type": "text",
77
+ "primaryKey": false,
78
+ "notNull": true,
79
+ "autoincrement": false
80
+ },
81
+ "last_used_at": {
82
+ "name": "last_used_at",
83
+ "type": "text",
84
+ "primaryKey": false,
85
+ "notNull": false,
86
+ "autoincrement": false
87
+ },
88
+ "expires_at": {
89
+ "name": "expires_at",
90
+ "type": "text",
91
+ "primaryKey": false,
92
+ "notNull": false,
93
+ "autoincrement": false
94
+ },
95
+ "revoked_at": {
96
+ "name": "revoked_at",
97
+ "type": "text",
98
+ "primaryKey": false,
99
+ "notNull": false,
100
+ "autoincrement": false
101
+ },
102
+ "version": {
103
+ "name": "version",
104
+ "type": "integer",
105
+ "primaryKey": false,
106
+ "notNull": true,
107
+ "autoincrement": false,
108
+ "default": 0
109
+ }
110
+ },
111
+ "indexes": {
112
+ "access_tokens_token_hash_unique": {
113
+ "name": "access_tokens_token_hash_unique",
114
+ "columns": [
115
+ "token_hash"
116
+ ],
117
+ "isUnique": true
118
+ }
119
+ },
120
+ "foreignKeys": {
121
+ "access_tokens_user_id_users_id_fk": {
122
+ "name": "access_tokens_user_id_users_id_fk",
123
+ "tableFrom": "access_tokens",
124
+ "tableTo": "users",
125
+ "columnsFrom": [
126
+ "user_id"
127
+ ],
128
+ "columnsTo": [
129
+ "id"
130
+ ],
131
+ "onDelete": "cascade",
132
+ "onUpdate": "no action"
133
+ }
134
+ },
135
+ "compositePrimaryKeys": {},
136
+ "uniqueConstraints": {},
137
+ "checkConstraints": {}
138
+ },
139
+ "accounts": {
140
+ "name": "accounts",
141
+ "columns": {
142
+ "id": {
143
+ "name": "id",
144
+ "type": "text",
145
+ "primaryKey": true,
146
+ "notNull": true,
147
+ "autoincrement": false
148
+ },
149
+ "name": {
150
+ "name": "name",
151
+ "type": "text",
152
+ "primaryKey": false,
153
+ "notNull": true,
154
+ "autoincrement": false
155
+ },
156
+ "type": {
157
+ "name": "type",
158
+ "type": "text",
159
+ "primaryKey": false,
160
+ "notNull": true,
161
+ "autoincrement": false
162
+ },
163
+ "initial_balance": {
164
+ "name": "initial_balance",
165
+ "type": "real",
166
+ "primaryKey": false,
167
+ "notNull": true,
168
+ "autoincrement": false,
169
+ "default": 0
170
+ },
171
+ "currency": {
172
+ "name": "currency",
173
+ "type": "text",
174
+ "primaryKey": false,
175
+ "notNull": true,
176
+ "autoincrement": false
177
+ },
178
+ "version": {
179
+ "name": "version",
180
+ "type": "integer",
181
+ "primaryKey": false,
182
+ "notNull": true,
183
+ "autoincrement": false,
184
+ "default": 0
185
+ },
186
+ "user_id": {
187
+ "name": "user_id",
188
+ "type": "text",
189
+ "primaryKey": false,
190
+ "notNull": true,
191
+ "autoincrement": false
192
+ }
193
+ },
194
+ "indexes": {},
195
+ "foreignKeys": {
196
+ "accounts_currency_currencies_code_fk": {
197
+ "name": "accounts_currency_currencies_code_fk",
198
+ "tableFrom": "accounts",
199
+ "tableTo": "currencies",
200
+ "columnsFrom": [
201
+ "currency"
202
+ ],
203
+ "columnsTo": [
204
+ "code"
205
+ ],
206
+ "onDelete": "no action",
207
+ "onUpdate": "no action"
208
+ },
209
+ "accounts_user_id_users_id_fk": {
210
+ "name": "accounts_user_id_users_id_fk",
211
+ "tableFrom": "accounts",
212
+ "tableTo": "users",
213
+ "columnsFrom": [
214
+ "user_id"
215
+ ],
216
+ "columnsTo": [
217
+ "id"
218
+ ],
219
+ "onDelete": "restrict",
220
+ "onUpdate": "no action"
221
+ }
222
+ },
223
+ "compositePrimaryKeys": {},
224
+ "uniqueConstraints": {},
225
+ "checkConstraints": {}
226
+ },
227
+ "bills": {
228
+ "name": "bills",
229
+ "columns": {
230
+ "id": {
231
+ "name": "id",
232
+ "type": "text",
233
+ "primaryKey": true,
234
+ "notNull": true,
235
+ "autoincrement": false
236
+ },
237
+ "credit_card_id": {
238
+ "name": "credit_card_id",
239
+ "type": "text",
240
+ "primaryKey": false,
241
+ "notNull": true,
242
+ "autoincrement": false
243
+ },
244
+ "month": {
245
+ "name": "month",
246
+ "type": "integer",
247
+ "primaryKey": false,
248
+ "notNull": true,
249
+ "autoincrement": false
250
+ },
251
+ "year": {
252
+ "name": "year",
253
+ "type": "integer",
254
+ "primaryKey": false,
255
+ "notNull": true,
256
+ "autoincrement": false
257
+ },
258
+ "close_date": {
259
+ "name": "close_date",
260
+ "type": "text",
261
+ "primaryKey": false,
262
+ "notNull": true,
263
+ "autoincrement": false
264
+ },
265
+ "due_date": {
266
+ "name": "due_date",
267
+ "type": "text",
268
+ "primaryKey": false,
269
+ "notNull": true,
270
+ "autoincrement": false
271
+ },
272
+ "status": {
273
+ "name": "status",
274
+ "type": "text",
275
+ "primaryKey": false,
276
+ "notNull": true,
277
+ "autoincrement": false
278
+ },
279
+ "payment_transaction_id": {
280
+ "name": "payment_transaction_id",
281
+ "type": "text",
282
+ "primaryKey": false,
283
+ "notNull": false,
284
+ "autoincrement": false
285
+ },
286
+ "version": {
287
+ "name": "version",
288
+ "type": "integer",
289
+ "primaryKey": false,
290
+ "notNull": true,
291
+ "autoincrement": false,
292
+ "default": 0
293
+ },
294
+ "user_id": {
295
+ "name": "user_id",
296
+ "type": "text",
297
+ "primaryKey": false,
298
+ "notNull": true,
299
+ "autoincrement": false
300
+ }
301
+ },
302
+ "indexes": {
303
+ "bills_card_month_year": {
304
+ "name": "bills_card_month_year",
305
+ "columns": [
306
+ "credit_card_id",
307
+ "month",
308
+ "year"
309
+ ],
310
+ "isUnique": true
311
+ }
312
+ },
313
+ "foreignKeys": {
314
+ "bills_credit_card_id_credit_cards_id_fk": {
315
+ "name": "bills_credit_card_id_credit_cards_id_fk",
316
+ "tableFrom": "bills",
317
+ "tableTo": "credit_cards",
318
+ "columnsFrom": [
319
+ "credit_card_id"
320
+ ],
321
+ "columnsTo": [
322
+ "id"
323
+ ],
324
+ "onDelete": "no action",
325
+ "onUpdate": "no action"
326
+ },
327
+ "bills_payment_transaction_id_transactions_id_fk": {
328
+ "name": "bills_payment_transaction_id_transactions_id_fk",
329
+ "tableFrom": "bills",
330
+ "tableTo": "transactions",
331
+ "columnsFrom": [
332
+ "payment_transaction_id"
333
+ ],
334
+ "columnsTo": [
335
+ "id"
336
+ ],
337
+ "onDelete": "no action",
338
+ "onUpdate": "no action"
339
+ },
340
+ "bills_user_id_users_id_fk": {
341
+ "name": "bills_user_id_users_id_fk",
342
+ "tableFrom": "bills",
343
+ "tableTo": "users",
344
+ "columnsFrom": [
345
+ "user_id"
346
+ ],
347
+ "columnsTo": [
348
+ "id"
349
+ ],
350
+ "onDelete": "restrict",
351
+ "onUpdate": "no action"
352
+ }
353
+ },
354
+ "compositePrimaryKeys": {},
355
+ "uniqueConstraints": {},
356
+ "checkConstraints": {}
357
+ },
358
+ "budgets": {
359
+ "name": "budgets",
360
+ "columns": {
361
+ "id": {
362
+ "name": "id",
363
+ "type": "text",
364
+ "primaryKey": true,
365
+ "notNull": true,
366
+ "autoincrement": false
367
+ },
368
+ "category_id": {
369
+ "name": "category_id",
370
+ "type": "text",
371
+ "primaryKey": false,
372
+ "notNull": true,
373
+ "autoincrement": false
374
+ },
375
+ "currency": {
376
+ "name": "currency",
377
+ "type": "text",
378
+ "primaryKey": false,
379
+ "notNull": true,
380
+ "autoincrement": false
381
+ },
382
+ "limit_amount": {
383
+ "name": "limit_amount",
384
+ "type": "real",
385
+ "primaryKey": false,
386
+ "notNull": true,
387
+ "autoincrement": false
388
+ },
389
+ "period": {
390
+ "name": "period",
391
+ "type": "text",
392
+ "primaryKey": false,
393
+ "notNull": true,
394
+ "autoincrement": false,
395
+ "default": "'monthly'"
396
+ },
397
+ "version": {
398
+ "name": "version",
399
+ "type": "integer",
400
+ "primaryKey": false,
401
+ "notNull": true,
402
+ "autoincrement": false,
403
+ "default": 0
404
+ },
405
+ "user_id": {
406
+ "name": "user_id",
407
+ "type": "text",
408
+ "primaryKey": false,
409
+ "notNull": true,
410
+ "autoincrement": false
411
+ }
412
+ },
413
+ "indexes": {
414
+ "budgets_user_category_currency_period": {
415
+ "name": "budgets_user_category_currency_period",
416
+ "columns": [
417
+ "user_id",
418
+ "category_id",
419
+ "currency",
420
+ "period"
421
+ ],
422
+ "isUnique": true
423
+ }
424
+ },
425
+ "foreignKeys": {
426
+ "budgets_category_id_categories_id_fk": {
427
+ "name": "budgets_category_id_categories_id_fk",
428
+ "tableFrom": "budgets",
429
+ "tableTo": "categories",
430
+ "columnsFrom": [
431
+ "category_id"
432
+ ],
433
+ "columnsTo": [
434
+ "id"
435
+ ],
436
+ "onDelete": "no action",
437
+ "onUpdate": "no action"
438
+ },
439
+ "budgets_currency_currencies_code_fk": {
440
+ "name": "budgets_currency_currencies_code_fk",
441
+ "tableFrom": "budgets",
442
+ "tableTo": "currencies",
443
+ "columnsFrom": [
444
+ "currency"
445
+ ],
446
+ "columnsTo": [
447
+ "code"
448
+ ],
449
+ "onDelete": "no action",
450
+ "onUpdate": "no action"
451
+ },
452
+ "budgets_user_id_users_id_fk": {
453
+ "name": "budgets_user_id_users_id_fk",
454
+ "tableFrom": "budgets",
455
+ "tableTo": "users",
456
+ "columnsFrom": [
457
+ "user_id"
458
+ ],
459
+ "columnsTo": [
460
+ "id"
461
+ ],
462
+ "onDelete": "restrict",
463
+ "onUpdate": "no action"
464
+ }
465
+ },
466
+ "compositePrimaryKeys": {},
467
+ "uniqueConstraints": {},
468
+ "checkConstraints": {}
469
+ },
470
+ "categories": {
471
+ "name": "categories",
472
+ "columns": {
473
+ "id": {
474
+ "name": "id",
475
+ "type": "text",
476
+ "primaryKey": true,
477
+ "notNull": true,
478
+ "autoincrement": false
479
+ },
480
+ "name": {
481
+ "name": "name",
482
+ "type": "text",
483
+ "primaryKey": false,
484
+ "notNull": true,
485
+ "autoincrement": false
486
+ },
487
+ "kind": {
488
+ "name": "kind",
489
+ "type": "text",
490
+ "primaryKey": false,
491
+ "notNull": true,
492
+ "autoincrement": false
493
+ },
494
+ "parent_id": {
495
+ "name": "parent_id",
496
+ "type": "text",
497
+ "primaryKey": false,
498
+ "notNull": false,
499
+ "autoincrement": false
500
+ },
501
+ "names": {
502
+ "name": "names",
503
+ "type": "text",
504
+ "primaryKey": false,
505
+ "notNull": false,
506
+ "autoincrement": false
507
+ },
508
+ "version": {
509
+ "name": "version",
510
+ "type": "integer",
511
+ "primaryKey": false,
512
+ "notNull": true,
513
+ "autoincrement": false,
514
+ "default": 0
515
+ },
516
+ "user_id": {
517
+ "name": "user_id",
518
+ "type": "text",
519
+ "primaryKey": false,
520
+ "notNull": false,
521
+ "autoincrement": false
522
+ }
523
+ },
524
+ "indexes": {},
525
+ "foreignKeys": {
526
+ "categories_user_id_users_id_fk": {
527
+ "name": "categories_user_id_users_id_fk",
528
+ "tableFrom": "categories",
529
+ "tableTo": "users",
530
+ "columnsFrom": [
531
+ "user_id"
532
+ ],
533
+ "columnsTo": [
534
+ "id"
535
+ ],
536
+ "onDelete": "restrict",
537
+ "onUpdate": "no action"
538
+ },
539
+ "categories_parent_id_categories_id_fk": {
540
+ "name": "categories_parent_id_categories_id_fk",
541
+ "tableFrom": "categories",
542
+ "tableTo": "categories",
543
+ "columnsFrom": [
544
+ "parent_id"
545
+ ],
546
+ "columnsTo": [
547
+ "id"
548
+ ],
549
+ "onDelete": "no action",
550
+ "onUpdate": "no action"
551
+ }
552
+ },
553
+ "compositePrimaryKeys": {},
554
+ "uniqueConstraints": {},
555
+ "checkConstraints": {}
556
+ },
557
+ "client_grants": {
558
+ "name": "client_grants",
559
+ "columns": {
560
+ "id": {
561
+ "name": "id",
562
+ "type": "text",
563
+ "primaryKey": true,
564
+ "notNull": true,
565
+ "autoincrement": false
566
+ },
567
+ "device_code_hash": {
568
+ "name": "device_code_hash",
569
+ "type": "text",
570
+ "primaryKey": false,
571
+ "notNull": true,
572
+ "autoincrement": false
573
+ },
574
+ "user_code": {
575
+ "name": "user_code",
576
+ "type": "text",
577
+ "primaryKey": false,
578
+ "notNull": true,
579
+ "autoincrement": false
580
+ },
581
+ "client_name": {
582
+ "name": "client_name",
583
+ "type": "text",
584
+ "primaryKey": false,
585
+ "notNull": true,
586
+ "autoincrement": false
587
+ },
588
+ "client_version": {
589
+ "name": "client_version",
590
+ "type": "text",
591
+ "primaryKey": false,
592
+ "notNull": true,
593
+ "autoincrement": false
594
+ },
595
+ "profile": {
596
+ "name": "profile",
597
+ "type": "text",
598
+ "primaryKey": false,
599
+ "notNull": true,
600
+ "autoincrement": false
601
+ },
602
+ "channel": {
603
+ "name": "channel",
604
+ "type": "text",
605
+ "primaryKey": false,
606
+ "notNull": true,
607
+ "autoincrement": false,
608
+ "default": "'stdio'"
609
+ },
610
+ "hint_access": {
611
+ "name": "hint_access",
612
+ "type": "text",
613
+ "primaryKey": false,
614
+ "notNull": false,
615
+ "autoincrement": false
616
+ },
617
+ "hint_duration": {
618
+ "name": "hint_duration",
619
+ "type": "text",
620
+ "primaryKey": false,
621
+ "notNull": false,
622
+ "autoincrement": false
623
+ },
624
+ "status": {
625
+ "name": "status",
626
+ "type": "text",
627
+ "primaryKey": false,
628
+ "notNull": true,
629
+ "autoincrement": false,
630
+ "default": "'pending'"
631
+ },
632
+ "user_id": {
633
+ "name": "user_id",
634
+ "type": "text",
635
+ "primaryKey": false,
636
+ "notNull": false,
637
+ "autoincrement": false
638
+ },
639
+ "scopes": {
640
+ "name": "scopes",
641
+ "type": "text",
642
+ "primaryKey": false,
643
+ "notNull": false,
644
+ "autoincrement": false
645
+ },
646
+ "duration": {
647
+ "name": "duration",
648
+ "type": "text",
649
+ "primaryKey": false,
650
+ "notNull": false,
651
+ "autoincrement": false
652
+ },
653
+ "created_at": {
654
+ "name": "created_at",
655
+ "type": "text",
656
+ "primaryKey": false,
657
+ "notNull": true,
658
+ "autoincrement": false
659
+ },
660
+ "approved_at": {
661
+ "name": "approved_at",
662
+ "type": "text",
663
+ "primaryKey": false,
664
+ "notNull": false,
665
+ "autoincrement": false
666
+ },
667
+ "expires_at": {
668
+ "name": "expires_at",
669
+ "type": "text",
670
+ "primaryKey": false,
671
+ "notNull": true,
672
+ "autoincrement": false
673
+ },
674
+ "version": {
675
+ "name": "version",
676
+ "type": "integer",
677
+ "primaryKey": false,
678
+ "notNull": true,
679
+ "autoincrement": false,
680
+ "default": 0
681
+ }
682
+ },
683
+ "indexes": {
684
+ "client_grants_device_code_hash_unique": {
685
+ "name": "client_grants_device_code_hash_unique",
686
+ "columns": [
687
+ "device_code_hash"
688
+ ],
689
+ "isUnique": true
690
+ },
691
+ "client_grants_pending_user_code": {
692
+ "name": "client_grants_pending_user_code",
693
+ "columns": [
694
+ "user_code"
695
+ ],
696
+ "isUnique": true,
697
+ "where": "\"client_grants\".\"status\" = 'pending'"
698
+ },
699
+ "client_grants_user_code_idx": {
700
+ "name": "client_grants_user_code_idx",
701
+ "columns": [
702
+ "user_code"
703
+ ],
704
+ "isUnique": false
705
+ }
706
+ },
707
+ "foreignKeys": {
708
+ "client_grants_user_id_users_id_fk": {
709
+ "name": "client_grants_user_id_users_id_fk",
710
+ "tableFrom": "client_grants",
711
+ "tableTo": "users",
712
+ "columnsFrom": [
713
+ "user_id"
714
+ ],
715
+ "columnsTo": [
716
+ "id"
717
+ ],
718
+ "onDelete": "cascade",
719
+ "onUpdate": "no action"
720
+ }
721
+ },
722
+ "compositePrimaryKeys": {},
723
+ "uniqueConstraints": {},
724
+ "checkConstraints": {}
725
+ },
726
+ "credit_cards": {
727
+ "name": "credit_cards",
728
+ "columns": {
729
+ "id": {
730
+ "name": "id",
731
+ "type": "text",
732
+ "primaryKey": true,
733
+ "notNull": true,
734
+ "autoincrement": false
735
+ },
736
+ "name": {
737
+ "name": "name",
738
+ "type": "text",
739
+ "primaryKey": false,
740
+ "notNull": true,
741
+ "autoincrement": false
742
+ },
743
+ "closing_day": {
744
+ "name": "closing_day",
745
+ "type": "integer",
746
+ "primaryKey": false,
747
+ "notNull": true,
748
+ "autoincrement": false
749
+ },
750
+ "due_day": {
751
+ "name": "due_day",
752
+ "type": "integer",
753
+ "primaryKey": false,
754
+ "notNull": true,
755
+ "autoincrement": false
756
+ },
757
+ "limit_amount": {
758
+ "name": "limit_amount",
759
+ "type": "real",
760
+ "primaryKey": false,
761
+ "notNull": false,
762
+ "autoincrement": false
763
+ },
764
+ "currency": {
765
+ "name": "currency",
766
+ "type": "text",
767
+ "primaryKey": false,
768
+ "notNull": true,
769
+ "autoincrement": false
770
+ },
771
+ "account_id": {
772
+ "name": "account_id",
773
+ "type": "text",
774
+ "primaryKey": false,
775
+ "notNull": true,
776
+ "autoincrement": false
777
+ },
778
+ "payment_account_id": {
779
+ "name": "payment_account_id",
780
+ "type": "text",
781
+ "primaryKey": false,
782
+ "notNull": false,
783
+ "autoincrement": false
784
+ },
785
+ "version": {
786
+ "name": "version",
787
+ "type": "integer",
788
+ "primaryKey": false,
789
+ "notNull": true,
790
+ "autoincrement": false,
791
+ "default": 0
792
+ },
793
+ "user_id": {
794
+ "name": "user_id",
795
+ "type": "text",
796
+ "primaryKey": false,
797
+ "notNull": true,
798
+ "autoincrement": false
799
+ }
800
+ },
801
+ "indexes": {},
802
+ "foreignKeys": {
803
+ "credit_cards_currency_currencies_code_fk": {
804
+ "name": "credit_cards_currency_currencies_code_fk",
805
+ "tableFrom": "credit_cards",
806
+ "tableTo": "currencies",
807
+ "columnsFrom": [
808
+ "currency"
809
+ ],
810
+ "columnsTo": [
811
+ "code"
812
+ ],
813
+ "onDelete": "no action",
814
+ "onUpdate": "no action"
815
+ },
816
+ "credit_cards_account_id_accounts_id_fk": {
817
+ "name": "credit_cards_account_id_accounts_id_fk",
818
+ "tableFrom": "credit_cards",
819
+ "tableTo": "accounts",
820
+ "columnsFrom": [
821
+ "account_id"
822
+ ],
823
+ "columnsTo": [
824
+ "id"
825
+ ],
826
+ "onDelete": "no action",
827
+ "onUpdate": "no action"
828
+ },
829
+ "credit_cards_payment_account_id_accounts_id_fk": {
830
+ "name": "credit_cards_payment_account_id_accounts_id_fk",
831
+ "tableFrom": "credit_cards",
832
+ "tableTo": "accounts",
833
+ "columnsFrom": [
834
+ "payment_account_id"
835
+ ],
836
+ "columnsTo": [
837
+ "id"
838
+ ],
839
+ "onDelete": "no action",
840
+ "onUpdate": "no action"
841
+ },
842
+ "credit_cards_user_id_users_id_fk": {
843
+ "name": "credit_cards_user_id_users_id_fk",
844
+ "tableFrom": "credit_cards",
845
+ "tableTo": "users",
846
+ "columnsFrom": [
847
+ "user_id"
848
+ ],
849
+ "columnsTo": [
850
+ "id"
851
+ ],
852
+ "onDelete": "restrict",
853
+ "onUpdate": "no action"
854
+ }
855
+ },
856
+ "compositePrimaryKeys": {},
857
+ "uniqueConstraints": {},
858
+ "checkConstraints": {}
859
+ },
860
+ "currencies": {
861
+ "name": "currencies",
862
+ "columns": {
863
+ "code": {
864
+ "name": "code",
865
+ "type": "text",
866
+ "primaryKey": true,
867
+ "notNull": true,
868
+ "autoincrement": false
869
+ },
870
+ "symbol": {
871
+ "name": "symbol",
872
+ "type": "text",
873
+ "primaryKey": false,
874
+ "notNull": true,
875
+ "autoincrement": false
876
+ },
877
+ "name": {
878
+ "name": "name",
879
+ "type": "text",
880
+ "primaryKey": false,
881
+ "notNull": true,
882
+ "autoincrement": false
883
+ },
884
+ "decimals": {
885
+ "name": "decimals",
886
+ "type": "integer",
887
+ "primaryKey": false,
888
+ "notNull": true,
889
+ "autoincrement": false,
890
+ "default": 2
891
+ }
892
+ },
893
+ "indexes": {},
894
+ "foreignKeys": {},
895
+ "compositePrimaryKeys": {},
896
+ "uniqueConstraints": {},
897
+ "checkConstraints": {}
898
+ },
899
+ "currency_rates": {
900
+ "name": "currency_rates",
901
+ "columns": {
902
+ "id": {
903
+ "name": "id",
904
+ "type": "text",
905
+ "primaryKey": true,
906
+ "notNull": true,
907
+ "autoincrement": false
908
+ },
909
+ "from_code": {
910
+ "name": "from_code",
911
+ "type": "text",
912
+ "primaryKey": false,
913
+ "notNull": true,
914
+ "autoincrement": false
915
+ },
916
+ "to_code": {
917
+ "name": "to_code",
918
+ "type": "text",
919
+ "primaryKey": false,
920
+ "notNull": true,
921
+ "autoincrement": false
922
+ },
923
+ "rate": {
924
+ "name": "rate",
925
+ "type": "real",
926
+ "primaryKey": false,
927
+ "notNull": true,
928
+ "autoincrement": false
929
+ },
930
+ "as_of": {
931
+ "name": "as_of",
932
+ "type": "text",
933
+ "primaryKey": false,
934
+ "notNull": true,
935
+ "autoincrement": false
936
+ },
937
+ "source": {
938
+ "name": "source",
939
+ "type": "text",
940
+ "primaryKey": false,
941
+ "notNull": false,
942
+ "autoincrement": false
943
+ },
944
+ "version": {
945
+ "name": "version",
946
+ "type": "integer",
947
+ "primaryKey": false,
948
+ "notNull": true,
949
+ "autoincrement": false,
950
+ "default": 0
951
+ }
952
+ },
953
+ "indexes": {
954
+ "currency_rates_from_to": {
955
+ "name": "currency_rates_from_to",
956
+ "columns": [
957
+ "from_code",
958
+ "to_code"
959
+ ],
960
+ "isUnique": true
961
+ }
962
+ },
963
+ "foreignKeys": {
964
+ "currency_rates_from_code_currencies_code_fk": {
965
+ "name": "currency_rates_from_code_currencies_code_fk",
966
+ "tableFrom": "currency_rates",
967
+ "tableTo": "currencies",
968
+ "columnsFrom": [
969
+ "from_code"
970
+ ],
971
+ "columnsTo": [
972
+ "code"
973
+ ],
974
+ "onDelete": "no action",
975
+ "onUpdate": "no action"
976
+ },
977
+ "currency_rates_to_code_currencies_code_fk": {
978
+ "name": "currency_rates_to_code_currencies_code_fk",
979
+ "tableFrom": "currency_rates",
980
+ "tableTo": "currencies",
981
+ "columnsFrom": [
982
+ "to_code"
983
+ ],
984
+ "columnsTo": [
985
+ "code"
986
+ ],
987
+ "onDelete": "no action",
988
+ "onUpdate": "no action"
989
+ }
990
+ },
991
+ "compositePrimaryKeys": {},
992
+ "uniqueConstraints": {},
993
+ "checkConstraints": {}
994
+ },
995
+ "dashboards": {
996
+ "name": "dashboards",
997
+ "columns": {
998
+ "id": {
999
+ "name": "id",
1000
+ "type": "text",
1001
+ "primaryKey": true,
1002
+ "notNull": true,
1003
+ "autoincrement": false
1004
+ },
1005
+ "name": {
1006
+ "name": "name",
1007
+ "type": "text",
1008
+ "primaryKey": false,
1009
+ "notNull": true,
1010
+ "autoincrement": false
1011
+ },
1012
+ "html": {
1013
+ "name": "html",
1014
+ "type": "text",
1015
+ "primaryKey": false,
1016
+ "notNull": false,
1017
+ "autoincrement": false
1018
+ },
1019
+ "source": {
1020
+ "name": "source",
1021
+ "type": "text",
1022
+ "primaryKey": false,
1023
+ "notNull": true,
1024
+ "autoincrement": false,
1025
+ "default": "'inline'"
1026
+ },
1027
+ "path": {
1028
+ "name": "path",
1029
+ "type": "text",
1030
+ "primaryKey": false,
1031
+ "notNull": false,
1032
+ "autoincrement": false
1033
+ },
1034
+ "updated_at": {
1035
+ "name": "updated_at",
1036
+ "type": "text",
1037
+ "primaryKey": false,
1038
+ "notNull": true,
1039
+ "autoincrement": false
1040
+ },
1041
+ "version": {
1042
+ "name": "version",
1043
+ "type": "integer",
1044
+ "primaryKey": false,
1045
+ "notNull": true,
1046
+ "autoincrement": false,
1047
+ "default": 0
1048
+ },
1049
+ "user_id": {
1050
+ "name": "user_id",
1051
+ "type": "text",
1052
+ "primaryKey": false,
1053
+ "notNull": false,
1054
+ "autoincrement": false
1055
+ }
1056
+ },
1057
+ "indexes": {
1058
+ "dashboards_shared_name": {
1059
+ "name": "dashboards_shared_name",
1060
+ "columns": [
1061
+ "name"
1062
+ ],
1063
+ "isUnique": true,
1064
+ "where": "\"dashboards\".\"user_id\" IS NULL"
1065
+ },
1066
+ "dashboards_user_name": {
1067
+ "name": "dashboards_user_name",
1068
+ "columns": [
1069
+ "user_id",
1070
+ "name"
1071
+ ],
1072
+ "isUnique": true,
1073
+ "where": "\"dashboards\".\"user_id\" IS NOT NULL"
1074
+ }
1075
+ },
1076
+ "foreignKeys": {
1077
+ "dashboards_user_id_users_id_fk": {
1078
+ "name": "dashboards_user_id_users_id_fk",
1079
+ "tableFrom": "dashboards",
1080
+ "tableTo": "users",
1081
+ "columnsFrom": [
1082
+ "user_id"
1083
+ ],
1084
+ "columnsTo": [
1085
+ "id"
1086
+ ],
1087
+ "onDelete": "restrict",
1088
+ "onUpdate": "no action"
1089
+ }
1090
+ },
1091
+ "compositePrimaryKeys": {},
1092
+ "uniqueConstraints": {},
1093
+ "checkConstraints": {
1094
+ "dashboard_source_owner": {
1095
+ "name": "dashboard_source_owner",
1096
+ "value": "(\"dashboards\".\"source\" = 'file' AND \"dashboards\".\"user_id\" IS NULL) OR (\"dashboards\".\"source\" = 'inline' AND \"dashboards\".\"user_id\" IS NOT NULL)"
1097
+ },
1098
+ "dashboard_source_content": {
1099
+ "name": "dashboard_source_content",
1100
+ "value": "(\"dashboards\".\"source\" = 'inline' AND \"dashboards\".\"html\" IS NOT NULL AND \"dashboards\".\"path\" IS NULL) OR (\"dashboards\".\"source\" = 'file' AND \"dashboards\".\"html\" IS NULL AND \"dashboards\".\"path\" IS NOT NULL)"
1101
+ }
1102
+ }
1103
+ },
1104
+ "invites": {
1105
+ "name": "invites",
1106
+ "columns": {
1107
+ "id": {
1108
+ "name": "id",
1109
+ "type": "text",
1110
+ "primaryKey": true,
1111
+ "notNull": true,
1112
+ "autoincrement": false
1113
+ },
1114
+ "user_id": {
1115
+ "name": "user_id",
1116
+ "type": "text",
1117
+ "primaryKey": false,
1118
+ "notNull": true,
1119
+ "autoincrement": false
1120
+ },
1121
+ "code_hash": {
1122
+ "name": "code_hash",
1123
+ "type": "text",
1124
+ "primaryKey": false,
1125
+ "notNull": true,
1126
+ "autoincrement": false
1127
+ },
1128
+ "created_by": {
1129
+ "name": "created_by",
1130
+ "type": "text",
1131
+ "primaryKey": false,
1132
+ "notNull": false,
1133
+ "autoincrement": false
1134
+ },
1135
+ "created_at": {
1136
+ "name": "created_at",
1137
+ "type": "text",
1138
+ "primaryKey": false,
1139
+ "notNull": true,
1140
+ "autoincrement": false
1141
+ },
1142
+ "expires_at": {
1143
+ "name": "expires_at",
1144
+ "type": "text",
1145
+ "primaryKey": false,
1146
+ "notNull": true,
1147
+ "autoincrement": false
1148
+ },
1149
+ "used_at": {
1150
+ "name": "used_at",
1151
+ "type": "text",
1152
+ "primaryKey": false,
1153
+ "notNull": false,
1154
+ "autoincrement": false
1155
+ },
1156
+ "version": {
1157
+ "name": "version",
1158
+ "type": "integer",
1159
+ "primaryKey": false,
1160
+ "notNull": true,
1161
+ "autoincrement": false,
1162
+ "default": 0
1163
+ }
1164
+ },
1165
+ "indexes": {
1166
+ "invites_code_hash_unique": {
1167
+ "name": "invites_code_hash_unique",
1168
+ "columns": [
1169
+ "code_hash"
1170
+ ],
1171
+ "isUnique": true
1172
+ },
1173
+ "invites_one_open_per_user": {
1174
+ "name": "invites_one_open_per_user",
1175
+ "columns": [
1176
+ "user_id"
1177
+ ],
1178
+ "isUnique": true,
1179
+ "where": "\"invites\".\"used_at\" IS NULL"
1180
+ }
1181
+ },
1182
+ "foreignKeys": {
1183
+ "invites_user_id_users_id_fk": {
1184
+ "name": "invites_user_id_users_id_fk",
1185
+ "tableFrom": "invites",
1186
+ "tableTo": "users",
1187
+ "columnsFrom": [
1188
+ "user_id"
1189
+ ],
1190
+ "columnsTo": [
1191
+ "id"
1192
+ ],
1193
+ "onDelete": "restrict",
1194
+ "onUpdate": "no action"
1195
+ },
1196
+ "invites_created_by_users_id_fk": {
1197
+ "name": "invites_created_by_users_id_fk",
1198
+ "tableFrom": "invites",
1199
+ "tableTo": "users",
1200
+ "columnsFrom": [
1201
+ "created_by"
1202
+ ],
1203
+ "columnsTo": [
1204
+ "id"
1205
+ ],
1206
+ "onDelete": "restrict",
1207
+ "onUpdate": "no action"
1208
+ }
1209
+ },
1210
+ "compositePrimaryKeys": {},
1211
+ "uniqueConstraints": {},
1212
+ "checkConstraints": {}
1213
+ },
1214
+ "merchant_category": {
1215
+ "name": "merchant_category",
1216
+ "columns": {
1217
+ "merchant_key": {
1218
+ "name": "merchant_key",
1219
+ "type": "text",
1220
+ "primaryKey": false,
1221
+ "notNull": true,
1222
+ "autoincrement": false
1223
+ },
1224
+ "category_id": {
1225
+ "name": "category_id",
1226
+ "type": "text",
1227
+ "primaryKey": false,
1228
+ "notNull": true,
1229
+ "autoincrement": false
1230
+ },
1231
+ "weight": {
1232
+ "name": "weight",
1233
+ "type": "real",
1234
+ "primaryKey": false,
1235
+ "notNull": true,
1236
+ "autoincrement": false,
1237
+ "default": 1
1238
+ },
1239
+ "origin": {
1240
+ "name": "origin",
1241
+ "type": "text",
1242
+ "primaryKey": false,
1243
+ "notNull": true,
1244
+ "autoincrement": false
1245
+ },
1246
+ "last_seen": {
1247
+ "name": "last_seen",
1248
+ "type": "integer",
1249
+ "primaryKey": false,
1250
+ "notNull": false,
1251
+ "autoincrement": false
1252
+ },
1253
+ "user_id": {
1254
+ "name": "user_id",
1255
+ "type": "text",
1256
+ "primaryKey": false,
1257
+ "notNull": false,
1258
+ "autoincrement": false
1259
+ }
1260
+ },
1261
+ "indexes": {
1262
+ "merchant_category_shared_key": {
1263
+ "name": "merchant_category_shared_key",
1264
+ "columns": [
1265
+ "merchant_key",
1266
+ "category_id"
1267
+ ],
1268
+ "isUnique": true,
1269
+ "where": "\"merchant_category\".\"user_id\" IS NULL"
1270
+ },
1271
+ "merchant_category_user_key": {
1272
+ "name": "merchant_category_user_key",
1273
+ "columns": [
1274
+ "user_id",
1275
+ "merchant_key",
1276
+ "category_id"
1277
+ ],
1278
+ "isUnique": true,
1279
+ "where": "\"merchant_category\".\"user_id\" IS NOT NULL"
1280
+ }
1281
+ },
1282
+ "foreignKeys": {
1283
+ "merchant_category_merchant_key_merchants_key_fk": {
1284
+ "name": "merchant_category_merchant_key_merchants_key_fk",
1285
+ "tableFrom": "merchant_category",
1286
+ "tableTo": "merchants",
1287
+ "columnsFrom": [
1288
+ "merchant_key"
1289
+ ],
1290
+ "columnsTo": [
1291
+ "key"
1292
+ ],
1293
+ "onDelete": "no action",
1294
+ "onUpdate": "no action"
1295
+ },
1296
+ "merchant_category_category_id_categories_id_fk": {
1297
+ "name": "merchant_category_category_id_categories_id_fk",
1298
+ "tableFrom": "merchant_category",
1299
+ "tableTo": "categories",
1300
+ "columnsFrom": [
1301
+ "category_id"
1302
+ ],
1303
+ "columnsTo": [
1304
+ "id"
1305
+ ],
1306
+ "onDelete": "cascade",
1307
+ "onUpdate": "no action"
1308
+ },
1309
+ "merchant_category_user_id_users_id_fk": {
1310
+ "name": "merchant_category_user_id_users_id_fk",
1311
+ "tableFrom": "merchant_category",
1312
+ "tableTo": "users",
1313
+ "columnsFrom": [
1314
+ "user_id"
1315
+ ],
1316
+ "columnsTo": [
1317
+ "id"
1318
+ ],
1319
+ "onDelete": "restrict",
1320
+ "onUpdate": "no action"
1321
+ }
1322
+ },
1323
+ "compositePrimaryKeys": {},
1324
+ "uniqueConstraints": {},
1325
+ "checkConstraints": {
1326
+ "merchant_category_origin_owner": {
1327
+ "name": "merchant_category_origin_owner",
1328
+ "value": "(\"merchant_category\".\"origin\" = 'rule' AND \"merchant_category\".\"user_id\" IS NULL) OR (\"merchant_category\".\"origin\" = 'history' AND \"merchant_category\".\"user_id\" IS NOT NULL)"
1329
+ }
1330
+ }
1331
+ },
1332
+ "merchants": {
1333
+ "name": "merchants",
1334
+ "columns": {
1335
+ "key": {
1336
+ "name": "key",
1337
+ "type": "text",
1338
+ "primaryKey": true,
1339
+ "notNull": true,
1340
+ "autoincrement": false
1341
+ }
1342
+ },
1343
+ "indexes": {},
1344
+ "foreignKeys": {},
1345
+ "compositePrimaryKeys": {},
1346
+ "uniqueConstraints": {},
1347
+ "checkConstraints": {}
1348
+ },
1349
+ "recurring_rules": {
1350
+ "name": "recurring_rules",
1351
+ "columns": {
1352
+ "id": {
1353
+ "name": "id",
1354
+ "type": "text",
1355
+ "primaryKey": true,
1356
+ "notNull": true,
1357
+ "autoincrement": false
1358
+ },
1359
+ "description": {
1360
+ "name": "description",
1361
+ "type": "text",
1362
+ "primaryKey": false,
1363
+ "notNull": true,
1364
+ "autoincrement": false
1365
+ },
1366
+ "amount": {
1367
+ "name": "amount",
1368
+ "type": "real",
1369
+ "primaryKey": false,
1370
+ "notNull": true,
1371
+ "autoincrement": false
1372
+ },
1373
+ "type": {
1374
+ "name": "type",
1375
+ "type": "text",
1376
+ "primaryKey": false,
1377
+ "notNull": true,
1378
+ "autoincrement": false
1379
+ },
1380
+ "period": {
1381
+ "name": "period",
1382
+ "type": "text",
1383
+ "primaryKey": false,
1384
+ "notNull": true,
1385
+ "autoincrement": false
1386
+ },
1387
+ "next_due": {
1388
+ "name": "next_due",
1389
+ "type": "text",
1390
+ "primaryKey": false,
1391
+ "notNull": true,
1392
+ "autoincrement": false
1393
+ },
1394
+ "currency": {
1395
+ "name": "currency",
1396
+ "type": "text",
1397
+ "primaryKey": false,
1398
+ "notNull": true,
1399
+ "autoincrement": false
1400
+ },
1401
+ "account_id": {
1402
+ "name": "account_id",
1403
+ "type": "text",
1404
+ "primaryKey": false,
1405
+ "notNull": false,
1406
+ "autoincrement": false
1407
+ },
1408
+ "category_id": {
1409
+ "name": "category_id",
1410
+ "type": "text",
1411
+ "primaryKey": false,
1412
+ "notNull": false,
1413
+ "autoincrement": false
1414
+ },
1415
+ "merchant_key": {
1416
+ "name": "merchant_key",
1417
+ "type": "text",
1418
+ "primaryKey": false,
1419
+ "notNull": false,
1420
+ "autoincrement": false
1421
+ },
1422
+ "version": {
1423
+ "name": "version",
1424
+ "type": "integer",
1425
+ "primaryKey": false,
1426
+ "notNull": true,
1427
+ "autoincrement": false,
1428
+ "default": 0
1429
+ },
1430
+ "user_id": {
1431
+ "name": "user_id",
1432
+ "type": "text",
1433
+ "primaryKey": false,
1434
+ "notNull": true,
1435
+ "autoincrement": false
1436
+ }
1437
+ },
1438
+ "indexes": {},
1439
+ "foreignKeys": {
1440
+ "recurring_rules_currency_currencies_code_fk": {
1441
+ "name": "recurring_rules_currency_currencies_code_fk",
1442
+ "tableFrom": "recurring_rules",
1443
+ "tableTo": "currencies",
1444
+ "columnsFrom": [
1445
+ "currency"
1446
+ ],
1447
+ "columnsTo": [
1448
+ "code"
1449
+ ],
1450
+ "onDelete": "no action",
1451
+ "onUpdate": "no action"
1452
+ },
1453
+ "recurring_rules_account_id_accounts_id_fk": {
1454
+ "name": "recurring_rules_account_id_accounts_id_fk",
1455
+ "tableFrom": "recurring_rules",
1456
+ "tableTo": "accounts",
1457
+ "columnsFrom": [
1458
+ "account_id"
1459
+ ],
1460
+ "columnsTo": [
1461
+ "id"
1462
+ ],
1463
+ "onDelete": "no action",
1464
+ "onUpdate": "no action"
1465
+ },
1466
+ "recurring_rules_category_id_categories_id_fk": {
1467
+ "name": "recurring_rules_category_id_categories_id_fk",
1468
+ "tableFrom": "recurring_rules",
1469
+ "tableTo": "categories",
1470
+ "columnsFrom": [
1471
+ "category_id"
1472
+ ],
1473
+ "columnsTo": [
1474
+ "id"
1475
+ ],
1476
+ "onDelete": "no action",
1477
+ "onUpdate": "no action"
1478
+ },
1479
+ "recurring_rules_merchant_key_merchants_key_fk": {
1480
+ "name": "recurring_rules_merchant_key_merchants_key_fk",
1481
+ "tableFrom": "recurring_rules",
1482
+ "tableTo": "merchants",
1483
+ "columnsFrom": [
1484
+ "merchant_key"
1485
+ ],
1486
+ "columnsTo": [
1487
+ "key"
1488
+ ],
1489
+ "onDelete": "no action",
1490
+ "onUpdate": "no action"
1491
+ },
1492
+ "recurring_rules_user_id_users_id_fk": {
1493
+ "name": "recurring_rules_user_id_users_id_fk",
1494
+ "tableFrom": "recurring_rules",
1495
+ "tableTo": "users",
1496
+ "columnsFrom": [
1497
+ "user_id"
1498
+ ],
1499
+ "columnsTo": [
1500
+ "id"
1501
+ ],
1502
+ "onDelete": "restrict",
1503
+ "onUpdate": "no action"
1504
+ }
1505
+ },
1506
+ "compositePrimaryKeys": {},
1507
+ "uniqueConstraints": {},
1508
+ "checkConstraints": {}
1509
+ },
1510
+ "sessions": {
1511
+ "name": "sessions",
1512
+ "columns": {
1513
+ "id": {
1514
+ "name": "id",
1515
+ "type": "text",
1516
+ "primaryKey": true,
1517
+ "notNull": true,
1518
+ "autoincrement": false
1519
+ },
1520
+ "user_id": {
1521
+ "name": "user_id",
1522
+ "type": "text",
1523
+ "primaryKey": false,
1524
+ "notNull": true,
1525
+ "autoincrement": false
1526
+ },
1527
+ "token_hash": {
1528
+ "name": "token_hash",
1529
+ "type": "text",
1530
+ "primaryKey": false,
1531
+ "notNull": true,
1532
+ "autoincrement": false
1533
+ },
1534
+ "created_at": {
1535
+ "name": "created_at",
1536
+ "type": "text",
1537
+ "primaryKey": false,
1538
+ "notNull": true,
1539
+ "autoincrement": false
1540
+ },
1541
+ "last_seen_at": {
1542
+ "name": "last_seen_at",
1543
+ "type": "text",
1544
+ "primaryKey": false,
1545
+ "notNull": true,
1546
+ "autoincrement": false
1547
+ },
1548
+ "expires_at": {
1549
+ "name": "expires_at",
1550
+ "type": "text",
1551
+ "primaryKey": false,
1552
+ "notNull": true,
1553
+ "autoincrement": false
1554
+ },
1555
+ "version": {
1556
+ "name": "version",
1557
+ "type": "integer",
1558
+ "primaryKey": false,
1559
+ "notNull": true,
1560
+ "autoincrement": false,
1561
+ "default": 0
1562
+ }
1563
+ },
1564
+ "indexes": {
1565
+ "sessions_token_hash_unique": {
1566
+ "name": "sessions_token_hash_unique",
1567
+ "columns": [
1568
+ "token_hash"
1569
+ ],
1570
+ "isUnique": true
1571
+ }
1572
+ },
1573
+ "foreignKeys": {
1574
+ "sessions_user_id_users_id_fk": {
1575
+ "name": "sessions_user_id_users_id_fk",
1576
+ "tableFrom": "sessions",
1577
+ "tableTo": "users",
1578
+ "columnsFrom": [
1579
+ "user_id"
1580
+ ],
1581
+ "columnsTo": [
1582
+ "id"
1583
+ ],
1584
+ "onDelete": "cascade",
1585
+ "onUpdate": "no action"
1586
+ }
1587
+ },
1588
+ "compositePrimaryKeys": {},
1589
+ "uniqueConstraints": {},
1590
+ "checkConstraints": {}
1591
+ },
1592
+ "settings": {
1593
+ "name": "settings",
1594
+ "columns": {
1595
+ "id": {
1596
+ "name": "id",
1597
+ "type": "text",
1598
+ "primaryKey": true,
1599
+ "notNull": true,
1600
+ "autoincrement": false,
1601
+ "default": "'singleton'"
1602
+ },
1603
+ "max_sign_in_duration": {
1604
+ "name": "max_sign_in_duration",
1605
+ "type": "text",
1606
+ "primaryKey": false,
1607
+ "notNull": true,
1608
+ "autoincrement": false,
1609
+ "default": "'30d'"
1610
+ },
1611
+ "version": {
1612
+ "name": "version",
1613
+ "type": "integer",
1614
+ "primaryKey": false,
1615
+ "notNull": true,
1616
+ "autoincrement": false,
1617
+ "default": 0
1618
+ }
1619
+ },
1620
+ "indexes": {},
1621
+ "foreignKeys": {},
1622
+ "compositePrimaryKeys": {},
1623
+ "uniqueConstraints": {},
1624
+ "checkConstraints": {}
1625
+ },
1626
+ "setup_codes": {
1627
+ "name": "setup_codes",
1628
+ "columns": {
1629
+ "id": {
1630
+ "name": "id",
1631
+ "type": "text",
1632
+ "primaryKey": true,
1633
+ "notNull": true,
1634
+ "autoincrement": false
1635
+ },
1636
+ "code_hash": {
1637
+ "name": "code_hash",
1638
+ "type": "text",
1639
+ "primaryKey": false,
1640
+ "notNull": true,
1641
+ "autoincrement": false
1642
+ },
1643
+ "created_at": {
1644
+ "name": "created_at",
1645
+ "type": "text",
1646
+ "primaryKey": false,
1647
+ "notNull": true,
1648
+ "autoincrement": false
1649
+ },
1650
+ "expires_at": {
1651
+ "name": "expires_at",
1652
+ "type": "text",
1653
+ "primaryKey": false,
1654
+ "notNull": true,
1655
+ "autoincrement": false
1656
+ },
1657
+ "used_at": {
1658
+ "name": "used_at",
1659
+ "type": "text",
1660
+ "primaryKey": false,
1661
+ "notNull": false,
1662
+ "autoincrement": false
1663
+ },
1664
+ "version": {
1665
+ "name": "version",
1666
+ "type": "integer",
1667
+ "primaryKey": false,
1668
+ "notNull": true,
1669
+ "autoincrement": false,
1670
+ "default": 0
1671
+ }
1672
+ },
1673
+ "indexes": {
1674
+ "setup_codes_code_hash_unique": {
1675
+ "name": "setup_codes_code_hash_unique",
1676
+ "columns": [
1677
+ "code_hash"
1678
+ ],
1679
+ "isUnique": true
1680
+ }
1681
+ },
1682
+ "foreignKeys": {},
1683
+ "compositePrimaryKeys": {},
1684
+ "uniqueConstraints": {},
1685
+ "checkConstraints": {}
1686
+ },
1687
+ "tags": {
1688
+ "name": "tags",
1689
+ "columns": {
1690
+ "id": {
1691
+ "name": "id",
1692
+ "type": "text",
1693
+ "primaryKey": true,
1694
+ "notNull": true,
1695
+ "autoincrement": false
1696
+ },
1697
+ "name": {
1698
+ "name": "name",
1699
+ "type": "text",
1700
+ "primaryKey": false,
1701
+ "notNull": true,
1702
+ "autoincrement": false
1703
+ },
1704
+ "version": {
1705
+ "name": "version",
1706
+ "type": "integer",
1707
+ "primaryKey": false,
1708
+ "notNull": true,
1709
+ "autoincrement": false,
1710
+ "default": 0
1711
+ },
1712
+ "user_id": {
1713
+ "name": "user_id",
1714
+ "type": "text",
1715
+ "primaryKey": false,
1716
+ "notNull": true,
1717
+ "autoincrement": false
1718
+ }
1719
+ },
1720
+ "indexes": {
1721
+ "tags_user_name": {
1722
+ "name": "tags_user_name",
1723
+ "columns": [
1724
+ "user_id",
1725
+ "name"
1726
+ ],
1727
+ "isUnique": true
1728
+ }
1729
+ },
1730
+ "foreignKeys": {
1731
+ "tags_user_id_users_id_fk": {
1732
+ "name": "tags_user_id_users_id_fk",
1733
+ "tableFrom": "tags",
1734
+ "tableTo": "users",
1735
+ "columnsFrom": [
1736
+ "user_id"
1737
+ ],
1738
+ "columnsTo": [
1739
+ "id"
1740
+ ],
1741
+ "onDelete": "restrict",
1742
+ "onUpdate": "no action"
1743
+ }
1744
+ },
1745
+ "compositePrimaryKeys": {},
1746
+ "uniqueConstraints": {},
1747
+ "checkConstraints": {}
1748
+ },
1749
+ "transaction_tags": {
1750
+ "name": "transaction_tags",
1751
+ "columns": {
1752
+ "transaction_id": {
1753
+ "name": "transaction_id",
1754
+ "type": "text",
1755
+ "primaryKey": false,
1756
+ "notNull": true,
1757
+ "autoincrement": false
1758
+ },
1759
+ "tag_id": {
1760
+ "name": "tag_id",
1761
+ "type": "text",
1762
+ "primaryKey": false,
1763
+ "notNull": true,
1764
+ "autoincrement": false
1765
+ }
1766
+ },
1767
+ "indexes": {},
1768
+ "foreignKeys": {
1769
+ "transaction_tags_transaction_id_transactions_id_fk": {
1770
+ "name": "transaction_tags_transaction_id_transactions_id_fk",
1771
+ "tableFrom": "transaction_tags",
1772
+ "tableTo": "transactions",
1773
+ "columnsFrom": [
1774
+ "transaction_id"
1775
+ ],
1776
+ "columnsTo": [
1777
+ "id"
1778
+ ],
1779
+ "onDelete": "cascade",
1780
+ "onUpdate": "no action"
1781
+ },
1782
+ "transaction_tags_tag_id_tags_id_fk": {
1783
+ "name": "transaction_tags_tag_id_tags_id_fk",
1784
+ "tableFrom": "transaction_tags",
1785
+ "tableTo": "tags",
1786
+ "columnsFrom": [
1787
+ "tag_id"
1788
+ ],
1789
+ "columnsTo": [
1790
+ "id"
1791
+ ],
1792
+ "onDelete": "cascade",
1793
+ "onUpdate": "no action"
1794
+ }
1795
+ },
1796
+ "compositePrimaryKeys": {
1797
+ "transaction_tags_transaction_id_tag_id_pk": {
1798
+ "columns": [
1799
+ "transaction_id",
1800
+ "tag_id"
1801
+ ],
1802
+ "name": "transaction_tags_transaction_id_tag_id_pk"
1803
+ }
1804
+ },
1805
+ "uniqueConstraints": {},
1806
+ "checkConstraints": {}
1807
+ },
1808
+ "transactions": {
1809
+ "name": "transactions",
1810
+ "columns": {
1811
+ "id": {
1812
+ "name": "id",
1813
+ "type": "text",
1814
+ "primaryKey": true,
1815
+ "notNull": true,
1816
+ "autoincrement": false
1817
+ },
1818
+ "description": {
1819
+ "name": "description",
1820
+ "type": "text",
1821
+ "primaryKey": false,
1822
+ "notNull": true,
1823
+ "autoincrement": false
1824
+ },
1825
+ "amount": {
1826
+ "name": "amount",
1827
+ "type": "real",
1828
+ "primaryKey": false,
1829
+ "notNull": true,
1830
+ "autoincrement": false
1831
+ },
1832
+ "type": {
1833
+ "name": "type",
1834
+ "type": "text",
1835
+ "primaryKey": false,
1836
+ "notNull": true,
1837
+ "autoincrement": false
1838
+ },
1839
+ "status": {
1840
+ "name": "status",
1841
+ "type": "text",
1842
+ "primaryKey": false,
1843
+ "notNull": true,
1844
+ "autoincrement": false,
1845
+ "default": "'effective'"
1846
+ },
1847
+ "date": {
1848
+ "name": "date",
1849
+ "type": "text",
1850
+ "primaryKey": false,
1851
+ "notNull": true,
1852
+ "autoincrement": false
1853
+ },
1854
+ "currency": {
1855
+ "name": "currency",
1856
+ "type": "text",
1857
+ "primaryKey": false,
1858
+ "notNull": true,
1859
+ "autoincrement": false
1860
+ },
1861
+ "source": {
1862
+ "name": "source",
1863
+ "type": "text",
1864
+ "primaryKey": false,
1865
+ "notNull": true,
1866
+ "autoincrement": false
1867
+ },
1868
+ "idempotency_key": {
1869
+ "name": "idempotency_key",
1870
+ "type": "text",
1871
+ "primaryKey": false,
1872
+ "notNull": true,
1873
+ "autoincrement": false
1874
+ },
1875
+ "classification_method": {
1876
+ "name": "classification_method",
1877
+ "type": "text",
1878
+ "primaryKey": false,
1879
+ "notNull": true,
1880
+ "autoincrement": false
1881
+ },
1882
+ "confidence": {
1883
+ "name": "confidence",
1884
+ "type": "real",
1885
+ "primaryKey": false,
1886
+ "notNull": true,
1887
+ "autoincrement": false
1888
+ },
1889
+ "raw_input": {
1890
+ "name": "raw_input",
1891
+ "type": "text",
1892
+ "primaryKey": false,
1893
+ "notNull": false,
1894
+ "autoincrement": false
1895
+ },
1896
+ "from_account_id": {
1897
+ "name": "from_account_id",
1898
+ "type": "text",
1899
+ "primaryKey": false,
1900
+ "notNull": false,
1901
+ "autoincrement": false
1902
+ },
1903
+ "to_account_id": {
1904
+ "name": "to_account_id",
1905
+ "type": "text",
1906
+ "primaryKey": false,
1907
+ "notNull": false,
1908
+ "autoincrement": false
1909
+ },
1910
+ "credit_card_id": {
1911
+ "name": "credit_card_id",
1912
+ "type": "text",
1913
+ "primaryKey": false,
1914
+ "notNull": false,
1915
+ "autoincrement": false
1916
+ },
1917
+ "category_id": {
1918
+ "name": "category_id",
1919
+ "type": "text",
1920
+ "primaryKey": false,
1921
+ "notNull": false,
1922
+ "autoincrement": false
1923
+ },
1924
+ "subcategory_id": {
1925
+ "name": "subcategory_id",
1926
+ "type": "text",
1927
+ "primaryKey": false,
1928
+ "notNull": false,
1929
+ "autoincrement": false
1930
+ },
1931
+ "merchant_key": {
1932
+ "name": "merchant_key",
1933
+ "type": "text",
1934
+ "primaryKey": false,
1935
+ "notNull": false,
1936
+ "autoincrement": false
1937
+ },
1938
+ "note": {
1939
+ "name": "note",
1940
+ "type": "text",
1941
+ "primaryKey": false,
1942
+ "notNull": false,
1943
+ "autoincrement": false
1944
+ },
1945
+ "bill_id": {
1946
+ "name": "bill_id",
1947
+ "type": "text",
1948
+ "primaryKey": false,
1949
+ "notNull": false,
1950
+ "autoincrement": false
1951
+ },
1952
+ "version": {
1953
+ "name": "version",
1954
+ "type": "integer",
1955
+ "primaryKey": false,
1956
+ "notNull": true,
1957
+ "autoincrement": false,
1958
+ "default": 0
1959
+ },
1960
+ "user_id": {
1961
+ "name": "user_id",
1962
+ "type": "text",
1963
+ "primaryKey": false,
1964
+ "notNull": true,
1965
+ "autoincrement": false
1966
+ }
1967
+ },
1968
+ "indexes": {
1969
+ "transactions_user_idempotency_key": {
1970
+ "name": "transactions_user_idempotency_key",
1971
+ "columns": [
1972
+ "user_id",
1973
+ "idempotency_key"
1974
+ ],
1975
+ "isUnique": true
1976
+ },
1977
+ "idx_transactions_user_date": {
1978
+ "name": "idx_transactions_user_date",
1979
+ "columns": [
1980
+ "user_id",
1981
+ "date"
1982
+ ],
1983
+ "isUnique": false
1984
+ },
1985
+ "idx_transactions_date": {
1986
+ "name": "idx_transactions_date",
1987
+ "columns": [
1988
+ "date"
1989
+ ],
1990
+ "isUnique": false
1991
+ },
1992
+ "idx_transactions_from_account": {
1993
+ "name": "idx_transactions_from_account",
1994
+ "columns": [
1995
+ "from_account_id"
1996
+ ],
1997
+ "isUnique": false
1998
+ },
1999
+ "idx_transactions_to_account": {
2000
+ "name": "idx_transactions_to_account",
2001
+ "columns": [
2002
+ "to_account_id"
2003
+ ],
2004
+ "isUnique": false
2005
+ },
2006
+ "idx_transactions_category": {
2007
+ "name": "idx_transactions_category",
2008
+ "columns": [
2009
+ "category_id"
2010
+ ],
2011
+ "isUnique": false
2012
+ },
2013
+ "idx_transactions_status_date": {
2014
+ "name": "idx_transactions_status_date",
2015
+ "columns": [
2016
+ "status",
2017
+ "date"
2018
+ ],
2019
+ "isUnique": false
2020
+ }
2021
+ },
2022
+ "foreignKeys": {
2023
+ "transactions_currency_currencies_code_fk": {
2024
+ "name": "transactions_currency_currencies_code_fk",
2025
+ "tableFrom": "transactions",
2026
+ "tableTo": "currencies",
2027
+ "columnsFrom": [
2028
+ "currency"
2029
+ ],
2030
+ "columnsTo": [
2031
+ "code"
2032
+ ],
2033
+ "onDelete": "no action",
2034
+ "onUpdate": "no action"
2035
+ },
2036
+ "transactions_from_account_id_accounts_id_fk": {
2037
+ "name": "transactions_from_account_id_accounts_id_fk",
2038
+ "tableFrom": "transactions",
2039
+ "tableTo": "accounts",
2040
+ "columnsFrom": [
2041
+ "from_account_id"
2042
+ ],
2043
+ "columnsTo": [
2044
+ "id"
2045
+ ],
2046
+ "onDelete": "no action",
2047
+ "onUpdate": "no action"
2048
+ },
2049
+ "transactions_to_account_id_accounts_id_fk": {
2050
+ "name": "transactions_to_account_id_accounts_id_fk",
2051
+ "tableFrom": "transactions",
2052
+ "tableTo": "accounts",
2053
+ "columnsFrom": [
2054
+ "to_account_id"
2055
+ ],
2056
+ "columnsTo": [
2057
+ "id"
2058
+ ],
2059
+ "onDelete": "no action",
2060
+ "onUpdate": "no action"
2061
+ },
2062
+ "transactions_credit_card_id_credit_cards_id_fk": {
2063
+ "name": "transactions_credit_card_id_credit_cards_id_fk",
2064
+ "tableFrom": "transactions",
2065
+ "tableTo": "credit_cards",
2066
+ "columnsFrom": [
2067
+ "credit_card_id"
2068
+ ],
2069
+ "columnsTo": [
2070
+ "id"
2071
+ ],
2072
+ "onDelete": "no action",
2073
+ "onUpdate": "no action"
2074
+ },
2075
+ "transactions_category_id_categories_id_fk": {
2076
+ "name": "transactions_category_id_categories_id_fk",
2077
+ "tableFrom": "transactions",
2078
+ "tableTo": "categories",
2079
+ "columnsFrom": [
2080
+ "category_id"
2081
+ ],
2082
+ "columnsTo": [
2083
+ "id"
2084
+ ],
2085
+ "onDelete": "no action",
2086
+ "onUpdate": "no action"
2087
+ },
2088
+ "transactions_subcategory_id_categories_id_fk": {
2089
+ "name": "transactions_subcategory_id_categories_id_fk",
2090
+ "tableFrom": "transactions",
2091
+ "tableTo": "categories",
2092
+ "columnsFrom": [
2093
+ "subcategory_id"
2094
+ ],
2095
+ "columnsTo": [
2096
+ "id"
2097
+ ],
2098
+ "onDelete": "no action",
2099
+ "onUpdate": "no action"
2100
+ },
2101
+ "transactions_merchant_key_merchants_key_fk": {
2102
+ "name": "transactions_merchant_key_merchants_key_fk",
2103
+ "tableFrom": "transactions",
2104
+ "tableTo": "merchants",
2105
+ "columnsFrom": [
2106
+ "merchant_key"
2107
+ ],
2108
+ "columnsTo": [
2109
+ "key"
2110
+ ],
2111
+ "onDelete": "no action",
2112
+ "onUpdate": "no action"
2113
+ },
2114
+ "transactions_bill_id_bills_id_fk": {
2115
+ "name": "transactions_bill_id_bills_id_fk",
2116
+ "tableFrom": "transactions",
2117
+ "tableTo": "bills",
2118
+ "columnsFrom": [
2119
+ "bill_id"
2120
+ ],
2121
+ "columnsTo": [
2122
+ "id"
2123
+ ],
2124
+ "onDelete": "no action",
2125
+ "onUpdate": "no action"
2126
+ },
2127
+ "transactions_user_id_users_id_fk": {
2128
+ "name": "transactions_user_id_users_id_fk",
2129
+ "tableFrom": "transactions",
2130
+ "tableTo": "users",
2131
+ "columnsFrom": [
2132
+ "user_id"
2133
+ ],
2134
+ "columnsTo": [
2135
+ "id"
2136
+ ],
2137
+ "onDelete": "restrict",
2138
+ "onUpdate": "no action"
2139
+ }
2140
+ },
2141
+ "compositePrimaryKeys": {},
2142
+ "uniqueConstraints": {},
2143
+ "checkConstraints": {
2144
+ "subcategory_requires_category": {
2145
+ "name": "subcategory_requires_category",
2146
+ "value": "\"transactions\".\"subcategory_id\" IS NULL OR \"transactions\".\"category_id\" IS NOT NULL"
2147
+ }
2148
+ }
2149
+ },
2150
+ "user_settings": {
2151
+ "name": "user_settings",
2152
+ "columns": {
2153
+ "user_id": {
2154
+ "name": "user_id",
2155
+ "type": "text",
2156
+ "primaryKey": true,
2157
+ "notNull": true,
2158
+ "autoincrement": false
2159
+ },
2160
+ "locale": {
2161
+ "name": "locale",
2162
+ "type": "text",
2163
+ "primaryKey": false,
2164
+ "notNull": true,
2165
+ "autoincrement": false,
2166
+ "default": "'en'"
2167
+ },
2168
+ "locale_source": {
2169
+ "name": "locale_source",
2170
+ "type": "text",
2171
+ "primaryKey": false,
2172
+ "notNull": true,
2173
+ "autoincrement": false,
2174
+ "default": "'default'"
2175
+ },
2176
+ "base_currency": {
2177
+ "name": "base_currency",
2178
+ "type": "text",
2179
+ "primaryKey": false,
2180
+ "notNull": false,
2181
+ "autoincrement": false
2182
+ },
2183
+ "version": {
2184
+ "name": "version",
2185
+ "type": "integer",
2186
+ "primaryKey": false,
2187
+ "notNull": true,
2188
+ "autoincrement": false,
2189
+ "default": 0
2190
+ }
2191
+ },
2192
+ "indexes": {},
2193
+ "foreignKeys": {
2194
+ "user_settings_user_id_users_id_fk": {
2195
+ "name": "user_settings_user_id_users_id_fk",
2196
+ "tableFrom": "user_settings",
2197
+ "tableTo": "users",
2198
+ "columnsFrom": [
2199
+ "user_id"
2200
+ ],
2201
+ "columnsTo": [
2202
+ "id"
2203
+ ],
2204
+ "onDelete": "cascade",
2205
+ "onUpdate": "no action"
2206
+ },
2207
+ "user_settings_base_currency_currencies_code_fk": {
2208
+ "name": "user_settings_base_currency_currencies_code_fk",
2209
+ "tableFrom": "user_settings",
2210
+ "tableTo": "currencies",
2211
+ "columnsFrom": [
2212
+ "base_currency"
2213
+ ],
2214
+ "columnsTo": [
2215
+ "code"
2216
+ ],
2217
+ "onDelete": "no action",
2218
+ "onUpdate": "no action"
2219
+ }
2220
+ },
2221
+ "compositePrimaryKeys": {},
2222
+ "uniqueConstraints": {},
2223
+ "checkConstraints": {}
2224
+ },
2225
+ "users": {
2226
+ "name": "users",
2227
+ "columns": {
2228
+ "id": {
2229
+ "name": "id",
2230
+ "type": "text",
2231
+ "primaryKey": true,
2232
+ "notNull": true,
2233
+ "autoincrement": false
2234
+ },
2235
+ "username": {
2236
+ "name": "username",
2237
+ "type": "text",
2238
+ "primaryKey": false,
2239
+ "notNull": false,
2240
+ "autoincrement": false
2241
+ },
2242
+ "password_hash": {
2243
+ "name": "password_hash",
2244
+ "type": "text",
2245
+ "primaryKey": false,
2246
+ "notNull": false,
2247
+ "autoincrement": false
2248
+ },
2249
+ "role": {
2250
+ "name": "role",
2251
+ "type": "text",
2252
+ "primaryKey": false,
2253
+ "notNull": true,
2254
+ "autoincrement": false
2255
+ },
2256
+ "created_at": {
2257
+ "name": "created_at",
2258
+ "type": "text",
2259
+ "primaryKey": false,
2260
+ "notNull": true,
2261
+ "autoincrement": false
2262
+ },
2263
+ "disabled_at": {
2264
+ "name": "disabled_at",
2265
+ "type": "text",
2266
+ "primaryKey": false,
2267
+ "notNull": false,
2268
+ "autoincrement": false
2269
+ },
2270
+ "last_login_at": {
2271
+ "name": "last_login_at",
2272
+ "type": "text",
2273
+ "primaryKey": false,
2274
+ "notNull": false,
2275
+ "autoincrement": false
2276
+ },
2277
+ "version": {
2278
+ "name": "version",
2279
+ "type": "integer",
2280
+ "primaryKey": false,
2281
+ "notNull": true,
2282
+ "autoincrement": false,
2283
+ "default": 0
2284
+ }
2285
+ },
2286
+ "indexes": {
2287
+ "users_username_unique": {
2288
+ "name": "users_username_unique",
2289
+ "columns": [
2290
+ "username"
2291
+ ],
2292
+ "isUnique": true
2293
+ }
2294
+ },
2295
+ "foreignKeys": {},
2296
+ "compositePrimaryKeys": {},
2297
+ "uniqueConstraints": {},
2298
+ "checkConstraints": {}
2299
+ }
2300
+ },
2301
+ "views": {},
2302
+ "enums": {},
2303
+ "_meta": {
2304
+ "schemas": {},
2305
+ "tables": {},
2306
+ "columns": {}
2307
+ },
2308
+ "internal": {
2309
+ "indexes": {}
2310
+ }
2311
+ }