@bevel-software/platform-core-backend 0.7.5 → 0.9.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 (282) hide show
  1. package/LICENSE +202 -202
  2. package/THIRD-PARTY-NOTICES.md +428 -454
  3. package/dist/core/core-ports.d.ts +8 -1
  4. package/dist/core/core-ports.d.ts.map +1 -1
  5. package/dist/core/core-ports.js.map +1 -1
  6. package/dist/core/create-core-server.d.ts.map +1 -1
  7. package/dist/core/create-core-server.js +75 -18
  8. package/dist/core/create-core-server.js.map +1 -1
  9. package/dist/core/create-core-services.d.ts +12 -5
  10. package/dist/core/create-core-services.d.ts.map +1 -1
  11. package/dist/core/create-core-services.js +69 -36
  12. package/dist/core/create-core-services.js.map +1 -1
  13. package/dist/modules/access/access-control.interface.d.ts +8 -7
  14. package/dist/modules/access/access-control.interface.d.ts.map +1 -1
  15. package/dist/modules/access/access-control.service.d.ts +1 -1
  16. package/dist/modules/access/access-control.service.d.ts.map +1 -1
  17. package/dist/modules/access/access-control.service.js +6 -6
  18. package/dist/modules/access/access-control.service.js.map +1 -1
  19. package/dist/modules/access/access-declarations.d.ts +5 -5
  20. package/dist/modules/access/access-declarations.js +3 -3
  21. package/dist/modules/access/access-mutation.service.d.ts +3 -3
  22. package/dist/modules/access/access-mutation.service.d.ts.map +1 -1
  23. package/dist/modules/access/access-mutation.service.js +3 -3
  24. package/dist/modules/access/access-mutation.service.js.map +1 -1
  25. package/dist/modules/access/access-splice.js +4 -4
  26. package/dist/modules/access/access-splice.js.map +1 -1
  27. package/dist/modules/access/access.routes.d.ts +3 -1
  28. package/dist/modules/access/access.routes.d.ts.map +1 -1
  29. package/dist/modules/access/access.routes.js +22 -20
  30. package/dist/modules/access/access.routes.js.map +1 -1
  31. package/dist/modules/access/creator-access.d.ts +2 -2
  32. package/dist/modules/access/creator-access.js +5 -5
  33. package/dist/modules/access/creator-access.js.map +1 -1
  34. package/dist/modules/access/render-roles-yaml.d.ts +22 -0
  35. package/dist/modules/access/render-roles-yaml.d.ts.map +1 -0
  36. package/dist/modules/access/render-roles-yaml.js +56 -0
  37. package/dist/modules/access/render-roles-yaml.js.map +1 -0
  38. package/dist/modules/access/roles-admin.service.d.ts +33 -5
  39. package/dist/modules/access/roles-admin.service.d.ts.map +1 -1
  40. package/dist/modules/access/roles-admin.service.js +44 -19
  41. package/dist/modules/access/roles-admin.service.js.map +1 -1
  42. package/dist/modules/code-mode/code-mode-names.d.ts +5 -13
  43. package/dist/modules/code-mode/code-mode-names.d.ts.map +1 -1
  44. package/dist/modules/code-mode/code-mode-names.js +5 -27
  45. package/dist/modules/code-mode/code-mode-names.js.map +1 -1
  46. package/dist/modules/code-mode/code-mode.tool.d.ts.map +1 -1
  47. package/dist/modules/code-mode/code-mode.tool.js +29 -7
  48. package/dist/modules/code-mode/code-mode.tool.js.map +1 -1
  49. package/dist/modules/mcp/mcp.service.d.ts +11 -52
  50. package/dist/modules/mcp/mcp.service.d.ts.map +1 -1
  51. package/dist/modules/mcp/mcp.service.js +33 -395
  52. package/dist/modules/mcp/mcp.service.js.map +1 -1
  53. package/dist/modules/plugins/index.d.ts +7 -0
  54. package/dist/modules/plugins/index.d.ts.map +1 -0
  55. package/dist/modules/plugins/index.js +6 -0
  56. package/dist/modules/plugins/index.js.map +1 -0
  57. package/dist/modules/plugins/join-proposals.d.ts +53 -0
  58. package/dist/modules/plugins/join-proposals.d.ts.map +1 -0
  59. package/dist/modules/plugins/join-proposals.js +67 -0
  60. package/dist/modules/plugins/join-proposals.js.map +1 -0
  61. package/dist/modules/plugins/join-requests.service.d.ts +81 -0
  62. package/dist/modules/plugins/join-requests.service.d.ts.map +1 -0
  63. package/dist/modules/plugins/join-requests.service.js +135 -0
  64. package/dist/modules/plugins/join-requests.service.js.map +1 -0
  65. package/dist/modules/plugins/plugin-provision.service.d.ts +134 -0
  66. package/dist/modules/plugins/plugin-provision.service.d.ts.map +1 -0
  67. package/dist/modules/plugins/plugin-provision.service.js +344 -0
  68. package/dist/modules/plugins/plugin-provision.service.js.map +1 -0
  69. package/dist/modules/plugins/plugins.contract.d.ts +106 -0
  70. package/dist/modules/plugins/plugins.contract.d.ts.map +1 -0
  71. package/dist/modules/plugins/plugins.contract.js +36 -0
  72. package/dist/modules/plugins/plugins.contract.js.map +1 -0
  73. package/dist/modules/plugins/plugins.routes.d.ts +42 -0
  74. package/dist/modules/plugins/plugins.routes.d.ts.map +1 -0
  75. package/dist/modules/plugins/plugins.routes.js +379 -0
  76. package/dist/modules/plugins/plugins.routes.js.map +1 -0
  77. package/dist/modules/plugins/plugins.service.d.ts +60 -0
  78. package/dist/modules/plugins/plugins.service.d.ts.map +1 -0
  79. package/dist/modules/plugins/plugins.service.js +172 -0
  80. package/dist/modules/plugins/plugins.service.js.map +1 -0
  81. package/dist/modules/settings/setup.routes.d.ts +10 -1
  82. package/dist/modules/settings/setup.routes.d.ts.map +1 -1
  83. package/dist/modules/settings/setup.routes.js +111 -6
  84. package/dist/modules/settings/setup.routes.js.map +1 -1
  85. package/dist/modules/skills/pending-skills.service.d.ts +2 -2
  86. package/dist/modules/skills/pending-skills.service.js +7 -7
  87. package/dist/modules/skills/pending-skills.service.js.map +1 -1
  88. package/dist/modules/skills/skills.contract.d.ts +4 -4
  89. package/dist/modules/skills/skills.contract.d.ts.map +1 -1
  90. package/dist/modules/skills/skills.contract.js +1 -1
  91. package/dist/modules/skills/skills.service.js +5 -5
  92. package/dist/modules/skills/skills.service.js.map +1 -1
  93. package/dist/modules/tool-manuals/mcp-json-discovery.d.ts +65 -0
  94. package/dist/modules/tool-manuals/mcp-json-discovery.d.ts.map +1 -0
  95. package/dist/modules/tool-manuals/mcp-json-discovery.js +276 -0
  96. package/dist/modules/tool-manuals/mcp-json-discovery.js.map +1 -0
  97. package/dist/modules/tool-manuals/mcp-server-edit.service.d.ts +92 -0
  98. package/dist/modules/tool-manuals/mcp-server-edit.service.d.ts.map +1 -0
  99. package/dist/modules/tool-manuals/mcp-server-edit.service.js +328 -0
  100. package/dist/modules/tool-manuals/mcp-server-edit.service.js.map +1 -0
  101. package/dist/modules/tool-manuals/tool-manuals.contract.d.ts +38 -12
  102. package/dist/modules/tool-manuals/tool-manuals.contract.d.ts.map +1 -1
  103. package/dist/modules/tool-manuals/tool-manuals.contract.js +1 -1
  104. package/dist/modules/tool-manuals/tool-manuals.routes.d.ts +13 -2
  105. package/dist/modules/tool-manuals/tool-manuals.routes.d.ts.map +1 -1
  106. package/dist/modules/tool-manuals/tool-manuals.routes.js +233 -2
  107. package/dist/modules/tool-manuals/tool-manuals.routes.js.map +1 -1
  108. package/dist/modules/tool-manuals/tool-manuals.service.d.ts.map +1 -1
  109. package/dist/modules/tool-manuals/tool-manuals.service.js +74 -37
  110. package/dist/modules/tool-manuals/tool-manuals.service.js.map +1 -1
  111. package/dist/modules/tool-manuals/tool-manuals.tools.js +6 -3
  112. package/dist/modules/tool-manuals/tool-manuals.tools.js.map +1 -1
  113. package/dist/modules/workflow/git/git.service.js +2 -2
  114. package/dist/modules/workflow/git/git.service.js.map +1 -1
  115. package/dist/modules/workspace/kb-seed.service.d.ts +2 -2
  116. package/dist/modules/workspace/kb-seed.service.d.ts.map +1 -1
  117. package/dist/modules/workspace/kb-seed.service.js +43 -10
  118. package/dist/modules/workspace/kb-seed.service.js.map +1 -1
  119. package/dist/modules/workspace/plugins-migration.d.ts +50 -0
  120. package/dist/modules/workspace/plugins-migration.d.ts.map +1 -0
  121. package/dist/modules/workspace/plugins-migration.js +379 -0
  122. package/dist/modules/workspace/plugins-migration.js.map +1 -0
  123. package/dist/modules/workspace/startup/kb-git.d.ts +23 -0
  124. package/dist/modules/workspace/startup/kb-git.d.ts.map +1 -0
  125. package/dist/modules/workspace/startup/kb-git.js +86 -0
  126. package/dist/modules/workspace/startup/kb-git.js.map +1 -0
  127. package/dist/modules/workspace/startup/kb-startup-runner.d.ts +74 -0
  128. package/dist/modules/workspace/startup/kb-startup-runner.d.ts.map +1 -0
  129. package/dist/modules/workspace/startup/kb-startup-runner.js +528 -0
  130. package/dist/modules/workspace/startup/kb-startup-runner.js.map +1 -0
  131. package/dist/modules/workspace/startup/on-server-start.d.ts +105 -0
  132. package/dist/modules/workspace/startup/on-server-start.d.ts.map +1 -0
  133. package/dist/modules/workspace/startup/on-server-start.js +21 -0
  134. package/dist/modules/workspace/startup/on-server-start.js.map +1 -0
  135. package/dist/modules/workspace/startup/steps/groups-to-plugins.step.d.ts +46 -0
  136. package/dist/modules/workspace/startup/steps/groups-to-plugins.step.d.ts.map +1 -0
  137. package/dist/modules/workspace/startup/steps/groups-to-plugins.step.js +492 -0
  138. package/dist/modules/workspace/startup/steps/groups-to-plugins.step.js.map +1 -0
  139. package/dist/modules/workspace/startup/steps/roles-yaml.step.d.ts +23 -0
  140. package/dist/modules/workspace/startup/steps/roles-yaml.step.d.ts.map +1 -0
  141. package/dist/modules/workspace/startup/steps/roles-yaml.step.js +69 -0
  142. package/dist/modules/workspace/startup/steps/roles-yaml.step.js.map +1 -0
  143. package/dist/modules/workspace/startup/steps/seed-tree.d.ts +17 -0
  144. package/dist/modules/workspace/startup/steps/seed-tree.d.ts.map +1 -0
  145. package/dist/modules/workspace/startup/steps/seed-tree.js +109 -0
  146. package/dist/modules/workspace/startup/steps/seed-tree.js.map +1 -0
  147. package/dist/modules/workspace/startup/steps/template-files.step.d.ts +103 -0
  148. package/dist/modules/workspace/startup/steps/template-files.step.d.ts.map +1 -0
  149. package/dist/modules/workspace/startup/steps/template-files.step.js +337 -0
  150. package/dist/modules/workspace/startup/steps/template-files.step.js.map +1 -0
  151. package/dist/modules/workspace/workspace.routes.js +3 -3
  152. package/dist/modules/workspace/workspace.routes.js.map +1 -1
  153. package/dist/modules/workspace/workspace.service.d.ts +0 -9
  154. package/dist/modules/workspace/workspace.service.d.ts.map +1 -1
  155. package/dist/modules/workspace/workspace.service.js +2 -30
  156. package/dist/modules/workspace/workspace.service.js.map +1 -1
  157. package/dist/shared/kb-layout.test.js +3 -3
  158. package/dist/shared/kb-layout.test.js.map +1 -1
  159. package/dist/shared/utcp-namespace.d.ts +6 -27
  160. package/dist/shared/utcp-namespace.d.ts.map +1 -1
  161. package/dist/shared/utcp-namespace.js +6 -63
  162. package/dist/shared/utcp-namespace.js.map +1 -1
  163. package/dist/shared/variable-refs.d.ts +42 -0
  164. package/dist/shared/variable-refs.d.ts.map +1 -0
  165. package/dist/shared/variable-refs.js +60 -0
  166. package/dist/shared/variable-refs.js.map +1 -0
  167. package/kb-template/.bevelignore +1 -1
  168. package/kb-template/AGENTS.md +88 -35
  169. package/kb-template/KnowledgeBase/How to get started.md +10 -10
  170. package/kb-template/access.md +36 -36
  171. package/kb-template/gitignore.template +16 -0
  172. package/migrations/meta/0000_snapshot.json +1479 -1479
  173. package/package.json +5 -4
  174. package/src/assets.ts +25 -25
  175. package/src/core/core-ports.ts +113 -106
  176. package/src/core/create-core-server.ts +85 -20
  177. package/src/core/create-core-services.ts +83 -42
  178. package/src/index.ts +69 -69
  179. package/src/modules/access/__tests__/access-control.atref-batch.test.ts +98 -98
  180. package/src/modules/access/__tests__/access-declarations.test.ts +28 -28
  181. package/src/modules/access/__tests__/access-md-format.test.ts +18 -18
  182. package/src/modules/access/__tests__/access-mutation.service.test.ts +5 -5
  183. package/src/modules/access/__tests__/access-splice.test.ts +2 -2
  184. package/src/modules/access/__tests__/access.routes.overrides.test.ts +16 -16
  185. package/src/modules/access/__tests__/grant-sources.test.ts +12 -12
  186. package/src/modules/access/__tests__/roles-admin.service.test.ts +36 -2
  187. package/src/modules/access/access-control.interface.ts +8 -7
  188. package/src/modules/access/access-control.service.ts +7 -7
  189. package/src/modules/access/access-declarations.ts +5 -5
  190. package/src/modules/access/access-mutation.service.ts +3 -3
  191. package/src/modules/access/access-splice.ts +4 -4
  192. package/src/modules/access/access.routes.ts +23 -20
  193. package/src/modules/access/creator-access.ts +5 -5
  194. package/src/modules/access/render-roles-yaml.ts +65 -0
  195. package/src/modules/access/roles-admin.service.ts +45 -16
  196. package/src/modules/admin/admin-access.routes.ts +29 -29
  197. package/src/modules/auth/__tests__/auth.routes.test.ts +91 -91
  198. package/src/modules/auth/__tests__/rate-limit.test.ts +36 -36
  199. package/src/modules/auth/rate-limit.ts +45 -45
  200. package/src/modules/code-mode/__tests__/code-mode.tool.test.ts +67 -0
  201. package/src/modules/code-mode/code-mode-names.ts +10 -36
  202. package/src/modules/code-mode/code-mode.tool.ts +27 -7
  203. package/src/modules/database/connection.ts +15 -15
  204. package/src/modules/database/schema.ts +11 -11
  205. package/src/modules/diff/__tests__/diff.routes.rejectPathsLocked.test.ts +150 -150
  206. package/src/modules/mcp/mcp.service.ts +57 -435
  207. package/src/modules/{groups → plugins}/__tests__/join-proposals.test.ts +1 -1
  208. package/src/modules/{groups → plugins}/__tests__/join-requests.service.test.ts +7 -7
  209. package/src/modules/{groups/__tests__/group-index.service.test.ts → plugins/__tests__/plugin-index.service.test.ts} +41 -41
  210. package/src/modules/plugins/__tests__/plugin-provision.service.test.ts +312 -0
  211. package/src/modules/{groups/__tests__/groups.routes.test.ts → plugins/__tests__/plugins.routes.test.ts} +100 -100
  212. package/src/modules/plugins/index.ts +17 -0
  213. package/src/modules/{groups → plugins}/join-proposals.ts +2 -2
  214. package/src/modules/{groups → plugins}/join-requests.service.ts +8 -8
  215. package/src/modules/{groups/group-provision.service.ts → plugins/plugin-provision.service.ts} +139 -69
  216. package/src/modules/{groups/groups.contract.ts → plugins/plugins.contract.ts} +26 -26
  217. package/src/modules/{groups/groups.routes.ts → plugins/plugins.routes.ts} +102 -102
  218. package/src/modules/{groups/groups.service.ts → plugins/plugins.service.ts} +43 -43
  219. package/src/modules/secrets-vault/__tests__/tool-owner-gate.route.test.ts +143 -143
  220. package/src/modules/settings/__tests__/setup.routes.test.ts +124 -3
  221. package/src/modules/settings/setup.routes.ts +112 -5
  222. package/src/modules/skills/__tests__/pending-skills.service.test.ts +14 -14
  223. package/src/modules/skills/__tests__/skills.service.test.ts +13 -13
  224. package/src/modules/skills/pending-skills.service.ts +7 -7
  225. package/src/modules/skills/skills.contract.ts +4 -4
  226. package/src/modules/skills/skills.service.ts +5 -5
  227. package/src/modules/tool-auth/llm-usage-meter.ts +19 -19
  228. package/src/modules/tool-manuals/__tests__/mcp-json-discovery.test.ts +198 -0
  229. package/src/modules/tool-manuals/__tests__/mcp-server-edit.service.test.ts +346 -0
  230. package/src/modules/tool-manuals/__tests__/tool-manuals.archive.route.test.ts +101 -0
  231. package/src/modules/tool-manuals/__tests__/tool-manuals.detail.route.test.ts +3 -3
  232. package/src/modules/tool-manuals/__tests__/tool-manuals.mcp-oauth.test.ts +2 -2
  233. package/src/modules/tool-manuals/__tests__/tool-manuals.service.test.ts +27 -27
  234. package/src/modules/tool-manuals/__tests__/tool-manuals.tools.test.ts +3 -3
  235. package/src/modules/tool-manuals/mcp-json-discovery.ts +328 -0
  236. package/src/modules/tool-manuals/mcp-server-edit.service.ts +434 -0
  237. package/src/modules/tool-manuals/tool-manuals.contract.ts +35 -12
  238. package/src/modules/tool-manuals/tool-manuals.routes.ts +222 -1
  239. package/src/modules/tool-manuals/tool-manuals.service.ts +82 -42
  240. package/src/modules/tool-manuals/tool-manuals.tools.ts +6 -3
  241. package/src/modules/workflow/__tests__/workflow.service.facade.test.ts +1 -1
  242. package/src/modules/workflow/git/__tests__/branch-name.test.ts +3 -3
  243. package/src/modules/workflow/git/__tests__/git.service.accessGating.test.ts +3 -3
  244. package/src/modules/workflow/git/__tests__/git.service.commitFile.test.ts +13 -8
  245. package/src/modules/workflow/git/__tests__/git.service.deleteBranch.test.ts +1 -1
  246. package/src/modules/workflow/git/__tests__/pull-request.service.test.ts +1 -1
  247. package/src/modules/workflow/git/git.service.ts +2 -2
  248. package/src/modules/workflow/review-workflow/__tests__/approval-states.test.ts +1 -1
  249. package/src/modules/workflow/review-workflow/__tests__/cancel-pr.test.ts +1 -1
  250. package/src/modules/workflow/workflow-hooks.ts +101 -101
  251. package/src/modules/workspace/__tests__/session-ontology.gate.test.ts +237 -237
  252. package/src/modules/workspace/__tests__/workspace.routes.create-grant.test.ts +236 -236
  253. package/src/modules/workspace/__tests__/workspace.routes.delete.test.ts +179 -179
  254. package/src/modules/workspace/__tests__/workspace.routes.download.test.ts +320 -320
  255. package/src/modules/workspace/__tests__/workspace.routes.read-gate.test.ts +337 -337
  256. package/src/modules/workspace/__tests__/workspace.service.test.ts +27 -0
  257. package/src/modules/workspace/bevel-ignore.ts +66 -66
  258. package/src/modules/workspace/session-sink.ts +25 -25
  259. package/src/modules/workspace/startup/__tests__/kb-startup-runner.test.ts +495 -0
  260. package/src/modules/workspace/startup/kb-git.ts +94 -0
  261. package/src/modules/workspace/startup/kb-startup-runner.ts +597 -0
  262. package/src/modules/workspace/startup/on-server-start.ts +97 -0
  263. package/src/modules/workspace/startup/steps/__tests__/steps.test.ts +636 -0
  264. package/src/modules/workspace/startup/steps/groups-to-plugins.step.ts +561 -0
  265. package/src/modules/workspace/startup/steps/roles-yaml.step.ts +71 -0
  266. package/src/modules/workspace/startup/steps/seed-tree.ts +115 -0
  267. package/src/modules/workspace/startup/steps/template-files.step.ts +360 -0
  268. package/src/modules/workspace/workspace.routes.ts +3 -3
  269. package/src/modules/workspace/workspace.service.ts +2 -35
  270. package/src/modules/workspace/workspace.tools.ts +922 -922
  271. package/src/shared/__tests__/join-request.test.ts +13 -13
  272. package/src/shared/__tests__/kb-layout.plugin.test.ts +45 -0
  273. package/src/shared/kb-layout.test.ts +3 -3
  274. package/src/shared/utcp-namespace.ts +10 -68
  275. package/src/shared/variable-refs.ts +64 -0
  276. package/src/modules/groups/__tests__/group-provision.service.test.ts +0 -247
  277. package/src/modules/groups/index.ts +0 -17
  278. package/src/modules/workspace/__tests__/kb-seed.service.test.ts +0 -444
  279. package/src/modules/workspace/kb-seed.interface.ts +0 -36
  280. package/src/modules/workspace/kb-seed.service.ts +0 -555
  281. package/src/shared/__tests__/kb-layout.group.test.ts +0 -45
  282. /package/kb-template/{Groups → Plugins}/.gitkeep +0 -0
@@ -1,1480 +1,1480 @@
1
- {
2
- "id": "4ad00bfe-9859-4cec-a0d3-c1fe652e43cc",
3
- "prevId": "00000000-0000-0000-0000-000000000000",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "public.change_requests": {
8
- "name": "change_requests",
9
- "schema": "",
10
- "columns": {
11
- "id": {
12
- "name": "id",
13
- "type": "uuid",
14
- "primaryKey": true,
15
- "notNull": true,
16
- "default": "gen_random_uuid()"
17
- },
18
- "number": {
19
- "name": "number",
20
- "type": "integer",
21
- "primaryKey": false,
22
- "notNull": true,
23
- "identity": {
24
- "type": "always",
25
- "name": "change_requests_number_seq",
26
- "schema": "public",
27
- "increment": "1",
28
- "startWith": "1",
29
- "minValue": "1",
30
- "maxValue": "2147483647",
31
- "cache": "1",
32
- "cycle": false
33
- }
34
- },
35
- "source_branch": {
36
- "name": "source_branch",
37
- "type": "text",
38
- "primaryKey": false,
39
- "notNull": true
40
- },
41
- "target_branch": {
42
- "name": "target_branch",
43
- "type": "text",
44
- "primaryKey": false,
45
- "notNull": true
46
- },
47
- "title": {
48
- "name": "title",
49
- "type": "text",
50
- "primaryKey": false,
51
- "notNull": true
52
- },
53
- "body": {
54
- "name": "body",
55
- "type": "text",
56
- "primaryKey": false,
57
- "notNull": true,
58
- "default": "''"
59
- },
60
- "author_email": {
61
- "name": "author_email",
62
- "type": "text",
63
- "primaryKey": false,
64
- "notNull": true
65
- },
66
- "author_name": {
67
- "name": "author_name",
68
- "type": "text",
69
- "primaryKey": false,
70
- "notNull": true
71
- },
72
- "state": {
73
- "name": "state",
74
- "type": "text",
75
- "primaryKey": false,
76
- "notNull": true,
77
- "default": "'open'"
78
- },
79
- "merged_sha": {
80
- "name": "merged_sha",
81
- "type": "text",
82
- "primaryKey": false,
83
- "notNull": false
84
- },
85
- "created_at": {
86
- "name": "created_at",
87
- "type": "timestamp",
88
- "primaryKey": false,
89
- "notNull": true,
90
- "default": "now()"
91
- },
92
- "updated_at": {
93
- "name": "updated_at",
94
- "type": "timestamp",
95
- "primaryKey": false,
96
- "notNull": false
97
- },
98
- "closed_at": {
99
- "name": "closed_at",
100
- "type": "timestamp",
101
- "primaryKey": false,
102
- "notNull": false
103
- }
104
- },
105
- "indexes": {
106
- "change_requests_number_unq": {
107
- "name": "change_requests_number_unq",
108
- "columns": [
109
- {
110
- "expression": "number",
111
- "isExpression": false,
112
- "asc": true,
113
- "nulls": "last"
114
- }
115
- ],
116
- "isUnique": true,
117
- "concurrently": false,
118
- "method": "btree",
119
- "with": {}
120
- },
121
- "change_requests_open_pair_unq": {
122
- "name": "change_requests_open_pair_unq",
123
- "columns": [
124
- {
125
- "expression": "source_branch",
126
- "isExpression": false,
127
- "asc": true,
128
- "nulls": "last"
129
- },
130
- {
131
- "expression": "target_branch",
132
- "isExpression": false,
133
- "asc": true,
134
- "nulls": "last"
135
- }
136
- ],
137
- "isUnique": true,
138
- "where": "\"change_requests\".\"state\" = 'open'",
139
- "concurrently": false,
140
- "method": "btree",
141
- "with": {}
142
- },
143
- "change_requests_by_state": {
144
- "name": "change_requests_by_state",
145
- "columns": [
146
- {
147
- "expression": "state",
148
- "isExpression": false,
149
- "asc": true,
150
- "nulls": "last"
151
- }
152
- ],
153
- "isUnique": false,
154
- "concurrently": false,
155
- "method": "btree",
156
- "with": {}
157
- }
158
- },
159
- "foreignKeys": {},
160
- "compositePrimaryKeys": {},
161
- "uniqueConstraints": {},
162
- "policies": {},
163
- "checkConstraints": {
164
- "change_requests_state_check": {
165
- "name": "change_requests_state_check",
166
- "value": "\"change_requests\".\"state\" IN ('open', 'merged', 'closed')"
167
- }
168
- },
169
- "isRLSEnabled": false
170
- },
171
- "public.api_tokens": {
172
- "name": "api_tokens",
173
- "schema": "",
174
- "columns": {
175
- "id": {
176
- "name": "id",
177
- "type": "uuid",
178
- "primaryKey": true,
179
- "notNull": true,
180
- "default": "gen_random_uuid()"
181
- },
182
- "user_id": {
183
- "name": "user_id",
184
- "type": "uuid",
185
- "primaryKey": false,
186
- "notNull": true
187
- },
188
- "token_hash": {
189
- "name": "token_hash",
190
- "type": "text",
191
- "primaryKey": false,
192
- "notNull": true
193
- },
194
- "label": {
195
- "name": "label",
196
- "type": "text",
197
- "primaryKey": false,
198
- "notNull": true
199
- },
200
- "created_at": {
201
- "name": "created_at",
202
- "type": "timestamp",
203
- "primaryKey": false,
204
- "notNull": true,
205
- "default": "now()"
206
- },
207
- "last_used_at": {
208
- "name": "last_used_at",
209
- "type": "timestamp",
210
- "primaryKey": false,
211
- "notNull": false
212
- },
213
- "revoked_at": {
214
- "name": "revoked_at",
215
- "type": "timestamp",
216
- "primaryKey": false,
217
- "notNull": false
218
- }
219
- },
220
- "indexes": {
221
- "api_tokens_by_user": {
222
- "name": "api_tokens_by_user",
223
- "columns": [
224
- {
225
- "expression": "user_id",
226
- "isExpression": false,
227
- "asc": true,
228
- "nulls": "last"
229
- }
230
- ],
231
- "isUnique": false,
232
- "concurrently": false,
233
- "method": "btree",
234
- "with": {}
235
- }
236
- },
237
- "foreignKeys": {
238
- "api_tokens_user_id_users_id_fk": {
239
- "name": "api_tokens_user_id_users_id_fk",
240
- "tableFrom": "api_tokens",
241
- "tableTo": "users",
242
- "columnsFrom": [
243
- "user_id"
244
- ],
245
- "columnsTo": [
246
- "id"
247
- ],
248
- "onDelete": "no action",
249
- "onUpdate": "no action"
250
- }
251
- },
252
- "compositePrimaryKeys": {},
253
- "uniqueConstraints": {
254
- "api_tokens_token_hash_unique": {
255
- "name": "api_tokens_token_hash_unique",
256
- "nullsNotDistinct": false,
257
- "columns": [
258
- "token_hash"
259
- ]
260
- }
261
- },
262
- "policies": {},
263
- "checkConstraints": {},
264
- "isRLSEnabled": false
265
- },
266
- "public.file_locks": {
267
- "name": "file_locks",
268
- "schema": "",
269
- "columns": {
270
- "workspace_id": {
271
- "name": "workspace_id",
272
- "type": "text",
273
- "primaryKey": false,
274
- "notNull": true
275
- },
276
- "branch": {
277
- "name": "branch",
278
- "type": "text",
279
- "primaryKey": false,
280
- "notNull": true
281
- },
282
- "path": {
283
- "name": "path",
284
- "type": "text",
285
- "primaryKey": false,
286
- "notNull": true
287
- },
288
- "holder_user_id": {
289
- "name": "holder_user_id",
290
- "type": "uuid",
291
- "primaryKey": false,
292
- "notNull": true
293
- },
294
- "holder_name": {
295
- "name": "holder_name",
296
- "type": "text",
297
- "primaryKey": false,
298
- "notNull": true
299
- },
300
- "acquired_at": {
301
- "name": "acquired_at",
302
- "type": "timestamp",
303
- "primaryKey": false,
304
- "notNull": true,
305
- "default": "now()"
306
- },
307
- "last_heartbeat_at": {
308
- "name": "last_heartbeat_at",
309
- "type": "timestamp",
310
- "primaryKey": false,
311
- "notNull": true,
312
- "default": "now()"
313
- },
314
- "expires_at": {
315
- "name": "expires_at",
316
- "type": "timestamp",
317
- "primaryKey": false,
318
- "notNull": true
319
- }
320
- },
321
- "indexes": {
322
- "file_locks_by_expiry": {
323
- "name": "file_locks_by_expiry",
324
- "columns": [
325
- {
326
- "expression": "expires_at",
327
- "isExpression": false,
328
- "asc": true,
329
- "nulls": "last"
330
- }
331
- ],
332
- "isUnique": false,
333
- "concurrently": false,
334
- "method": "btree",
335
- "with": {}
336
- },
337
- "file_locks_by_holder": {
338
- "name": "file_locks_by_holder",
339
- "columns": [
340
- {
341
- "expression": "holder_user_id",
342
- "isExpression": false,
343
- "asc": true,
344
- "nulls": "last"
345
- }
346
- ],
347
- "isUnique": false,
348
- "concurrently": false,
349
- "method": "btree",
350
- "with": {}
351
- }
352
- },
353
- "foreignKeys": {
354
- "file_locks_holder_user_id_users_id_fk": {
355
- "name": "file_locks_holder_user_id_users_id_fk",
356
- "tableFrom": "file_locks",
357
- "tableTo": "users",
358
- "columnsFrom": [
359
- "holder_user_id"
360
- ],
361
- "columnsTo": [
362
- "id"
363
- ],
364
- "onDelete": "no action",
365
- "onUpdate": "no action"
366
- }
367
- },
368
- "compositePrimaryKeys": {
369
- "file_locks_workspace_id_branch_path_pk": {
370
- "name": "file_locks_workspace_id_branch_path_pk",
371
- "columns": [
372
- "workspace_id",
373
- "branch",
374
- "path"
375
- ]
376
- }
377
- },
378
- "uniqueConstraints": {},
379
- "policies": {},
380
- "checkConstraints": {},
381
- "isRLSEnabled": false
382
- },
383
- "public.oauth_auth_codes": {
384
- "name": "oauth_auth_codes",
385
- "schema": "",
386
- "columns": {
387
- "id": {
388
- "name": "id",
389
- "type": "uuid",
390
- "primaryKey": true,
391
- "notNull": true,
392
- "default": "gen_random_uuid()"
393
- },
394
- "code_hash": {
395
- "name": "code_hash",
396
- "type": "text",
397
- "primaryKey": false,
398
- "notNull": true
399
- },
400
- "client_id": {
401
- "name": "client_id",
402
- "type": "text",
403
- "primaryKey": false,
404
- "notNull": true
405
- },
406
- "user_id": {
407
- "name": "user_id",
408
- "type": "uuid",
409
- "primaryKey": false,
410
- "notNull": true
411
- },
412
- "redirect_uri": {
413
- "name": "redirect_uri",
414
- "type": "text",
415
- "primaryKey": false,
416
- "notNull": true
417
- },
418
- "code_challenge": {
419
- "name": "code_challenge",
420
- "type": "text",
421
- "primaryKey": false,
422
- "notNull": true
423
- },
424
- "scope": {
425
- "name": "scope",
426
- "type": "text",
427
- "primaryKey": false,
428
- "notNull": false
429
- },
430
- "resource": {
431
- "name": "resource",
432
- "type": "text",
433
- "primaryKey": false,
434
- "notNull": false
435
- },
436
- "expires_at": {
437
- "name": "expires_at",
438
- "type": "timestamp",
439
- "primaryKey": false,
440
- "notNull": true
441
- },
442
- "consumed_at": {
443
- "name": "consumed_at",
444
- "type": "timestamp",
445
- "primaryKey": false,
446
- "notNull": false
447
- },
448
- "created_at": {
449
- "name": "created_at",
450
- "type": "timestamp",
451
- "primaryKey": false,
452
- "notNull": true,
453
- "default": "now()"
454
- }
455
- },
456
- "indexes": {
457
- "oauth_auth_codes_by_expiry": {
458
- "name": "oauth_auth_codes_by_expiry",
459
- "columns": [
460
- {
461
- "expression": "expires_at",
462
- "isExpression": false,
463
- "asc": true,
464
- "nulls": "last"
465
- }
466
- ],
467
- "isUnique": false,
468
- "concurrently": false,
469
- "method": "btree",
470
- "with": {}
471
- }
472
- },
473
- "foreignKeys": {
474
- "oauth_auth_codes_client_id_oauth_clients_client_id_fk": {
475
- "name": "oauth_auth_codes_client_id_oauth_clients_client_id_fk",
476
- "tableFrom": "oauth_auth_codes",
477
- "tableTo": "oauth_clients",
478
- "columnsFrom": [
479
- "client_id"
480
- ],
481
- "columnsTo": [
482
- "client_id"
483
- ],
484
- "onDelete": "no action",
485
- "onUpdate": "no action"
486
- },
487
- "oauth_auth_codes_user_id_users_id_fk": {
488
- "name": "oauth_auth_codes_user_id_users_id_fk",
489
- "tableFrom": "oauth_auth_codes",
490
- "tableTo": "users",
491
- "columnsFrom": [
492
- "user_id"
493
- ],
494
- "columnsTo": [
495
- "id"
496
- ],
497
- "onDelete": "no action",
498
- "onUpdate": "no action"
499
- }
500
- },
501
- "compositePrimaryKeys": {},
502
- "uniqueConstraints": {
503
- "oauth_auth_codes_code_hash_unique": {
504
- "name": "oauth_auth_codes_code_hash_unique",
505
- "nullsNotDistinct": false,
506
- "columns": [
507
- "code_hash"
508
- ]
509
- }
510
- },
511
- "policies": {},
512
- "checkConstraints": {},
513
- "isRLSEnabled": false
514
- },
515
- "public.oauth_clients": {
516
- "name": "oauth_clients",
517
- "schema": "",
518
- "columns": {
519
- "client_id": {
520
- "name": "client_id",
521
- "type": "text",
522
- "primaryKey": true,
523
- "notNull": true
524
- },
525
- "client_secret_encrypted": {
526
- "name": "client_secret_encrypted",
527
- "type": "text",
528
- "primaryKey": false,
529
- "notNull": false
530
- },
531
- "client_secret_expires_at": {
532
- "name": "client_secret_expires_at",
533
- "type": "timestamp",
534
- "primaryKey": false,
535
- "notNull": false
536
- },
537
- "redirect_uris": {
538
- "name": "redirect_uris",
539
- "type": "jsonb",
540
- "primaryKey": false,
541
- "notNull": true,
542
- "default": "'[]'::jsonb"
543
- },
544
- "token_endpoint_auth_method": {
545
- "name": "token_endpoint_auth_method",
546
- "type": "text",
547
- "primaryKey": false,
548
- "notNull": true,
549
- "default": "'none'"
550
- },
551
- "client_name": {
552
- "name": "client_name",
553
- "type": "text",
554
- "primaryKey": false,
555
- "notNull": false
556
- },
557
- "metadata": {
558
- "name": "metadata",
559
- "type": "jsonb",
560
- "primaryKey": false,
561
- "notNull": true,
562
- "default": "'{}'::jsonb"
563
- },
564
- "created_at": {
565
- "name": "created_at",
566
- "type": "timestamp",
567
- "primaryKey": false,
568
- "notNull": true,
569
- "default": "now()"
570
- }
571
- },
572
- "indexes": {},
573
- "foreignKeys": {},
574
- "compositePrimaryKeys": {},
575
- "uniqueConstraints": {},
576
- "policies": {},
577
- "checkConstraints": {},
578
- "isRLSEnabled": false
579
- },
580
- "public.oauth_tokens": {
581
- "name": "oauth_tokens",
582
- "schema": "",
583
- "columns": {
584
- "id": {
585
- "name": "id",
586
- "type": "uuid",
587
- "primaryKey": true,
588
- "notNull": true,
589
- "default": "gen_random_uuid()"
590
- },
591
- "access_token_hash": {
592
- "name": "access_token_hash",
593
- "type": "text",
594
- "primaryKey": false,
595
- "notNull": true
596
- },
597
- "refresh_token_hash": {
598
- "name": "refresh_token_hash",
599
- "type": "text",
600
- "primaryKey": false,
601
- "notNull": false
602
- },
603
- "client_id": {
604
- "name": "client_id",
605
- "type": "text",
606
- "primaryKey": false,
607
- "notNull": true
608
- },
609
- "user_id": {
610
- "name": "user_id",
611
- "type": "uuid",
612
- "primaryKey": false,
613
- "notNull": true
614
- },
615
- "scope": {
616
- "name": "scope",
617
- "type": "text",
618
- "primaryKey": false,
619
- "notNull": false
620
- },
621
- "resource": {
622
- "name": "resource",
623
- "type": "text",
624
- "primaryKey": false,
625
- "notNull": false
626
- },
627
- "expires_at": {
628
- "name": "expires_at",
629
- "type": "timestamp",
630
- "primaryKey": false,
631
- "notNull": true
632
- },
633
- "refresh_expires_at": {
634
- "name": "refresh_expires_at",
635
- "type": "timestamp",
636
- "primaryKey": false,
637
- "notNull": false
638
- },
639
- "revoked_at": {
640
- "name": "revoked_at",
641
- "type": "timestamp",
642
- "primaryKey": false,
643
- "notNull": false
644
- },
645
- "last_used_at": {
646
- "name": "last_used_at",
647
- "type": "timestamp",
648
- "primaryKey": false,
649
- "notNull": false
650
- },
651
- "created_at": {
652
- "name": "created_at",
653
- "type": "timestamp",
654
- "primaryKey": false,
655
- "notNull": true,
656
- "default": "now()"
657
- }
658
- },
659
- "indexes": {
660
- "oauth_tokens_by_user": {
661
- "name": "oauth_tokens_by_user",
662
- "columns": [
663
- {
664
- "expression": "user_id",
665
- "isExpression": false,
666
- "asc": true,
667
- "nulls": "last"
668
- }
669
- ],
670
- "isUnique": false,
671
- "concurrently": false,
672
- "method": "btree",
673
- "with": {}
674
- },
675
- "oauth_tokens_by_expiry": {
676
- "name": "oauth_tokens_by_expiry",
677
- "columns": [
678
- {
679
- "expression": "expires_at",
680
- "isExpression": false,
681
- "asc": true,
682
- "nulls": "last"
683
- }
684
- ],
685
- "isUnique": false,
686
- "concurrently": false,
687
- "method": "btree",
688
- "with": {}
689
- }
690
- },
691
- "foreignKeys": {
692
- "oauth_tokens_client_id_oauth_clients_client_id_fk": {
693
- "name": "oauth_tokens_client_id_oauth_clients_client_id_fk",
694
- "tableFrom": "oauth_tokens",
695
- "tableTo": "oauth_clients",
696
- "columnsFrom": [
697
- "client_id"
698
- ],
699
- "columnsTo": [
700
- "client_id"
701
- ],
702
- "onDelete": "no action",
703
- "onUpdate": "no action"
704
- },
705
- "oauth_tokens_user_id_users_id_fk": {
706
- "name": "oauth_tokens_user_id_users_id_fk",
707
- "tableFrom": "oauth_tokens",
708
- "tableTo": "users",
709
- "columnsFrom": [
710
- "user_id"
711
- ],
712
- "columnsTo": [
713
- "id"
714
- ],
715
- "onDelete": "no action",
716
- "onUpdate": "no action"
717
- }
718
- },
719
- "compositePrimaryKeys": {},
720
- "uniqueConstraints": {
721
- "oauth_tokens_access_token_hash_unique": {
722
- "name": "oauth_tokens_access_token_hash_unique",
723
- "nullsNotDistinct": false,
724
- "columns": [
725
- "access_token_hash"
726
- ]
727
- },
728
- "oauth_tokens_refresh_token_hash_unique": {
729
- "name": "oauth_tokens_refresh_token_hash_unique",
730
- "nullsNotDistinct": false,
731
- "columns": [
732
- "refresh_token_hash"
733
- ]
734
- }
735
- },
736
- "policies": {},
737
- "checkConstraints": {},
738
- "isRLSEnabled": false
739
- },
740
- "public.pending_commits": {
741
- "name": "pending_commits",
742
- "schema": "",
743
- "columns": {
744
- "id": {
745
- "name": "id",
746
- "type": "uuid",
747
- "primaryKey": true,
748
- "notNull": true,
749
- "default": "gen_random_uuid()"
750
- },
751
- "workspace_id": {
752
- "name": "workspace_id",
753
- "type": "text",
754
- "primaryKey": false,
755
- "notNull": true
756
- },
757
- "branch": {
758
- "name": "branch",
759
- "type": "text",
760
- "primaryKey": false,
761
- "notNull": true
762
- },
763
- "path": {
764
- "name": "path",
765
- "type": "text",
766
- "primaryKey": false,
767
- "notNull": true
768
- },
769
- "author_email": {
770
- "name": "author_email",
771
- "type": "text",
772
- "primaryKey": false,
773
- "notNull": true
774
- },
775
- "author_name": {
776
- "name": "author_name",
777
- "type": "text",
778
- "primaryKey": false,
779
- "notNull": true
780
- },
781
- "queued_at": {
782
- "name": "queued_at",
783
- "type": "timestamp",
784
- "primaryKey": false,
785
- "notNull": true,
786
- "default": "now()"
787
- },
788
- "status": {
789
- "name": "status",
790
- "type": "text",
791
- "primaryKey": false,
792
- "notNull": true,
793
- "default": "'pending'"
794
- },
795
- "attempts": {
796
- "name": "attempts",
797
- "type": "integer",
798
- "primaryKey": false,
799
- "notNull": true,
800
- "default": 0
801
- },
802
- "recovery_agent_runs": {
803
- "name": "recovery_agent_runs",
804
- "type": "integer",
805
- "primaryKey": false,
806
- "notNull": true,
807
- "default": 0
808
- },
809
- "last_attempted_at": {
810
- "name": "last_attempted_at",
811
- "type": "timestamp",
812
- "primaryKey": false,
813
- "notNull": false
814
- },
815
- "last_error": {
816
- "name": "last_error",
817
- "type": "text",
818
- "primaryKey": false,
819
- "notNull": false
820
- }
821
- },
822
- "indexes": {
823
- "pending_commits_by_workspace_queued": {
824
- "name": "pending_commits_by_workspace_queued",
825
- "columns": [
826
- {
827
- "expression": "workspace_id",
828
- "isExpression": false,
829
- "asc": true,
830
- "nulls": "last"
831
- },
832
- {
833
- "expression": "queued_at",
834
- "isExpression": false,
835
- "asc": true,
836
- "nulls": "last"
837
- }
838
- ],
839
- "isUnique": false,
840
- "concurrently": false,
841
- "method": "btree",
842
- "with": {}
843
- },
844
- "pending_commits_by_status": {
845
- "name": "pending_commits_by_status",
846
- "columns": [
847
- {
848
- "expression": "status",
849
- "isExpression": false,
850
- "asc": true,
851
- "nulls": "last"
852
- },
853
- {
854
- "expression": "last_attempted_at",
855
- "isExpression": false,
856
- "asc": true,
857
- "nulls": "last"
858
- }
859
- ],
860
- "isUnique": false,
861
- "concurrently": false,
862
- "method": "btree",
863
- "with": {}
864
- },
865
- "pending_commits_by_status_only": {
866
- "name": "pending_commits_by_status_only",
867
- "columns": [
868
- {
869
- "expression": "status",
870
- "isExpression": false,
871
- "asc": true,
872
- "nulls": "last"
873
- }
874
- ],
875
- "isUnique": false,
876
- "concurrently": false,
877
- "method": "btree",
878
- "with": {}
879
- }
880
- },
881
- "foreignKeys": {},
882
- "compositePrimaryKeys": {},
883
- "uniqueConstraints": {},
884
- "policies": {},
885
- "checkConstraints": {
886
- "pending_commits_status": {
887
- "name": "pending_commits_status",
888
- "value": "\"pending_commits\".\"status\" IN ('pending', 'running', 'needs_attention')"
889
- }
890
- },
891
- "isRLSEnabled": false
892
- },
893
- "public.pr_comments": {
894
- "name": "pr_comments",
895
- "schema": "",
896
- "columns": {
897
- "id": {
898
- "name": "id",
899
- "type": "uuid",
900
- "primaryKey": true,
901
- "notNull": true,
902
- "default": "gen_random_uuid()"
903
- },
904
- "pr_number": {
905
- "name": "pr_number",
906
- "type": "integer",
907
- "primaryKey": false,
908
- "notNull": true
909
- },
910
- "author_email": {
911
- "name": "author_email",
912
- "type": "text",
913
- "primaryKey": false,
914
- "notNull": true
915
- },
916
- "author_name": {
917
- "name": "author_name",
918
- "type": "text",
919
- "primaryKey": false,
920
- "notNull": true
921
- },
922
- "path": {
923
- "name": "path",
924
- "type": "text",
925
- "primaryKey": false,
926
- "notNull": false
927
- },
928
- "line": {
929
- "name": "line",
930
- "type": "integer",
931
- "primaryKey": false,
932
- "notNull": false
933
- },
934
- "head_sha": {
935
- "name": "head_sha",
936
- "type": "text",
937
- "primaryKey": false,
938
- "notNull": true
939
- },
940
- "body": {
941
- "name": "body",
942
- "type": "text",
943
- "primaryKey": false,
944
- "notNull": true
945
- },
946
- "parent_id": {
947
- "name": "parent_id",
948
- "type": "uuid",
949
- "primaryKey": false,
950
- "notNull": false
951
- },
952
- "created_at": {
953
- "name": "created_at",
954
- "type": "timestamp",
955
- "primaryKey": false,
956
- "notNull": true,
957
- "default": "now()"
958
- },
959
- "updated_at": {
960
- "name": "updated_at",
961
- "type": "timestamp",
962
- "primaryKey": false,
963
- "notNull": false
964
- }
965
- },
966
- "indexes": {
967
- "pr_comments_by_pr": {
968
- "name": "pr_comments_by_pr",
969
- "columns": [
970
- {
971
- "expression": "pr_number",
972
- "isExpression": false,
973
- "asc": true,
974
- "nulls": "last"
975
- }
976
- ],
977
- "isUnique": false,
978
- "concurrently": false,
979
- "method": "btree",
980
- "with": {}
981
- },
982
- "pr_comments_by_thread": {
983
- "name": "pr_comments_by_thread",
984
- "columns": [
985
- {
986
- "expression": "pr_number",
987
- "isExpression": false,
988
- "asc": true,
989
- "nulls": "last"
990
- },
991
- {
992
- "expression": "path",
993
- "isExpression": false,
994
- "asc": true,
995
- "nulls": "last"
996
- },
997
- {
998
- "expression": "line",
999
- "isExpression": false,
1000
- "asc": true,
1001
- "nulls": "last"
1002
- }
1003
- ],
1004
- "isUnique": false,
1005
- "concurrently": false,
1006
- "method": "btree",
1007
- "with": {}
1008
- }
1009
- },
1010
- "foreignKeys": {},
1011
- "compositePrimaryKeys": {},
1012
- "uniqueConstraints": {},
1013
- "policies": {},
1014
- "checkConstraints": {},
1015
- "isRLSEnabled": false
1016
- },
1017
- "public.pr_file_approvals": {
1018
- "name": "pr_file_approvals",
1019
- "schema": "",
1020
- "columns": {
1021
- "id": {
1022
- "name": "id",
1023
- "type": "uuid",
1024
- "primaryKey": true,
1025
- "notNull": true,
1026
- "default": "gen_random_uuid()"
1027
- },
1028
- "pr_number": {
1029
- "name": "pr_number",
1030
- "type": "integer",
1031
- "primaryKey": false,
1032
- "notNull": true
1033
- },
1034
- "path": {
1035
- "name": "path",
1036
- "type": "text",
1037
- "primaryKey": false,
1038
- "notNull": true
1039
- },
1040
- "approver_email": {
1041
- "name": "approver_email",
1042
- "type": "text",
1043
- "primaryKey": false,
1044
- "notNull": true
1045
- },
1046
- "approver_name": {
1047
- "name": "approver_name",
1048
- "type": "text",
1049
- "primaryKey": false,
1050
- "notNull": true
1051
- },
1052
- "head_sha": {
1053
- "name": "head_sha",
1054
- "type": "text",
1055
- "primaryKey": false,
1056
- "notNull": true
1057
- },
1058
- "approved_at": {
1059
- "name": "approved_at",
1060
- "type": "timestamp",
1061
- "primaryKey": false,
1062
- "notNull": true,
1063
- "default": "now()"
1064
- }
1065
- },
1066
- "indexes": {
1067
- "pr_file_approvals_unq": {
1068
- "name": "pr_file_approvals_unq",
1069
- "columns": [
1070
- {
1071
- "expression": "pr_number",
1072
- "isExpression": false,
1073
- "asc": true,
1074
- "nulls": "last"
1075
- },
1076
- {
1077
- "expression": "path",
1078
- "isExpression": false,
1079
- "asc": true,
1080
- "nulls": "last"
1081
- },
1082
- {
1083
- "expression": "approver_email",
1084
- "isExpression": false,
1085
- "asc": true,
1086
- "nulls": "last"
1087
- },
1088
- {
1089
- "expression": "head_sha",
1090
- "isExpression": false,
1091
- "asc": true,
1092
- "nulls": "last"
1093
- }
1094
- ],
1095
- "isUnique": true,
1096
- "concurrently": false,
1097
- "method": "btree",
1098
- "with": {}
1099
- },
1100
- "pr_file_approvals_by_pr": {
1101
- "name": "pr_file_approvals_by_pr",
1102
- "columns": [
1103
- {
1104
- "expression": "pr_number",
1105
- "isExpression": false,
1106
- "asc": true,
1107
- "nulls": "last"
1108
- }
1109
- ],
1110
- "isUnique": false,
1111
- "concurrently": false,
1112
- "method": "btree",
1113
- "with": {}
1114
- }
1115
- },
1116
- "foreignKeys": {},
1117
- "compositePrimaryKeys": {},
1118
- "uniqueConstraints": {},
1119
- "policies": {},
1120
- "checkConstraints": {},
1121
- "isRLSEnabled": false
1122
- },
1123
- "public.pr_merge_log": {
1124
- "name": "pr_merge_log",
1125
- "schema": "",
1126
- "columns": {
1127
- "id": {
1128
- "name": "id",
1129
- "type": "uuid",
1130
- "primaryKey": true,
1131
- "notNull": true,
1132
- "default": "gen_random_uuid()"
1133
- },
1134
- "pr_number": {
1135
- "name": "pr_number",
1136
- "type": "integer",
1137
- "primaryKey": false,
1138
- "notNull": true
1139
- },
1140
- "triggered_by_email": {
1141
- "name": "triggered_by_email",
1142
- "type": "text",
1143
- "primaryKey": false,
1144
- "notNull": true
1145
- },
1146
- "triggered_by_name": {
1147
- "name": "triggered_by_name",
1148
- "type": "text",
1149
- "primaryKey": false,
1150
- "notNull": true
1151
- },
1152
- "head_sha_at_merge": {
1153
- "name": "head_sha_at_merge",
1154
- "type": "text",
1155
- "primaryKey": false,
1156
- "notNull": true
1157
- },
1158
- "merge_method": {
1159
- "name": "merge_method",
1160
- "type": "text",
1161
- "primaryKey": false,
1162
- "notNull": true
1163
- },
1164
- "succeeded": {
1165
- "name": "succeeded",
1166
- "type": "boolean",
1167
- "primaryKey": false,
1168
- "notNull": true
1169
- },
1170
- "error": {
1171
- "name": "error",
1172
- "type": "text",
1173
- "primaryKey": false,
1174
- "notNull": false
1175
- },
1176
- "started_at": {
1177
- "name": "started_at",
1178
- "type": "timestamp",
1179
- "primaryKey": false,
1180
- "notNull": true,
1181
- "default": "now()"
1182
- },
1183
- "completed_at": {
1184
- "name": "completed_at",
1185
- "type": "timestamp",
1186
- "primaryKey": false,
1187
- "notNull": false
1188
- }
1189
- },
1190
- "indexes": {
1191
- "pr_merge_log_by_pr": {
1192
- "name": "pr_merge_log_by_pr",
1193
- "columns": [
1194
- {
1195
- "expression": "pr_number",
1196
- "isExpression": false,
1197
- "asc": true,
1198
- "nulls": "last"
1199
- }
1200
- ],
1201
- "isUnique": false,
1202
- "concurrently": false,
1203
- "method": "btree",
1204
- "with": {}
1205
- }
1206
- },
1207
- "foreignKeys": {},
1208
- "compositePrimaryKeys": {},
1209
- "uniqueConstraints": {},
1210
- "policies": {},
1211
- "checkConstraints": {},
1212
- "isRLSEnabled": false
1213
- },
1214
- "public.secrets": {
1215
- "name": "secrets",
1216
- "schema": "",
1217
- "columns": {
1218
- "id": {
1219
- "name": "id",
1220
- "type": "uuid",
1221
- "primaryKey": true,
1222
- "notNull": true,
1223
- "default": "gen_random_uuid()"
1224
- },
1225
- "user_id": {
1226
- "name": "user_id",
1227
- "type": "uuid",
1228
- "primaryKey": false,
1229
- "notNull": false
1230
- },
1231
- "key": {
1232
- "name": "key",
1233
- "type": "text",
1234
- "primaryKey": false,
1235
- "notNull": true
1236
- },
1237
- "kind": {
1238
- "name": "kind",
1239
- "type": "text",
1240
- "primaryKey": false,
1241
- "notNull": true,
1242
- "default": "'static'"
1243
- },
1244
- "label": {
1245
- "name": "label",
1246
- "type": "text",
1247
- "primaryKey": false,
1248
- "notNull": false
1249
- },
1250
- "value_encrypted": {
1251
- "name": "value_encrypted",
1252
- "type": "text",
1253
- "primaryKey": false,
1254
- "notNull": true
1255
- },
1256
- "oauth_meta": {
1257
- "name": "oauth_meta",
1258
- "type": "jsonb",
1259
- "primaryKey": false,
1260
- "notNull": false
1261
- },
1262
- "created_at": {
1263
- "name": "created_at",
1264
- "type": "timestamp",
1265
- "primaryKey": false,
1266
- "notNull": true,
1267
- "default": "now()"
1268
- },
1269
- "updated_at": {
1270
- "name": "updated_at",
1271
- "type": "timestamp",
1272
- "primaryKey": false,
1273
- "notNull": true,
1274
- "default": "now()"
1275
- }
1276
- },
1277
- "indexes": {
1278
- "secrets_by_user": {
1279
- "name": "secrets_by_user",
1280
- "columns": [
1281
- {
1282
- "expression": "user_id",
1283
- "isExpression": false,
1284
- "asc": true,
1285
- "nulls": "last"
1286
- }
1287
- ],
1288
- "isUnique": false,
1289
- "concurrently": false,
1290
- "method": "btree",
1291
- "with": {}
1292
- },
1293
- "secrets_user_key_unq": {
1294
- "name": "secrets_user_key_unq",
1295
- "columns": [
1296
- {
1297
- "expression": "user_id",
1298
- "isExpression": false,
1299
- "asc": true,
1300
- "nulls": "last"
1301
- },
1302
- {
1303
- "expression": "key",
1304
- "isExpression": false,
1305
- "asc": true,
1306
- "nulls": "last"
1307
- }
1308
- ],
1309
- "isUnique": true,
1310
- "concurrently": false,
1311
- "method": "btree",
1312
- "with": {}
1313
- },
1314
- "secrets_shared_key_unq": {
1315
- "name": "secrets_shared_key_unq",
1316
- "columns": [
1317
- {
1318
- "expression": "key",
1319
- "isExpression": false,
1320
- "asc": true,
1321
- "nulls": "last"
1322
- }
1323
- ],
1324
- "isUnique": true,
1325
- "where": "\"secrets\".\"user_id\" is null",
1326
- "concurrently": false,
1327
- "method": "btree",
1328
- "with": {}
1329
- }
1330
- },
1331
- "foreignKeys": {
1332
- "secrets_user_id_users_id_fk": {
1333
- "name": "secrets_user_id_users_id_fk",
1334
- "tableFrom": "secrets",
1335
- "tableTo": "users",
1336
- "columnsFrom": [
1337
- "user_id"
1338
- ],
1339
- "columnsTo": [
1340
- "id"
1341
- ],
1342
- "onDelete": "cascade",
1343
- "onUpdate": "no action"
1344
- }
1345
- },
1346
- "compositePrimaryKeys": {},
1347
- "uniqueConstraints": {},
1348
- "policies": {},
1349
- "checkConstraints": {},
1350
- "isRLSEnabled": false
1351
- },
1352
- "public.session_ontology_touches": {
1353
- "name": "session_ontology_touches",
1354
- "schema": "",
1355
- "columns": {
1356
- "session_id": {
1357
- "name": "session_id",
1358
- "type": "text",
1359
- "primaryKey": false,
1360
- "notNull": true
1361
- },
1362
- "ontology": {
1363
- "name": "ontology",
1364
- "type": "text",
1365
- "primaryKey": false,
1366
- "notNull": true
1367
- },
1368
- "touched_at": {
1369
- "name": "touched_at",
1370
- "type": "timestamp",
1371
- "primaryKey": false,
1372
- "notNull": true,
1373
- "default": "now()"
1374
- }
1375
- },
1376
- "indexes": {
1377
- "session_ontology_touches_by_touched_at": {
1378
- "name": "session_ontology_touches_by_touched_at",
1379
- "columns": [
1380
- {
1381
- "expression": "touched_at",
1382
- "isExpression": false,
1383
- "asc": true,
1384
- "nulls": "last"
1385
- }
1386
- ],
1387
- "isUnique": false,
1388
- "concurrently": false,
1389
- "method": "btree",
1390
- "with": {}
1391
- }
1392
- },
1393
- "foreignKeys": {},
1394
- "compositePrimaryKeys": {
1395
- "session_ontology_touches_session_id_ontology_pk": {
1396
- "name": "session_ontology_touches_session_id_ontology_pk",
1397
- "columns": [
1398
- "session_id",
1399
- "ontology"
1400
- ]
1401
- }
1402
- },
1403
- "uniqueConstraints": {},
1404
- "policies": {},
1405
- "checkConstraints": {},
1406
- "isRLSEnabled": false
1407
- },
1408
- "public.users": {
1409
- "name": "users",
1410
- "schema": "",
1411
- "columns": {
1412
- "id": {
1413
- "name": "id",
1414
- "type": "uuid",
1415
- "primaryKey": true,
1416
- "notNull": true,
1417
- "default": "gen_random_uuid()"
1418
- },
1419
- "email": {
1420
- "name": "email",
1421
- "type": "text",
1422
- "primaryKey": false,
1423
- "notNull": true
1424
- },
1425
- "name": {
1426
- "name": "name",
1427
- "type": "text",
1428
- "primaryKey": false,
1429
- "notNull": true
1430
- },
1431
- "avatar_url": {
1432
- "name": "avatar_url",
1433
- "type": "text",
1434
- "primaryKey": false,
1435
- "notNull": false
1436
- },
1437
- "created_at": {
1438
- "name": "created_at",
1439
- "type": "timestamp",
1440
- "primaryKey": false,
1441
- "notNull": true,
1442
- "default": "now()"
1443
- },
1444
- "updated_at": {
1445
- "name": "updated_at",
1446
- "type": "timestamp",
1447
- "primaryKey": false,
1448
- "notNull": true,
1449
- "default": "now()"
1450
- }
1451
- },
1452
- "indexes": {},
1453
- "foreignKeys": {},
1454
- "compositePrimaryKeys": {},
1455
- "uniqueConstraints": {
1456
- "users_email_unique": {
1457
- "name": "users_email_unique",
1458
- "nullsNotDistinct": false,
1459
- "columns": [
1460
- "email"
1461
- ]
1462
- }
1463
- },
1464
- "policies": {},
1465
- "checkConstraints": {},
1466
- "isRLSEnabled": false
1467
- }
1468
- },
1469
- "enums": {},
1470
- "schemas": {},
1471
- "sequences": {},
1472
- "roles": {},
1473
- "policies": {},
1474
- "views": {},
1475
- "_meta": {
1476
- "columns": {},
1477
- "schemas": {},
1478
- "tables": {}
1479
- }
1
+ {
2
+ "id": "4ad00bfe-9859-4cec-a0d3-c1fe652e43cc",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.change_requests": {
8
+ "name": "change_requests",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "number": {
19
+ "name": "number",
20
+ "type": "integer",
21
+ "primaryKey": false,
22
+ "notNull": true,
23
+ "identity": {
24
+ "type": "always",
25
+ "name": "change_requests_number_seq",
26
+ "schema": "public",
27
+ "increment": "1",
28
+ "startWith": "1",
29
+ "minValue": "1",
30
+ "maxValue": "2147483647",
31
+ "cache": "1",
32
+ "cycle": false
33
+ }
34
+ },
35
+ "source_branch": {
36
+ "name": "source_branch",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "target_branch": {
42
+ "name": "target_branch",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "title": {
48
+ "name": "title",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ },
53
+ "body": {
54
+ "name": "body",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": true,
58
+ "default": "''"
59
+ },
60
+ "author_email": {
61
+ "name": "author_email",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": true
65
+ },
66
+ "author_name": {
67
+ "name": "author_name",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": true
71
+ },
72
+ "state": {
73
+ "name": "state",
74
+ "type": "text",
75
+ "primaryKey": false,
76
+ "notNull": true,
77
+ "default": "'open'"
78
+ },
79
+ "merged_sha": {
80
+ "name": "merged_sha",
81
+ "type": "text",
82
+ "primaryKey": false,
83
+ "notNull": false
84
+ },
85
+ "created_at": {
86
+ "name": "created_at",
87
+ "type": "timestamp",
88
+ "primaryKey": false,
89
+ "notNull": true,
90
+ "default": "now()"
91
+ },
92
+ "updated_at": {
93
+ "name": "updated_at",
94
+ "type": "timestamp",
95
+ "primaryKey": false,
96
+ "notNull": false
97
+ },
98
+ "closed_at": {
99
+ "name": "closed_at",
100
+ "type": "timestamp",
101
+ "primaryKey": false,
102
+ "notNull": false
103
+ }
104
+ },
105
+ "indexes": {
106
+ "change_requests_number_unq": {
107
+ "name": "change_requests_number_unq",
108
+ "columns": [
109
+ {
110
+ "expression": "number",
111
+ "isExpression": false,
112
+ "asc": true,
113
+ "nulls": "last"
114
+ }
115
+ ],
116
+ "isUnique": true,
117
+ "concurrently": false,
118
+ "method": "btree",
119
+ "with": {}
120
+ },
121
+ "change_requests_open_pair_unq": {
122
+ "name": "change_requests_open_pair_unq",
123
+ "columns": [
124
+ {
125
+ "expression": "source_branch",
126
+ "isExpression": false,
127
+ "asc": true,
128
+ "nulls": "last"
129
+ },
130
+ {
131
+ "expression": "target_branch",
132
+ "isExpression": false,
133
+ "asc": true,
134
+ "nulls": "last"
135
+ }
136
+ ],
137
+ "isUnique": true,
138
+ "where": "\"change_requests\".\"state\" = 'open'",
139
+ "concurrently": false,
140
+ "method": "btree",
141
+ "with": {}
142
+ },
143
+ "change_requests_by_state": {
144
+ "name": "change_requests_by_state",
145
+ "columns": [
146
+ {
147
+ "expression": "state",
148
+ "isExpression": false,
149
+ "asc": true,
150
+ "nulls": "last"
151
+ }
152
+ ],
153
+ "isUnique": false,
154
+ "concurrently": false,
155
+ "method": "btree",
156
+ "with": {}
157
+ }
158
+ },
159
+ "foreignKeys": {},
160
+ "compositePrimaryKeys": {},
161
+ "uniqueConstraints": {},
162
+ "policies": {},
163
+ "checkConstraints": {
164
+ "change_requests_state_check": {
165
+ "name": "change_requests_state_check",
166
+ "value": "\"change_requests\".\"state\" IN ('open', 'merged', 'closed')"
167
+ }
168
+ },
169
+ "isRLSEnabled": false
170
+ },
171
+ "public.api_tokens": {
172
+ "name": "api_tokens",
173
+ "schema": "",
174
+ "columns": {
175
+ "id": {
176
+ "name": "id",
177
+ "type": "uuid",
178
+ "primaryKey": true,
179
+ "notNull": true,
180
+ "default": "gen_random_uuid()"
181
+ },
182
+ "user_id": {
183
+ "name": "user_id",
184
+ "type": "uuid",
185
+ "primaryKey": false,
186
+ "notNull": true
187
+ },
188
+ "token_hash": {
189
+ "name": "token_hash",
190
+ "type": "text",
191
+ "primaryKey": false,
192
+ "notNull": true
193
+ },
194
+ "label": {
195
+ "name": "label",
196
+ "type": "text",
197
+ "primaryKey": false,
198
+ "notNull": true
199
+ },
200
+ "created_at": {
201
+ "name": "created_at",
202
+ "type": "timestamp",
203
+ "primaryKey": false,
204
+ "notNull": true,
205
+ "default": "now()"
206
+ },
207
+ "last_used_at": {
208
+ "name": "last_used_at",
209
+ "type": "timestamp",
210
+ "primaryKey": false,
211
+ "notNull": false
212
+ },
213
+ "revoked_at": {
214
+ "name": "revoked_at",
215
+ "type": "timestamp",
216
+ "primaryKey": false,
217
+ "notNull": false
218
+ }
219
+ },
220
+ "indexes": {
221
+ "api_tokens_by_user": {
222
+ "name": "api_tokens_by_user",
223
+ "columns": [
224
+ {
225
+ "expression": "user_id",
226
+ "isExpression": false,
227
+ "asc": true,
228
+ "nulls": "last"
229
+ }
230
+ ],
231
+ "isUnique": false,
232
+ "concurrently": false,
233
+ "method": "btree",
234
+ "with": {}
235
+ }
236
+ },
237
+ "foreignKeys": {
238
+ "api_tokens_user_id_users_id_fk": {
239
+ "name": "api_tokens_user_id_users_id_fk",
240
+ "tableFrom": "api_tokens",
241
+ "tableTo": "users",
242
+ "columnsFrom": [
243
+ "user_id"
244
+ ],
245
+ "columnsTo": [
246
+ "id"
247
+ ],
248
+ "onDelete": "no action",
249
+ "onUpdate": "no action"
250
+ }
251
+ },
252
+ "compositePrimaryKeys": {},
253
+ "uniqueConstraints": {
254
+ "api_tokens_token_hash_unique": {
255
+ "name": "api_tokens_token_hash_unique",
256
+ "nullsNotDistinct": false,
257
+ "columns": [
258
+ "token_hash"
259
+ ]
260
+ }
261
+ },
262
+ "policies": {},
263
+ "checkConstraints": {},
264
+ "isRLSEnabled": false
265
+ },
266
+ "public.file_locks": {
267
+ "name": "file_locks",
268
+ "schema": "",
269
+ "columns": {
270
+ "workspace_id": {
271
+ "name": "workspace_id",
272
+ "type": "text",
273
+ "primaryKey": false,
274
+ "notNull": true
275
+ },
276
+ "branch": {
277
+ "name": "branch",
278
+ "type": "text",
279
+ "primaryKey": false,
280
+ "notNull": true
281
+ },
282
+ "path": {
283
+ "name": "path",
284
+ "type": "text",
285
+ "primaryKey": false,
286
+ "notNull": true
287
+ },
288
+ "holder_user_id": {
289
+ "name": "holder_user_id",
290
+ "type": "uuid",
291
+ "primaryKey": false,
292
+ "notNull": true
293
+ },
294
+ "holder_name": {
295
+ "name": "holder_name",
296
+ "type": "text",
297
+ "primaryKey": false,
298
+ "notNull": true
299
+ },
300
+ "acquired_at": {
301
+ "name": "acquired_at",
302
+ "type": "timestamp",
303
+ "primaryKey": false,
304
+ "notNull": true,
305
+ "default": "now()"
306
+ },
307
+ "last_heartbeat_at": {
308
+ "name": "last_heartbeat_at",
309
+ "type": "timestamp",
310
+ "primaryKey": false,
311
+ "notNull": true,
312
+ "default": "now()"
313
+ },
314
+ "expires_at": {
315
+ "name": "expires_at",
316
+ "type": "timestamp",
317
+ "primaryKey": false,
318
+ "notNull": true
319
+ }
320
+ },
321
+ "indexes": {
322
+ "file_locks_by_expiry": {
323
+ "name": "file_locks_by_expiry",
324
+ "columns": [
325
+ {
326
+ "expression": "expires_at",
327
+ "isExpression": false,
328
+ "asc": true,
329
+ "nulls": "last"
330
+ }
331
+ ],
332
+ "isUnique": false,
333
+ "concurrently": false,
334
+ "method": "btree",
335
+ "with": {}
336
+ },
337
+ "file_locks_by_holder": {
338
+ "name": "file_locks_by_holder",
339
+ "columns": [
340
+ {
341
+ "expression": "holder_user_id",
342
+ "isExpression": false,
343
+ "asc": true,
344
+ "nulls": "last"
345
+ }
346
+ ],
347
+ "isUnique": false,
348
+ "concurrently": false,
349
+ "method": "btree",
350
+ "with": {}
351
+ }
352
+ },
353
+ "foreignKeys": {
354
+ "file_locks_holder_user_id_users_id_fk": {
355
+ "name": "file_locks_holder_user_id_users_id_fk",
356
+ "tableFrom": "file_locks",
357
+ "tableTo": "users",
358
+ "columnsFrom": [
359
+ "holder_user_id"
360
+ ],
361
+ "columnsTo": [
362
+ "id"
363
+ ],
364
+ "onDelete": "no action",
365
+ "onUpdate": "no action"
366
+ }
367
+ },
368
+ "compositePrimaryKeys": {
369
+ "file_locks_workspace_id_branch_path_pk": {
370
+ "name": "file_locks_workspace_id_branch_path_pk",
371
+ "columns": [
372
+ "workspace_id",
373
+ "branch",
374
+ "path"
375
+ ]
376
+ }
377
+ },
378
+ "uniqueConstraints": {},
379
+ "policies": {},
380
+ "checkConstraints": {},
381
+ "isRLSEnabled": false
382
+ },
383
+ "public.oauth_auth_codes": {
384
+ "name": "oauth_auth_codes",
385
+ "schema": "",
386
+ "columns": {
387
+ "id": {
388
+ "name": "id",
389
+ "type": "uuid",
390
+ "primaryKey": true,
391
+ "notNull": true,
392
+ "default": "gen_random_uuid()"
393
+ },
394
+ "code_hash": {
395
+ "name": "code_hash",
396
+ "type": "text",
397
+ "primaryKey": false,
398
+ "notNull": true
399
+ },
400
+ "client_id": {
401
+ "name": "client_id",
402
+ "type": "text",
403
+ "primaryKey": false,
404
+ "notNull": true
405
+ },
406
+ "user_id": {
407
+ "name": "user_id",
408
+ "type": "uuid",
409
+ "primaryKey": false,
410
+ "notNull": true
411
+ },
412
+ "redirect_uri": {
413
+ "name": "redirect_uri",
414
+ "type": "text",
415
+ "primaryKey": false,
416
+ "notNull": true
417
+ },
418
+ "code_challenge": {
419
+ "name": "code_challenge",
420
+ "type": "text",
421
+ "primaryKey": false,
422
+ "notNull": true
423
+ },
424
+ "scope": {
425
+ "name": "scope",
426
+ "type": "text",
427
+ "primaryKey": false,
428
+ "notNull": false
429
+ },
430
+ "resource": {
431
+ "name": "resource",
432
+ "type": "text",
433
+ "primaryKey": false,
434
+ "notNull": false
435
+ },
436
+ "expires_at": {
437
+ "name": "expires_at",
438
+ "type": "timestamp",
439
+ "primaryKey": false,
440
+ "notNull": true
441
+ },
442
+ "consumed_at": {
443
+ "name": "consumed_at",
444
+ "type": "timestamp",
445
+ "primaryKey": false,
446
+ "notNull": false
447
+ },
448
+ "created_at": {
449
+ "name": "created_at",
450
+ "type": "timestamp",
451
+ "primaryKey": false,
452
+ "notNull": true,
453
+ "default": "now()"
454
+ }
455
+ },
456
+ "indexes": {
457
+ "oauth_auth_codes_by_expiry": {
458
+ "name": "oauth_auth_codes_by_expiry",
459
+ "columns": [
460
+ {
461
+ "expression": "expires_at",
462
+ "isExpression": false,
463
+ "asc": true,
464
+ "nulls": "last"
465
+ }
466
+ ],
467
+ "isUnique": false,
468
+ "concurrently": false,
469
+ "method": "btree",
470
+ "with": {}
471
+ }
472
+ },
473
+ "foreignKeys": {
474
+ "oauth_auth_codes_client_id_oauth_clients_client_id_fk": {
475
+ "name": "oauth_auth_codes_client_id_oauth_clients_client_id_fk",
476
+ "tableFrom": "oauth_auth_codes",
477
+ "tableTo": "oauth_clients",
478
+ "columnsFrom": [
479
+ "client_id"
480
+ ],
481
+ "columnsTo": [
482
+ "client_id"
483
+ ],
484
+ "onDelete": "no action",
485
+ "onUpdate": "no action"
486
+ },
487
+ "oauth_auth_codes_user_id_users_id_fk": {
488
+ "name": "oauth_auth_codes_user_id_users_id_fk",
489
+ "tableFrom": "oauth_auth_codes",
490
+ "tableTo": "users",
491
+ "columnsFrom": [
492
+ "user_id"
493
+ ],
494
+ "columnsTo": [
495
+ "id"
496
+ ],
497
+ "onDelete": "no action",
498
+ "onUpdate": "no action"
499
+ }
500
+ },
501
+ "compositePrimaryKeys": {},
502
+ "uniqueConstraints": {
503
+ "oauth_auth_codes_code_hash_unique": {
504
+ "name": "oauth_auth_codes_code_hash_unique",
505
+ "nullsNotDistinct": false,
506
+ "columns": [
507
+ "code_hash"
508
+ ]
509
+ }
510
+ },
511
+ "policies": {},
512
+ "checkConstraints": {},
513
+ "isRLSEnabled": false
514
+ },
515
+ "public.oauth_clients": {
516
+ "name": "oauth_clients",
517
+ "schema": "",
518
+ "columns": {
519
+ "client_id": {
520
+ "name": "client_id",
521
+ "type": "text",
522
+ "primaryKey": true,
523
+ "notNull": true
524
+ },
525
+ "client_secret_encrypted": {
526
+ "name": "client_secret_encrypted",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": false
530
+ },
531
+ "client_secret_expires_at": {
532
+ "name": "client_secret_expires_at",
533
+ "type": "timestamp",
534
+ "primaryKey": false,
535
+ "notNull": false
536
+ },
537
+ "redirect_uris": {
538
+ "name": "redirect_uris",
539
+ "type": "jsonb",
540
+ "primaryKey": false,
541
+ "notNull": true,
542
+ "default": "'[]'::jsonb"
543
+ },
544
+ "token_endpoint_auth_method": {
545
+ "name": "token_endpoint_auth_method",
546
+ "type": "text",
547
+ "primaryKey": false,
548
+ "notNull": true,
549
+ "default": "'none'"
550
+ },
551
+ "client_name": {
552
+ "name": "client_name",
553
+ "type": "text",
554
+ "primaryKey": false,
555
+ "notNull": false
556
+ },
557
+ "metadata": {
558
+ "name": "metadata",
559
+ "type": "jsonb",
560
+ "primaryKey": false,
561
+ "notNull": true,
562
+ "default": "'{}'::jsonb"
563
+ },
564
+ "created_at": {
565
+ "name": "created_at",
566
+ "type": "timestamp",
567
+ "primaryKey": false,
568
+ "notNull": true,
569
+ "default": "now()"
570
+ }
571
+ },
572
+ "indexes": {},
573
+ "foreignKeys": {},
574
+ "compositePrimaryKeys": {},
575
+ "uniqueConstraints": {},
576
+ "policies": {},
577
+ "checkConstraints": {},
578
+ "isRLSEnabled": false
579
+ },
580
+ "public.oauth_tokens": {
581
+ "name": "oauth_tokens",
582
+ "schema": "",
583
+ "columns": {
584
+ "id": {
585
+ "name": "id",
586
+ "type": "uuid",
587
+ "primaryKey": true,
588
+ "notNull": true,
589
+ "default": "gen_random_uuid()"
590
+ },
591
+ "access_token_hash": {
592
+ "name": "access_token_hash",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": true
596
+ },
597
+ "refresh_token_hash": {
598
+ "name": "refresh_token_hash",
599
+ "type": "text",
600
+ "primaryKey": false,
601
+ "notNull": false
602
+ },
603
+ "client_id": {
604
+ "name": "client_id",
605
+ "type": "text",
606
+ "primaryKey": false,
607
+ "notNull": true
608
+ },
609
+ "user_id": {
610
+ "name": "user_id",
611
+ "type": "uuid",
612
+ "primaryKey": false,
613
+ "notNull": true
614
+ },
615
+ "scope": {
616
+ "name": "scope",
617
+ "type": "text",
618
+ "primaryKey": false,
619
+ "notNull": false
620
+ },
621
+ "resource": {
622
+ "name": "resource",
623
+ "type": "text",
624
+ "primaryKey": false,
625
+ "notNull": false
626
+ },
627
+ "expires_at": {
628
+ "name": "expires_at",
629
+ "type": "timestamp",
630
+ "primaryKey": false,
631
+ "notNull": true
632
+ },
633
+ "refresh_expires_at": {
634
+ "name": "refresh_expires_at",
635
+ "type": "timestamp",
636
+ "primaryKey": false,
637
+ "notNull": false
638
+ },
639
+ "revoked_at": {
640
+ "name": "revoked_at",
641
+ "type": "timestamp",
642
+ "primaryKey": false,
643
+ "notNull": false
644
+ },
645
+ "last_used_at": {
646
+ "name": "last_used_at",
647
+ "type": "timestamp",
648
+ "primaryKey": false,
649
+ "notNull": false
650
+ },
651
+ "created_at": {
652
+ "name": "created_at",
653
+ "type": "timestamp",
654
+ "primaryKey": false,
655
+ "notNull": true,
656
+ "default": "now()"
657
+ }
658
+ },
659
+ "indexes": {
660
+ "oauth_tokens_by_user": {
661
+ "name": "oauth_tokens_by_user",
662
+ "columns": [
663
+ {
664
+ "expression": "user_id",
665
+ "isExpression": false,
666
+ "asc": true,
667
+ "nulls": "last"
668
+ }
669
+ ],
670
+ "isUnique": false,
671
+ "concurrently": false,
672
+ "method": "btree",
673
+ "with": {}
674
+ },
675
+ "oauth_tokens_by_expiry": {
676
+ "name": "oauth_tokens_by_expiry",
677
+ "columns": [
678
+ {
679
+ "expression": "expires_at",
680
+ "isExpression": false,
681
+ "asc": true,
682
+ "nulls": "last"
683
+ }
684
+ ],
685
+ "isUnique": false,
686
+ "concurrently": false,
687
+ "method": "btree",
688
+ "with": {}
689
+ }
690
+ },
691
+ "foreignKeys": {
692
+ "oauth_tokens_client_id_oauth_clients_client_id_fk": {
693
+ "name": "oauth_tokens_client_id_oauth_clients_client_id_fk",
694
+ "tableFrom": "oauth_tokens",
695
+ "tableTo": "oauth_clients",
696
+ "columnsFrom": [
697
+ "client_id"
698
+ ],
699
+ "columnsTo": [
700
+ "client_id"
701
+ ],
702
+ "onDelete": "no action",
703
+ "onUpdate": "no action"
704
+ },
705
+ "oauth_tokens_user_id_users_id_fk": {
706
+ "name": "oauth_tokens_user_id_users_id_fk",
707
+ "tableFrom": "oauth_tokens",
708
+ "tableTo": "users",
709
+ "columnsFrom": [
710
+ "user_id"
711
+ ],
712
+ "columnsTo": [
713
+ "id"
714
+ ],
715
+ "onDelete": "no action",
716
+ "onUpdate": "no action"
717
+ }
718
+ },
719
+ "compositePrimaryKeys": {},
720
+ "uniqueConstraints": {
721
+ "oauth_tokens_access_token_hash_unique": {
722
+ "name": "oauth_tokens_access_token_hash_unique",
723
+ "nullsNotDistinct": false,
724
+ "columns": [
725
+ "access_token_hash"
726
+ ]
727
+ },
728
+ "oauth_tokens_refresh_token_hash_unique": {
729
+ "name": "oauth_tokens_refresh_token_hash_unique",
730
+ "nullsNotDistinct": false,
731
+ "columns": [
732
+ "refresh_token_hash"
733
+ ]
734
+ }
735
+ },
736
+ "policies": {},
737
+ "checkConstraints": {},
738
+ "isRLSEnabled": false
739
+ },
740
+ "public.pending_commits": {
741
+ "name": "pending_commits",
742
+ "schema": "",
743
+ "columns": {
744
+ "id": {
745
+ "name": "id",
746
+ "type": "uuid",
747
+ "primaryKey": true,
748
+ "notNull": true,
749
+ "default": "gen_random_uuid()"
750
+ },
751
+ "workspace_id": {
752
+ "name": "workspace_id",
753
+ "type": "text",
754
+ "primaryKey": false,
755
+ "notNull": true
756
+ },
757
+ "branch": {
758
+ "name": "branch",
759
+ "type": "text",
760
+ "primaryKey": false,
761
+ "notNull": true
762
+ },
763
+ "path": {
764
+ "name": "path",
765
+ "type": "text",
766
+ "primaryKey": false,
767
+ "notNull": true
768
+ },
769
+ "author_email": {
770
+ "name": "author_email",
771
+ "type": "text",
772
+ "primaryKey": false,
773
+ "notNull": true
774
+ },
775
+ "author_name": {
776
+ "name": "author_name",
777
+ "type": "text",
778
+ "primaryKey": false,
779
+ "notNull": true
780
+ },
781
+ "queued_at": {
782
+ "name": "queued_at",
783
+ "type": "timestamp",
784
+ "primaryKey": false,
785
+ "notNull": true,
786
+ "default": "now()"
787
+ },
788
+ "status": {
789
+ "name": "status",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": true,
793
+ "default": "'pending'"
794
+ },
795
+ "attempts": {
796
+ "name": "attempts",
797
+ "type": "integer",
798
+ "primaryKey": false,
799
+ "notNull": true,
800
+ "default": 0
801
+ },
802
+ "recovery_agent_runs": {
803
+ "name": "recovery_agent_runs",
804
+ "type": "integer",
805
+ "primaryKey": false,
806
+ "notNull": true,
807
+ "default": 0
808
+ },
809
+ "last_attempted_at": {
810
+ "name": "last_attempted_at",
811
+ "type": "timestamp",
812
+ "primaryKey": false,
813
+ "notNull": false
814
+ },
815
+ "last_error": {
816
+ "name": "last_error",
817
+ "type": "text",
818
+ "primaryKey": false,
819
+ "notNull": false
820
+ }
821
+ },
822
+ "indexes": {
823
+ "pending_commits_by_workspace_queued": {
824
+ "name": "pending_commits_by_workspace_queued",
825
+ "columns": [
826
+ {
827
+ "expression": "workspace_id",
828
+ "isExpression": false,
829
+ "asc": true,
830
+ "nulls": "last"
831
+ },
832
+ {
833
+ "expression": "queued_at",
834
+ "isExpression": false,
835
+ "asc": true,
836
+ "nulls": "last"
837
+ }
838
+ ],
839
+ "isUnique": false,
840
+ "concurrently": false,
841
+ "method": "btree",
842
+ "with": {}
843
+ },
844
+ "pending_commits_by_status": {
845
+ "name": "pending_commits_by_status",
846
+ "columns": [
847
+ {
848
+ "expression": "status",
849
+ "isExpression": false,
850
+ "asc": true,
851
+ "nulls": "last"
852
+ },
853
+ {
854
+ "expression": "last_attempted_at",
855
+ "isExpression": false,
856
+ "asc": true,
857
+ "nulls": "last"
858
+ }
859
+ ],
860
+ "isUnique": false,
861
+ "concurrently": false,
862
+ "method": "btree",
863
+ "with": {}
864
+ },
865
+ "pending_commits_by_status_only": {
866
+ "name": "pending_commits_by_status_only",
867
+ "columns": [
868
+ {
869
+ "expression": "status",
870
+ "isExpression": false,
871
+ "asc": true,
872
+ "nulls": "last"
873
+ }
874
+ ],
875
+ "isUnique": false,
876
+ "concurrently": false,
877
+ "method": "btree",
878
+ "with": {}
879
+ }
880
+ },
881
+ "foreignKeys": {},
882
+ "compositePrimaryKeys": {},
883
+ "uniqueConstraints": {},
884
+ "policies": {},
885
+ "checkConstraints": {
886
+ "pending_commits_status": {
887
+ "name": "pending_commits_status",
888
+ "value": "\"pending_commits\".\"status\" IN ('pending', 'running', 'needs_attention')"
889
+ }
890
+ },
891
+ "isRLSEnabled": false
892
+ },
893
+ "public.pr_comments": {
894
+ "name": "pr_comments",
895
+ "schema": "",
896
+ "columns": {
897
+ "id": {
898
+ "name": "id",
899
+ "type": "uuid",
900
+ "primaryKey": true,
901
+ "notNull": true,
902
+ "default": "gen_random_uuid()"
903
+ },
904
+ "pr_number": {
905
+ "name": "pr_number",
906
+ "type": "integer",
907
+ "primaryKey": false,
908
+ "notNull": true
909
+ },
910
+ "author_email": {
911
+ "name": "author_email",
912
+ "type": "text",
913
+ "primaryKey": false,
914
+ "notNull": true
915
+ },
916
+ "author_name": {
917
+ "name": "author_name",
918
+ "type": "text",
919
+ "primaryKey": false,
920
+ "notNull": true
921
+ },
922
+ "path": {
923
+ "name": "path",
924
+ "type": "text",
925
+ "primaryKey": false,
926
+ "notNull": false
927
+ },
928
+ "line": {
929
+ "name": "line",
930
+ "type": "integer",
931
+ "primaryKey": false,
932
+ "notNull": false
933
+ },
934
+ "head_sha": {
935
+ "name": "head_sha",
936
+ "type": "text",
937
+ "primaryKey": false,
938
+ "notNull": true
939
+ },
940
+ "body": {
941
+ "name": "body",
942
+ "type": "text",
943
+ "primaryKey": false,
944
+ "notNull": true
945
+ },
946
+ "parent_id": {
947
+ "name": "parent_id",
948
+ "type": "uuid",
949
+ "primaryKey": false,
950
+ "notNull": false
951
+ },
952
+ "created_at": {
953
+ "name": "created_at",
954
+ "type": "timestamp",
955
+ "primaryKey": false,
956
+ "notNull": true,
957
+ "default": "now()"
958
+ },
959
+ "updated_at": {
960
+ "name": "updated_at",
961
+ "type": "timestamp",
962
+ "primaryKey": false,
963
+ "notNull": false
964
+ }
965
+ },
966
+ "indexes": {
967
+ "pr_comments_by_pr": {
968
+ "name": "pr_comments_by_pr",
969
+ "columns": [
970
+ {
971
+ "expression": "pr_number",
972
+ "isExpression": false,
973
+ "asc": true,
974
+ "nulls": "last"
975
+ }
976
+ ],
977
+ "isUnique": false,
978
+ "concurrently": false,
979
+ "method": "btree",
980
+ "with": {}
981
+ },
982
+ "pr_comments_by_thread": {
983
+ "name": "pr_comments_by_thread",
984
+ "columns": [
985
+ {
986
+ "expression": "pr_number",
987
+ "isExpression": false,
988
+ "asc": true,
989
+ "nulls": "last"
990
+ },
991
+ {
992
+ "expression": "path",
993
+ "isExpression": false,
994
+ "asc": true,
995
+ "nulls": "last"
996
+ },
997
+ {
998
+ "expression": "line",
999
+ "isExpression": false,
1000
+ "asc": true,
1001
+ "nulls": "last"
1002
+ }
1003
+ ],
1004
+ "isUnique": false,
1005
+ "concurrently": false,
1006
+ "method": "btree",
1007
+ "with": {}
1008
+ }
1009
+ },
1010
+ "foreignKeys": {},
1011
+ "compositePrimaryKeys": {},
1012
+ "uniqueConstraints": {},
1013
+ "policies": {},
1014
+ "checkConstraints": {},
1015
+ "isRLSEnabled": false
1016
+ },
1017
+ "public.pr_file_approvals": {
1018
+ "name": "pr_file_approvals",
1019
+ "schema": "",
1020
+ "columns": {
1021
+ "id": {
1022
+ "name": "id",
1023
+ "type": "uuid",
1024
+ "primaryKey": true,
1025
+ "notNull": true,
1026
+ "default": "gen_random_uuid()"
1027
+ },
1028
+ "pr_number": {
1029
+ "name": "pr_number",
1030
+ "type": "integer",
1031
+ "primaryKey": false,
1032
+ "notNull": true
1033
+ },
1034
+ "path": {
1035
+ "name": "path",
1036
+ "type": "text",
1037
+ "primaryKey": false,
1038
+ "notNull": true
1039
+ },
1040
+ "approver_email": {
1041
+ "name": "approver_email",
1042
+ "type": "text",
1043
+ "primaryKey": false,
1044
+ "notNull": true
1045
+ },
1046
+ "approver_name": {
1047
+ "name": "approver_name",
1048
+ "type": "text",
1049
+ "primaryKey": false,
1050
+ "notNull": true
1051
+ },
1052
+ "head_sha": {
1053
+ "name": "head_sha",
1054
+ "type": "text",
1055
+ "primaryKey": false,
1056
+ "notNull": true
1057
+ },
1058
+ "approved_at": {
1059
+ "name": "approved_at",
1060
+ "type": "timestamp",
1061
+ "primaryKey": false,
1062
+ "notNull": true,
1063
+ "default": "now()"
1064
+ }
1065
+ },
1066
+ "indexes": {
1067
+ "pr_file_approvals_unq": {
1068
+ "name": "pr_file_approvals_unq",
1069
+ "columns": [
1070
+ {
1071
+ "expression": "pr_number",
1072
+ "isExpression": false,
1073
+ "asc": true,
1074
+ "nulls": "last"
1075
+ },
1076
+ {
1077
+ "expression": "path",
1078
+ "isExpression": false,
1079
+ "asc": true,
1080
+ "nulls": "last"
1081
+ },
1082
+ {
1083
+ "expression": "approver_email",
1084
+ "isExpression": false,
1085
+ "asc": true,
1086
+ "nulls": "last"
1087
+ },
1088
+ {
1089
+ "expression": "head_sha",
1090
+ "isExpression": false,
1091
+ "asc": true,
1092
+ "nulls": "last"
1093
+ }
1094
+ ],
1095
+ "isUnique": true,
1096
+ "concurrently": false,
1097
+ "method": "btree",
1098
+ "with": {}
1099
+ },
1100
+ "pr_file_approvals_by_pr": {
1101
+ "name": "pr_file_approvals_by_pr",
1102
+ "columns": [
1103
+ {
1104
+ "expression": "pr_number",
1105
+ "isExpression": false,
1106
+ "asc": true,
1107
+ "nulls": "last"
1108
+ }
1109
+ ],
1110
+ "isUnique": false,
1111
+ "concurrently": false,
1112
+ "method": "btree",
1113
+ "with": {}
1114
+ }
1115
+ },
1116
+ "foreignKeys": {},
1117
+ "compositePrimaryKeys": {},
1118
+ "uniqueConstraints": {},
1119
+ "policies": {},
1120
+ "checkConstraints": {},
1121
+ "isRLSEnabled": false
1122
+ },
1123
+ "public.pr_merge_log": {
1124
+ "name": "pr_merge_log",
1125
+ "schema": "",
1126
+ "columns": {
1127
+ "id": {
1128
+ "name": "id",
1129
+ "type": "uuid",
1130
+ "primaryKey": true,
1131
+ "notNull": true,
1132
+ "default": "gen_random_uuid()"
1133
+ },
1134
+ "pr_number": {
1135
+ "name": "pr_number",
1136
+ "type": "integer",
1137
+ "primaryKey": false,
1138
+ "notNull": true
1139
+ },
1140
+ "triggered_by_email": {
1141
+ "name": "triggered_by_email",
1142
+ "type": "text",
1143
+ "primaryKey": false,
1144
+ "notNull": true
1145
+ },
1146
+ "triggered_by_name": {
1147
+ "name": "triggered_by_name",
1148
+ "type": "text",
1149
+ "primaryKey": false,
1150
+ "notNull": true
1151
+ },
1152
+ "head_sha_at_merge": {
1153
+ "name": "head_sha_at_merge",
1154
+ "type": "text",
1155
+ "primaryKey": false,
1156
+ "notNull": true
1157
+ },
1158
+ "merge_method": {
1159
+ "name": "merge_method",
1160
+ "type": "text",
1161
+ "primaryKey": false,
1162
+ "notNull": true
1163
+ },
1164
+ "succeeded": {
1165
+ "name": "succeeded",
1166
+ "type": "boolean",
1167
+ "primaryKey": false,
1168
+ "notNull": true
1169
+ },
1170
+ "error": {
1171
+ "name": "error",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": false
1175
+ },
1176
+ "started_at": {
1177
+ "name": "started_at",
1178
+ "type": "timestamp",
1179
+ "primaryKey": false,
1180
+ "notNull": true,
1181
+ "default": "now()"
1182
+ },
1183
+ "completed_at": {
1184
+ "name": "completed_at",
1185
+ "type": "timestamp",
1186
+ "primaryKey": false,
1187
+ "notNull": false
1188
+ }
1189
+ },
1190
+ "indexes": {
1191
+ "pr_merge_log_by_pr": {
1192
+ "name": "pr_merge_log_by_pr",
1193
+ "columns": [
1194
+ {
1195
+ "expression": "pr_number",
1196
+ "isExpression": false,
1197
+ "asc": true,
1198
+ "nulls": "last"
1199
+ }
1200
+ ],
1201
+ "isUnique": false,
1202
+ "concurrently": false,
1203
+ "method": "btree",
1204
+ "with": {}
1205
+ }
1206
+ },
1207
+ "foreignKeys": {},
1208
+ "compositePrimaryKeys": {},
1209
+ "uniqueConstraints": {},
1210
+ "policies": {},
1211
+ "checkConstraints": {},
1212
+ "isRLSEnabled": false
1213
+ },
1214
+ "public.secrets": {
1215
+ "name": "secrets",
1216
+ "schema": "",
1217
+ "columns": {
1218
+ "id": {
1219
+ "name": "id",
1220
+ "type": "uuid",
1221
+ "primaryKey": true,
1222
+ "notNull": true,
1223
+ "default": "gen_random_uuid()"
1224
+ },
1225
+ "user_id": {
1226
+ "name": "user_id",
1227
+ "type": "uuid",
1228
+ "primaryKey": false,
1229
+ "notNull": false
1230
+ },
1231
+ "key": {
1232
+ "name": "key",
1233
+ "type": "text",
1234
+ "primaryKey": false,
1235
+ "notNull": true
1236
+ },
1237
+ "kind": {
1238
+ "name": "kind",
1239
+ "type": "text",
1240
+ "primaryKey": false,
1241
+ "notNull": true,
1242
+ "default": "'static'"
1243
+ },
1244
+ "label": {
1245
+ "name": "label",
1246
+ "type": "text",
1247
+ "primaryKey": false,
1248
+ "notNull": false
1249
+ },
1250
+ "value_encrypted": {
1251
+ "name": "value_encrypted",
1252
+ "type": "text",
1253
+ "primaryKey": false,
1254
+ "notNull": true
1255
+ },
1256
+ "oauth_meta": {
1257
+ "name": "oauth_meta",
1258
+ "type": "jsonb",
1259
+ "primaryKey": false,
1260
+ "notNull": false
1261
+ },
1262
+ "created_at": {
1263
+ "name": "created_at",
1264
+ "type": "timestamp",
1265
+ "primaryKey": false,
1266
+ "notNull": true,
1267
+ "default": "now()"
1268
+ },
1269
+ "updated_at": {
1270
+ "name": "updated_at",
1271
+ "type": "timestamp",
1272
+ "primaryKey": false,
1273
+ "notNull": true,
1274
+ "default": "now()"
1275
+ }
1276
+ },
1277
+ "indexes": {
1278
+ "secrets_by_user": {
1279
+ "name": "secrets_by_user",
1280
+ "columns": [
1281
+ {
1282
+ "expression": "user_id",
1283
+ "isExpression": false,
1284
+ "asc": true,
1285
+ "nulls": "last"
1286
+ }
1287
+ ],
1288
+ "isUnique": false,
1289
+ "concurrently": false,
1290
+ "method": "btree",
1291
+ "with": {}
1292
+ },
1293
+ "secrets_user_key_unq": {
1294
+ "name": "secrets_user_key_unq",
1295
+ "columns": [
1296
+ {
1297
+ "expression": "user_id",
1298
+ "isExpression": false,
1299
+ "asc": true,
1300
+ "nulls": "last"
1301
+ },
1302
+ {
1303
+ "expression": "key",
1304
+ "isExpression": false,
1305
+ "asc": true,
1306
+ "nulls": "last"
1307
+ }
1308
+ ],
1309
+ "isUnique": true,
1310
+ "concurrently": false,
1311
+ "method": "btree",
1312
+ "with": {}
1313
+ },
1314
+ "secrets_shared_key_unq": {
1315
+ "name": "secrets_shared_key_unq",
1316
+ "columns": [
1317
+ {
1318
+ "expression": "key",
1319
+ "isExpression": false,
1320
+ "asc": true,
1321
+ "nulls": "last"
1322
+ }
1323
+ ],
1324
+ "isUnique": true,
1325
+ "where": "\"secrets\".\"user_id\" is null",
1326
+ "concurrently": false,
1327
+ "method": "btree",
1328
+ "with": {}
1329
+ }
1330
+ },
1331
+ "foreignKeys": {
1332
+ "secrets_user_id_users_id_fk": {
1333
+ "name": "secrets_user_id_users_id_fk",
1334
+ "tableFrom": "secrets",
1335
+ "tableTo": "users",
1336
+ "columnsFrom": [
1337
+ "user_id"
1338
+ ],
1339
+ "columnsTo": [
1340
+ "id"
1341
+ ],
1342
+ "onDelete": "cascade",
1343
+ "onUpdate": "no action"
1344
+ }
1345
+ },
1346
+ "compositePrimaryKeys": {},
1347
+ "uniqueConstraints": {},
1348
+ "policies": {},
1349
+ "checkConstraints": {},
1350
+ "isRLSEnabled": false
1351
+ },
1352
+ "public.session_ontology_touches": {
1353
+ "name": "session_ontology_touches",
1354
+ "schema": "",
1355
+ "columns": {
1356
+ "session_id": {
1357
+ "name": "session_id",
1358
+ "type": "text",
1359
+ "primaryKey": false,
1360
+ "notNull": true
1361
+ },
1362
+ "ontology": {
1363
+ "name": "ontology",
1364
+ "type": "text",
1365
+ "primaryKey": false,
1366
+ "notNull": true
1367
+ },
1368
+ "touched_at": {
1369
+ "name": "touched_at",
1370
+ "type": "timestamp",
1371
+ "primaryKey": false,
1372
+ "notNull": true,
1373
+ "default": "now()"
1374
+ }
1375
+ },
1376
+ "indexes": {
1377
+ "session_ontology_touches_by_touched_at": {
1378
+ "name": "session_ontology_touches_by_touched_at",
1379
+ "columns": [
1380
+ {
1381
+ "expression": "touched_at",
1382
+ "isExpression": false,
1383
+ "asc": true,
1384
+ "nulls": "last"
1385
+ }
1386
+ ],
1387
+ "isUnique": false,
1388
+ "concurrently": false,
1389
+ "method": "btree",
1390
+ "with": {}
1391
+ }
1392
+ },
1393
+ "foreignKeys": {},
1394
+ "compositePrimaryKeys": {
1395
+ "session_ontology_touches_session_id_ontology_pk": {
1396
+ "name": "session_ontology_touches_session_id_ontology_pk",
1397
+ "columns": [
1398
+ "session_id",
1399
+ "ontology"
1400
+ ]
1401
+ }
1402
+ },
1403
+ "uniqueConstraints": {},
1404
+ "policies": {},
1405
+ "checkConstraints": {},
1406
+ "isRLSEnabled": false
1407
+ },
1408
+ "public.users": {
1409
+ "name": "users",
1410
+ "schema": "",
1411
+ "columns": {
1412
+ "id": {
1413
+ "name": "id",
1414
+ "type": "uuid",
1415
+ "primaryKey": true,
1416
+ "notNull": true,
1417
+ "default": "gen_random_uuid()"
1418
+ },
1419
+ "email": {
1420
+ "name": "email",
1421
+ "type": "text",
1422
+ "primaryKey": false,
1423
+ "notNull": true
1424
+ },
1425
+ "name": {
1426
+ "name": "name",
1427
+ "type": "text",
1428
+ "primaryKey": false,
1429
+ "notNull": true
1430
+ },
1431
+ "avatar_url": {
1432
+ "name": "avatar_url",
1433
+ "type": "text",
1434
+ "primaryKey": false,
1435
+ "notNull": false
1436
+ },
1437
+ "created_at": {
1438
+ "name": "created_at",
1439
+ "type": "timestamp",
1440
+ "primaryKey": false,
1441
+ "notNull": true,
1442
+ "default": "now()"
1443
+ },
1444
+ "updated_at": {
1445
+ "name": "updated_at",
1446
+ "type": "timestamp",
1447
+ "primaryKey": false,
1448
+ "notNull": true,
1449
+ "default": "now()"
1450
+ }
1451
+ },
1452
+ "indexes": {},
1453
+ "foreignKeys": {},
1454
+ "compositePrimaryKeys": {},
1455
+ "uniqueConstraints": {
1456
+ "users_email_unique": {
1457
+ "name": "users_email_unique",
1458
+ "nullsNotDistinct": false,
1459
+ "columns": [
1460
+ "email"
1461
+ ]
1462
+ }
1463
+ },
1464
+ "policies": {},
1465
+ "checkConstraints": {},
1466
+ "isRLSEnabled": false
1467
+ }
1468
+ },
1469
+ "enums": {},
1470
+ "schemas": {},
1471
+ "sequences": {},
1472
+ "roles": {},
1473
+ "policies": {},
1474
+ "views": {},
1475
+ "_meta": {
1476
+ "columns": {},
1477
+ "schemas": {},
1478
+ "tables": {}
1479
+ }
1480
1480
  }