@jant/core 0.6.14 → 0.6.15

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 (311) hide show
  1. package/bin/commands/import-site.js +81 -13
  2. package/bin/commands/migrate.js +55 -0
  3. package/bin/commands/posts/rebuild-html.js +184 -0
  4. package/bin/commands/site/snapshot/import.js +14 -10
  5. package/bin/lib/d1-query.js +23 -5
  6. package/bin/lib/migration-runner.js +29 -7
  7. package/bin/lib/node-database.js +32 -0
  8. package/bin/lib/site-snapshot.js +347 -46
  9. package/bin/lib/sql-export.js +1 -1
  10. package/bin/lib/thread-collection-migration.js +326 -0
  11. package/dist/app-BxCOR3Uc.js +6 -0
  12. package/dist/{app-2i7-WQHg.js → app-C-oi_t8W.js} +7408 -6343
  13. package/dist/client/.vite/manifest.json +3 -3
  14. package/dist/client/_assets/client-B_eGKN5p.css +2 -0
  15. package/dist/client/_assets/{client-BvID5ucz.js → client-DxY5BFe8.js} +58 -37
  16. package/dist/client/_assets/client-auth-CakPESv9.js +5533 -0
  17. package/dist/{export-DWn149b7.js → export-CsFx6F_M.js} +1259 -125
  18. package/dist/{github-sync-Ckk0sJxK.js → github-sync-Cq1pzzOI.js} +1 -1
  19. package/dist/{github-sync-C0zyF6XS.js → github-sync-ppWXN3jb.js} +2 -2
  20. package/dist/index.js +3 -3
  21. package/dist/node.js +5 -5
  22. package/package.json +11 -10
  23. package/src/__tests__/bin/posts-rebuild-html.test.ts +137 -0
  24. package/src/__tests__/dev-navigation-defaults.test.ts +22 -0
  25. package/src/__tests__/export-hugo-build.test.ts +63 -4
  26. package/src/__tests__/export-import-roundtrip.test.ts +6 -4
  27. package/src/__tests__/export-service.test.ts +142 -9
  28. package/src/__tests__/helpers/app.ts +3 -0
  29. package/src/__tests__/helpers/export-fixtures.ts +2 -0
  30. package/src/__tests__/import-site-command.test.ts +65 -0
  31. package/src/__tests__/vite-config.test.ts +45 -0
  32. package/src/app.tsx +16 -3
  33. package/src/client/__tests__/collection-created-notice.test.ts +36 -0
  34. package/src/client/__tests__/collection-form-bridge.test.ts +10 -1
  35. package/src/client/__tests__/collection-page-actions.test.ts +71 -2
  36. package/src/client/__tests__/compose-bridge.test.ts +64 -0
  37. package/src/client/__tests__/feed-video-player.test.ts +16 -1
  38. package/src/client/__tests__/footnote-rail.test.ts +472 -0
  39. package/src/client/__tests__/hydrate-partial.test.ts +3 -0
  40. package/src/client/__tests__/toast.test.ts +18 -1
  41. package/src/client/collection-created-notice.ts +66 -0
  42. package/src/client/collection-form-bridge.ts +17 -0
  43. package/src/client/collection-navigation.ts +44 -0
  44. package/src/client/collection-page-actions.ts +57 -1
  45. package/src/client/components/__tests__/jant-collection-directory.test.ts +155 -6
  46. package/src/client/components/__tests__/jant-compose-dialog.test.ts +370 -5
  47. package/src/client/components/__tests__/jant-compose-editor.test.ts +97 -0
  48. package/src/client/components/__tests__/jant-compose-fullscreen.test.ts +104 -0
  49. package/src/client/components/__tests__/jant-config-editor.test.ts +405 -0
  50. package/src/client/components/__tests__/jant-media-lightbox.test.ts +121 -0
  51. package/src/client/components/__tests__/jant-nav-manager.test.ts +538 -2
  52. package/src/client/components/__tests__/jant-post-form.test.ts +2 -2
  53. package/src/client/components/__tests__/jant-post-menu.test.ts +47 -5
  54. package/src/client/components/__tests__/jant-settings-avatar.test.ts +2 -2
  55. package/src/client/components/__tests__/jant-settings-general.test.ts +3 -3
  56. package/src/client/components/collection-manager-types.ts +9 -3
  57. package/src/client/components/compose-types.ts +8 -0
  58. package/src/client/components/jant-collection-directory.ts +165 -30
  59. package/src/client/components/jant-command-palette.ts +2 -1
  60. package/src/client/components/jant-compose-dialog.ts +85 -21
  61. package/src/client/components/jant-compose-editor.ts +13 -7
  62. package/src/client/components/jant-compose-fullscreen.ts +24 -4
  63. package/src/client/components/jant-config-editor.ts +722 -0
  64. package/src/client/components/jant-media-lightbox.ts +100 -18
  65. package/src/client/components/jant-nav-manager.ts +1283 -54
  66. package/src/client/components/jant-post-form.ts +3 -3
  67. package/src/client/components/jant-post-menu.ts +86 -74
  68. package/src/client/components/nav-manager-types.ts +51 -2
  69. package/src/client/components/post-form-types.ts +1 -1
  70. package/src/client/compose-bridge.ts +4 -1
  71. package/src/client/feed-video-player.ts +62 -2
  72. package/src/client/footnote-rail.ts +478 -0
  73. package/src/client/hydrate-partial.ts +2 -0
  74. package/src/client/media-lightbox-events.ts +63 -0
  75. package/src/client/site-header-fragment.ts +38 -0
  76. package/src/client/tiptap/__tests__/blockquote-editing.test.ts +201 -0
  77. package/src/client/tiptap/__tests__/clear-formatting.test.ts +168 -0
  78. package/src/client/tiptap/__tests__/list-editing.test.ts +447 -0
  79. package/src/client/tiptap/__tests__/markdown-clipboard.test.ts +727 -4
  80. package/src/client/tiptap/__tests__/table-controls.test.ts +263 -0
  81. package/src/client/tiptap/__tests__/table-size-picker.test.ts +179 -0
  82. package/src/client/tiptap/bubble-menu.ts +88 -10
  83. package/src/client/tiptap/continuous-lists.ts +102 -0
  84. package/src/client/tiptap/create-editor.ts +3 -0
  85. package/src/client/tiptap/extensions.ts +14 -5
  86. package/src/client/tiptap/markdown-clipboard.ts +608 -11
  87. package/src/client/tiptap/slash-commands.ts +8 -1
  88. package/src/client/tiptap/structural-keymap.ts +211 -0
  89. package/src/client/tiptap/tab-indent.ts +8 -22
  90. package/src/client/tiptap/table-control-labels.ts +30 -0
  91. package/src/client/tiptap/table-controls.ts +537 -0
  92. package/src/client/tiptap/table-size-picker.ts +254 -0
  93. package/src/client/toast.ts +8 -6
  94. package/src/client-auth.ts +1 -0
  95. package/src/client.ts +1 -0
  96. package/src/db/__tests__/d1-query.test.ts +43 -1
  97. package/src/db/__tests__/migration-runner.test.ts +63 -0
  98. package/src/db/__tests__/migrations.test.ts +469 -0
  99. package/src/db/__tests__/thread-collection-migration.test.ts +364 -0
  100. package/src/db/migrations/0027_old_blue_blade.sql +39 -0
  101. package/src/db/migrations/0028_superb_post.sql +2 -0
  102. package/src/db/migrations/0029_boring_magma.sql +1 -0
  103. package/src/db/migrations/0030_typical_vivisector.sql +50 -0
  104. package/src/db/migrations/meta/0027_snapshot.json +2511 -0
  105. package/src/db/migrations/meta/0028_snapshot.json +2511 -0
  106. package/src/db/migrations/meta/0029_snapshot.json +2519 -0
  107. package/src/db/migrations/meta/0030_snapshot.json +2541 -0
  108. package/src/db/migrations/meta/_journal.json +28 -0
  109. package/src/db/migrations/pg/0025_moaning_epoch.sql +39 -0
  110. package/src/db/migrations/pg/0026_talented_killer_shrike.sql +2 -0
  111. package/src/db/migrations/pg/0027_short_cannonball.sql +1 -0
  112. package/src/db/migrations/pg/0028_perfect_sharon_carter.sql +27 -0
  113. package/src/db/migrations/pg/meta/0025_snapshot.json +3204 -0
  114. package/src/db/migrations/pg/meta/0026_snapshot.json +3204 -0
  115. package/src/db/migrations/pg/meta/0027_snapshot.json +3211 -0
  116. package/src/db/migrations/pg/meta/0028_snapshot.json +3248 -0
  117. package/src/db/migrations/pg/meta/_journal.json +28 -0
  118. package/src/db/pg/schema.ts +28 -20
  119. package/src/db/rehearsal-fixtures/demo-current.json +39 -4
  120. package/src/db/rehearsal-fixtures/demo-current.sql +121 -6
  121. package/src/db/schema.ts +28 -20
  122. package/src/i18n/__tests__/detect.test.ts +8 -2
  123. package/src/i18n/detect.ts +14 -5
  124. package/src/i18n/locales/public/en.po +133 -30
  125. package/src/i18n/locales/public/en.ts +1 -1
  126. package/src/i18n/locales/public/zh-Hans.po +128 -25
  127. package/src/i18n/locales/public/zh-Hans.ts +1 -1
  128. package/src/i18n/locales/public/zh-Hant.po +128 -25
  129. package/src/i18n/locales/public/zh-Hant.ts +1 -1
  130. package/src/i18n/locales/settings/en.po +513 -10
  131. package/src/i18n/locales/settings/en.ts +1 -1
  132. package/src/i18n/locales/settings/zh-Hans.po +515 -12
  133. package/src/i18n/locales/settings/zh-Hans.ts +1 -1
  134. package/src/i18n/locales/settings/zh-Hant.po +515 -12
  135. package/src/i18n/locales/settings/zh-Hant.ts +1 -1
  136. package/src/lib/__tests__/api-settings.test.ts +299 -0
  137. package/src/lib/__tests__/constants.test.ts +5 -0
  138. package/src/lib/__tests__/feed-policy.test.ts +25 -0
  139. package/src/lib/__tests__/footnotes-upgrade.test.ts +181 -0
  140. package/src/lib/__tests__/markdown-roundtrip-embed.test.ts +61 -0
  141. package/src/lib/__tests__/markdown-to-tiptap.test.ts +32 -4
  142. package/src/lib/__tests__/markdown.test.ts +8 -6
  143. package/src/lib/__tests__/navigation.test.ts +59 -2
  144. package/src/lib/__tests__/post-body-html.test.ts +176 -0
  145. package/src/lib/__tests__/post-display.test.ts +64 -0
  146. package/src/lib/__tests__/resolve-config.test.ts +113 -1
  147. package/src/lib/__tests__/summary.test.ts +82 -0
  148. package/src/lib/__tests__/timeline.test.ts +109 -70
  149. package/src/lib/__tests__/timezones.test.ts +31 -3
  150. package/src/lib/__tests__/tiptap-render.test.ts +268 -9
  151. package/src/lib/__tests__/tiptap-to-markdown.test.ts +6 -0
  152. package/src/lib/__tests__/view.test.ts +53 -0
  153. package/src/lib/__tests__/worker-response-cache.test.ts +18 -1
  154. package/src/lib/api-settings.ts +239 -12
  155. package/src/lib/collection-sort.ts +7 -5
  156. package/src/lib/constants.ts +2 -0
  157. package/src/lib/feed-path.ts +25 -0
  158. package/src/lib/feed-policy.ts +64 -0
  159. package/src/lib/footnotes.ts +264 -0
  160. package/src/lib/github-sync-site-config.ts +2 -0
  161. package/src/lib/hugo-markdown.ts +10 -3
  162. package/src/lib/jant-branding.ts +1 -0
  163. package/src/lib/markdown-manager.ts +188 -5
  164. package/src/lib/markdown.ts +10 -3
  165. package/src/lib/navigation.ts +16 -3
  166. package/src/lib/post-body-html.ts +131 -0
  167. package/src/lib/post-display.ts +7 -1
  168. package/src/lib/render.tsx +9 -2
  169. package/src/lib/resolve-config.ts +100 -16
  170. package/src/lib/schemas.ts +133 -1
  171. package/src/lib/settings-paths.ts +5 -0
  172. package/src/lib/site-skill.ts +78 -0
  173. package/src/lib/summary.ts +16 -5
  174. package/src/lib/timeline.ts +98 -122
  175. package/src/lib/timezones.ts +54 -14
  176. package/src/lib/tiptap-render.ts +355 -81
  177. package/src/lib/view.ts +30 -20
  178. package/src/lib/worker-response-cache.ts +11 -18
  179. package/src/middleware/__tests__/public-content-access.test.ts +91 -0
  180. package/src/middleware/config.ts +2 -2
  181. package/src/middleware/public-content-access.ts +87 -0
  182. package/src/node/__tests__/cli-export.test.ts +14 -0
  183. package/src/node/__tests__/cli-migrate.test.ts +6 -0
  184. package/src/node/__tests__/cli-site-snapshot.test.ts +205 -2
  185. package/src/node/__tests__/cli-snapshot-meta.test.ts +100 -0
  186. package/src/node/index.ts +2 -1
  187. package/src/preset.css +16 -2
  188. package/src/routes/__tests__/compose.test.ts +51 -0
  189. package/src/routes/__tests__/site-skill.test.ts +112 -0
  190. package/src/routes/api/__tests__/collections.test.ts +91 -19
  191. package/src/routes/api/__tests__/mcp.test.ts +65 -1
  192. package/src/routes/api/__tests__/nav-items.test.ts +91 -0
  193. package/src/routes/api/__tests__/public-access.test.ts +81 -0
  194. package/src/routes/api/__tests__/settings.test.ts +217 -0
  195. package/src/routes/api/collections.ts +22 -26
  196. package/src/routes/api/export.ts +2 -0
  197. package/src/routes/api/internal/__tests__/post-body-html.test.ts +163 -0
  198. package/src/routes/api/internal/__tests__/sites.test.ts +35 -2
  199. package/src/routes/api/internal/post-body-html.ts +43 -0
  200. package/src/routes/api/internal/sites.ts +24 -0
  201. package/src/routes/api/nav-items.ts +24 -1
  202. package/src/routes/api/posts.ts +2 -2
  203. package/src/routes/api/public/__tests__/archive.test.ts +35 -0
  204. package/src/routes/api/public/__tests__/posts.test.ts +208 -0
  205. package/src/routes/api/public/archive.ts +4 -0
  206. package/src/routes/api/public/posts.ts +41 -24
  207. package/src/routes/api/search.ts +3 -0
  208. package/src/routes/api/settings.ts +33 -0
  209. package/src/routes/auth/__tests__/setup.test.ts +7 -4
  210. package/src/routes/compose.tsx +2 -1
  211. package/src/routes/dash/settings.tsx +45 -2
  212. package/src/routes/feed/__tests__/feed.test.ts +210 -6
  213. package/src/routes/feed/feed.ts +23 -14
  214. package/src/routes/pages/__tests__/archive-params.test.ts +92 -3
  215. package/src/routes/pages/__tests__/collection-routing.test.ts +63 -5
  216. package/src/routes/pages/__tests__/collections.test.ts +9 -9
  217. package/src/routes/pages/__tests__/preview.test.ts +174 -0
  218. package/src/routes/pages/__tests__/search.test.ts +69 -0
  219. package/src/routes/pages/archive.tsx +27 -7
  220. package/src/routes/pages/collection.tsx +32 -19
  221. package/src/routes/pages/collections.tsx +6 -1
  222. package/src/routes/pages/page.tsx +83 -11
  223. package/src/routes/site-skill.ts +18 -0
  224. package/src/services/__tests__/auth.test.ts +7 -5
  225. package/src/services/__tests__/collection.test.ts +159 -44
  226. package/src/services/__tests__/navigation.test.ts +229 -21
  227. package/src/services/__tests__/post-timeline.test.ts +109 -30
  228. package/src/services/__tests__/post.test.ts +567 -5
  229. package/src/services/__tests__/search.test.ts +48 -1
  230. package/src/services/__tests__/settings.test.ts +8 -0
  231. package/src/services/__tests__/site-admin.test.ts +121 -1
  232. package/src/services/auth.ts +2 -2
  233. package/src/services/bootstrap.ts +3 -2
  234. package/src/services/collection.ts +226 -167
  235. package/src/services/export-theme/assets/client-site.css +1 -1
  236. package/src/services/export-theme/assets/client-site.js +46 -25
  237. package/src/services/export-theme/layouts/_default/list.html +18 -4
  238. package/src/services/export-theme/layouts/_default/rss.xml +8 -12
  239. package/src/services/export-theme/layouts/featured/list.html +5 -4
  240. package/src/services/export-theme/layouts/partials/featured-thread.html +56 -0
  241. package/src/services/export-theme/layouts/partials/footer.html +1 -1
  242. package/src/services/export-theme/layouts/partials/media-gallery.html +1 -0
  243. package/src/services/export-theme/styles/main.css +30 -2
  244. package/src/services/export.ts +91 -80
  245. package/src/services/mcp.ts +37 -27
  246. package/src/services/media.ts +1 -1
  247. package/src/services/navigation.ts +185 -46
  248. package/src/services/post.ts +874 -271
  249. package/src/services/search.ts +8 -2
  250. package/src/services/settings.ts +2 -10
  251. package/src/services/site-admin.ts +63 -43
  252. package/src/style-cjk-jp.css +1 -1
  253. package/src/style-cjk-kr.css +1 -1
  254. package/src/style-cjk-tc.css +1 -1
  255. package/src/style-cjk.css +1 -1
  256. package/src/styles/components.css +540 -0
  257. package/src/styles/site-media.css +111 -19
  258. package/src/styles/tokens.css +14 -9
  259. package/src/styles/ui.css +829 -29
  260. package/src/types/bindings.ts +3 -0
  261. package/src/types/config.ts +243 -12
  262. package/src/types/constants.ts +22 -1
  263. package/src/types/entities.ts +9 -8
  264. package/src/types/operations.ts +18 -10
  265. package/src/types/props.ts +8 -2
  266. package/src/types/raw-assets.d.ts +5 -0
  267. package/src/types/views.ts +16 -4
  268. package/src/ui/__tests__/font-themes.test.ts +42 -30
  269. package/src/ui/compose/ComposeDialog.tsx +92 -2
  270. package/src/ui/dash/appearance/NavigationContent.tsx +332 -4
  271. package/src/ui/dash/appearance/__tests__/NavigationContent.test.tsx +23 -0
  272. package/src/ui/dash/settings/ConfigEditorContent.tsx +578 -0
  273. package/src/ui/dash/settings/GeneralContent.tsx +15 -5
  274. package/src/ui/dash/settings/SettingsRootContent.tsx +21 -1
  275. package/src/ui/dash/settings/__tests__/ConfigEditorContent.test.tsx +98 -0
  276. package/src/ui/dash/settings/__tests__/SettingsRootContent.test.tsx +15 -0
  277. package/src/ui/feed/CuratedThreadPreview.tsx +16 -4
  278. package/src/ui/feed/LinkCard.tsx +2 -12
  279. package/src/ui/feed/NoteCard.tsx +10 -20
  280. package/src/ui/feed/QuoteCard.tsx +2 -12
  281. package/src/ui/feed/ThreadPreview.tsx +26 -34
  282. package/src/ui/feed/TimelineFeed.tsx +2 -2
  283. package/src/ui/feed/__tests__/thread-preview.test.ts +197 -56
  284. package/src/ui/feed/__tests__/timeline-cards.test.ts +178 -3
  285. package/src/ui/feed/thread-preview-state.ts +5 -7
  286. package/src/ui/font-themes.ts +74 -26
  287. package/src/ui/layouts/BaseLayout.tsx +22 -8
  288. package/src/ui/layouts/__tests__/BaseLayout.test.tsx +64 -1
  289. package/src/ui/pages/CollectionPage.tsx +101 -22
  290. package/src/ui/pages/CollectionsPage.tsx +3 -1
  291. package/src/ui/pages/PostPage.tsx +39 -12
  292. package/src/ui/pages/SearchPage.tsx +6 -14
  293. package/src/ui/pages/__tests__/ArchivePage.test.tsx +7 -0
  294. package/src/ui/pages/__tests__/PostPage.test.tsx +88 -0
  295. package/src/ui/shared/CollectionDirectory.tsx +13 -9
  296. package/src/ui/shared/CollectionsManager.tsx +17 -7
  297. package/src/ui/shared/DraftPreviewBar.tsx +33 -0
  298. package/src/ui/shared/HomePageBranding.tsx +2 -2
  299. package/src/ui/shared/MediaGallery.tsx +1 -0
  300. package/src/ui/shared/PostFooter.tsx +3 -1
  301. package/src/ui/shared/__tests__/home-page-branding.test.tsx +1 -1
  302. package/src/ui/shared/__tests__/media-gallery.test.ts +1 -0
  303. package/src/ui/shared/__tests__/navigation-labels.test.ts +2 -2
  304. package/src/ui/shared/__tests__/post-footer.test.ts +15 -0
  305. package/src/ui/shared/collection-management-labels.ts +33 -2
  306. package/src/ui/shared/navigation-labels.ts +2 -4
  307. package/src/ui/shared/post-article-attributes.ts +46 -0
  308. package/dist/app-DZDlmh7C.js +0 -6
  309. package/dist/client/_assets/client-Cevfpm8H.css +0 -2
  310. package/dist/client/_assets/client-auth-v3yvhbgZ.js +0 -4736
  311. package/src/client/tiptap/wrapping-input-rules.ts +0 -102
@@ -0,0 +1,3204 @@
1
+ {
2
+ "id": "1b60d2ba-4a60-4cab-ac80-4778ebab0a0e",
3
+ "prevId": "faf20770-d34c-4d1f-81c1-8c7d4a0f51e1",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.account": {
8
+ "name": "account",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "account_id": {
18
+ "name": "account_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "provider_id": {
24
+ "name": "provider_id",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "user_id": {
30
+ "name": "user_id",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "access_token": {
36
+ "name": "access_token",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "refresh_token": {
42
+ "name": "refresh_token",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "id_token": {
48
+ "name": "id_token",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": false
52
+ },
53
+ "access_token_expires_at": {
54
+ "name": "access_token_expires_at",
55
+ "type": "timestamp with time zone",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ },
59
+ "refresh_token_expires_at": {
60
+ "name": "refresh_token_expires_at",
61
+ "type": "timestamp with time zone",
62
+ "primaryKey": false,
63
+ "notNull": false
64
+ },
65
+ "scope": {
66
+ "name": "scope",
67
+ "type": "text",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "password": {
72
+ "name": "password",
73
+ "type": "text",
74
+ "primaryKey": false,
75
+ "notNull": false
76
+ },
77
+ "created_at": {
78
+ "name": "created_at",
79
+ "type": "timestamp with time zone",
80
+ "primaryKey": false,
81
+ "notNull": true
82
+ },
83
+ "updated_at": {
84
+ "name": "updated_at",
85
+ "type": "timestamp with time zone",
86
+ "primaryKey": false,
87
+ "notNull": true
88
+ }
89
+ },
90
+ "indexes": {},
91
+ "foreignKeys": {
92
+ "account_user_id_user_id_fk": {
93
+ "name": "account_user_id_user_id_fk",
94
+ "tableFrom": "account",
95
+ "tableTo": "user",
96
+ "columnsFrom": ["user_id"],
97
+ "columnsTo": ["id"],
98
+ "onDelete": "no action",
99
+ "onUpdate": "no action"
100
+ }
101
+ },
102
+ "compositePrimaryKeys": {},
103
+ "uniqueConstraints": {},
104
+ "policies": {},
105
+ "checkConstraints": {},
106
+ "isRLSEnabled": false
107
+ },
108
+ "public.api_token": {
109
+ "name": "api_token",
110
+ "schema": "",
111
+ "columns": {
112
+ "id": {
113
+ "name": "id",
114
+ "type": "text",
115
+ "primaryKey": true,
116
+ "notNull": true
117
+ },
118
+ "site_id": {
119
+ "name": "site_id",
120
+ "type": "text",
121
+ "primaryKey": false,
122
+ "notNull": true
123
+ },
124
+ "name": {
125
+ "name": "name",
126
+ "type": "text",
127
+ "primaryKey": false,
128
+ "notNull": true
129
+ },
130
+ "token_hash": {
131
+ "name": "token_hash",
132
+ "type": "text",
133
+ "primaryKey": false,
134
+ "notNull": true
135
+ },
136
+ "prefix": {
137
+ "name": "prefix",
138
+ "type": "text",
139
+ "primaryKey": false,
140
+ "notNull": true
141
+ },
142
+ "last_used_at": {
143
+ "name": "last_used_at",
144
+ "type": "integer",
145
+ "primaryKey": false,
146
+ "notNull": false
147
+ },
148
+ "created_at": {
149
+ "name": "created_at",
150
+ "type": "integer",
151
+ "primaryKey": false,
152
+ "notNull": true
153
+ },
154
+ "updated_at": {
155
+ "name": "updated_at",
156
+ "type": "integer",
157
+ "primaryKey": false,
158
+ "notNull": true
159
+ }
160
+ },
161
+ "indexes": {
162
+ "idx_api_token_site_id": {
163
+ "name": "idx_api_token_site_id",
164
+ "columns": [
165
+ {
166
+ "expression": "site_id",
167
+ "isExpression": false,
168
+ "asc": true,
169
+ "nulls": "last"
170
+ }
171
+ ],
172
+ "isUnique": false,
173
+ "concurrently": false,
174
+ "method": "btree",
175
+ "with": {}
176
+ }
177
+ },
178
+ "foreignKeys": {
179
+ "api_token_site_id_site_id_fk": {
180
+ "name": "api_token_site_id_site_id_fk",
181
+ "tableFrom": "api_token",
182
+ "tableTo": "site",
183
+ "columnsFrom": ["site_id"],
184
+ "columnsTo": ["id"],
185
+ "onDelete": "cascade",
186
+ "onUpdate": "no action"
187
+ }
188
+ },
189
+ "compositePrimaryKeys": {},
190
+ "uniqueConstraints": {
191
+ "api_token_token_hash_unique": {
192
+ "name": "api_token_token_hash_unique",
193
+ "nullsNotDistinct": false,
194
+ "columns": ["token_hash"]
195
+ }
196
+ },
197
+ "policies": {},
198
+ "checkConstraints": {},
199
+ "isRLSEnabled": false
200
+ },
201
+ "public.collection_directory_item": {
202
+ "name": "collection_directory_item",
203
+ "schema": "",
204
+ "columns": {
205
+ "id": {
206
+ "name": "id",
207
+ "type": "text",
208
+ "primaryKey": true,
209
+ "notNull": true
210
+ },
211
+ "site_id": {
212
+ "name": "site_id",
213
+ "type": "text",
214
+ "primaryKey": false,
215
+ "notNull": true
216
+ },
217
+ "type": {
218
+ "name": "type",
219
+ "type": "text",
220
+ "primaryKey": false,
221
+ "notNull": true
222
+ },
223
+ "collection_id": {
224
+ "name": "collection_id",
225
+ "type": "text",
226
+ "primaryKey": false,
227
+ "notNull": false
228
+ },
229
+ "label": {
230
+ "name": "label",
231
+ "type": "text",
232
+ "primaryKey": false,
233
+ "notNull": false
234
+ },
235
+ "url": {
236
+ "name": "url",
237
+ "type": "text",
238
+ "primaryKey": false,
239
+ "notNull": false
240
+ },
241
+ "description": {
242
+ "name": "description",
243
+ "type": "text",
244
+ "primaryKey": false,
245
+ "notNull": false
246
+ },
247
+ "position": {
248
+ "name": "position",
249
+ "type": "text",
250
+ "primaryKey": false,
251
+ "notNull": true,
252
+ "default": "'a0'"
253
+ },
254
+ "created_at": {
255
+ "name": "created_at",
256
+ "type": "integer",
257
+ "primaryKey": false,
258
+ "notNull": true
259
+ },
260
+ "updated_at": {
261
+ "name": "updated_at",
262
+ "type": "integer",
263
+ "primaryKey": false,
264
+ "notNull": true
265
+ }
266
+ },
267
+ "indexes": {
268
+ "idx_collection_directory_item_site_collection_id": {
269
+ "name": "idx_collection_directory_item_site_collection_id",
270
+ "columns": [
271
+ {
272
+ "expression": "site_id",
273
+ "isExpression": false,
274
+ "asc": true,
275
+ "nulls": "last"
276
+ },
277
+ {
278
+ "expression": "collection_id",
279
+ "isExpression": false,
280
+ "asc": true,
281
+ "nulls": "last"
282
+ }
283
+ ],
284
+ "isUnique": false,
285
+ "concurrently": false,
286
+ "method": "btree",
287
+ "with": {}
288
+ },
289
+ "uq_collection_directory_item_site_position": {
290
+ "name": "uq_collection_directory_item_site_position",
291
+ "columns": [
292
+ {
293
+ "expression": "site_id",
294
+ "isExpression": false,
295
+ "asc": true,
296
+ "nulls": "last"
297
+ },
298
+ {
299
+ "expression": "position",
300
+ "isExpression": false,
301
+ "asc": true,
302
+ "nulls": "last"
303
+ }
304
+ ],
305
+ "isUnique": true,
306
+ "concurrently": false,
307
+ "method": "btree",
308
+ "with": {}
309
+ },
310
+ "uq_collection_directory_item_site_collection_once": {
311
+ "name": "uq_collection_directory_item_site_collection_once",
312
+ "columns": [
313
+ {
314
+ "expression": "site_id",
315
+ "isExpression": false,
316
+ "asc": true,
317
+ "nulls": "last"
318
+ },
319
+ {
320
+ "expression": "collection_id",
321
+ "isExpression": false,
322
+ "asc": true,
323
+ "nulls": "last"
324
+ }
325
+ ],
326
+ "isUnique": true,
327
+ "where": "\"collection_directory_item\".\"type\" = 'collection' AND \"collection_directory_item\".\"collection_id\" IS NOT NULL",
328
+ "concurrently": false,
329
+ "method": "btree",
330
+ "with": {}
331
+ }
332
+ },
333
+ "foreignKeys": {
334
+ "collection_directory_item_site_id_site_id_fk": {
335
+ "name": "collection_directory_item_site_id_site_id_fk",
336
+ "tableFrom": "collection_directory_item",
337
+ "tableTo": "site",
338
+ "columnsFrom": ["site_id"],
339
+ "columnsTo": ["id"],
340
+ "onDelete": "cascade",
341
+ "onUpdate": "no action"
342
+ },
343
+ "collection_directory_item_collection_id_collection_id_fk": {
344
+ "name": "collection_directory_item_collection_id_collection_id_fk",
345
+ "tableFrom": "collection_directory_item",
346
+ "tableTo": "collection",
347
+ "columnsFrom": ["collection_id"],
348
+ "columnsTo": ["id"],
349
+ "onDelete": "cascade",
350
+ "onUpdate": "no action"
351
+ }
352
+ },
353
+ "compositePrimaryKeys": {},
354
+ "uniqueConstraints": {},
355
+ "policies": {},
356
+ "checkConstraints": {
357
+ "chk_collection_directory_item_type": {
358
+ "name": "chk_collection_directory_item_type",
359
+ "value": "\"collection_directory_item\".\"type\" IN ('collection', 'divider', 'link')"
360
+ },
361
+ "chk_collection_directory_item_shape": {
362
+ "name": "chk_collection_directory_item_shape",
363
+ "value": "(\n \"collection_directory_item\".\"type\" = 'collection'\n AND \"collection_directory_item\".\"collection_id\" IS NOT NULL\n AND \"collection_directory_item\".\"label\" IS NULL\n AND \"collection_directory_item\".\"url\" IS NULL\n ) OR (\n \"collection_directory_item\".\"type\" = 'divider'\n AND \"collection_directory_item\".\"collection_id\" IS NULL\n AND \"collection_directory_item\".\"url\" IS NULL\n ) OR (\n \"collection_directory_item\".\"type\" = 'link'\n AND \"collection_directory_item\".\"collection_id\" IS NULL\n AND \"collection_directory_item\".\"label\" IS NOT NULL\n AND \"collection_directory_item\".\"url\" IS NOT NULL\n )"
364
+ },
365
+ "chk_collection_directory_item_label": {
366
+ "name": "chk_collection_directory_item_label",
367
+ "value": "\"collection_directory_item\".\"type\" <> 'collection' OR \"collection_directory_item\".\"label\" IS NULL"
368
+ },
369
+ "chk_collection_directory_item_description": {
370
+ "name": "chk_collection_directory_item_description",
371
+ "value": "\"collection_directory_item\".\"type\" = 'link' OR \"collection_directory_item\".\"description\" IS NULL"
372
+ }
373
+ },
374
+ "isRLSEnabled": false
375
+ },
376
+ "public.collection": {
377
+ "name": "collection",
378
+ "schema": "",
379
+ "columns": {
380
+ "id": {
381
+ "name": "id",
382
+ "type": "text",
383
+ "primaryKey": true,
384
+ "notNull": true
385
+ },
386
+ "site_id": {
387
+ "name": "site_id",
388
+ "type": "text",
389
+ "primaryKey": false,
390
+ "notNull": true
391
+ },
392
+ "title": {
393
+ "name": "title",
394
+ "type": "text",
395
+ "primaryKey": false,
396
+ "notNull": true
397
+ },
398
+ "description": {
399
+ "name": "description",
400
+ "type": "text",
401
+ "primaryKey": false,
402
+ "notNull": false
403
+ },
404
+ "sort_order": {
405
+ "name": "sort_order",
406
+ "type": "text",
407
+ "primaryKey": false,
408
+ "notNull": true,
409
+ "default": "'newest'"
410
+ },
411
+ "created_at": {
412
+ "name": "created_at",
413
+ "type": "integer",
414
+ "primaryKey": false,
415
+ "notNull": true
416
+ },
417
+ "updated_at": {
418
+ "name": "updated_at",
419
+ "type": "integer",
420
+ "primaryKey": false,
421
+ "notNull": true
422
+ }
423
+ },
424
+ "indexes": {
425
+ "idx_collection_site_created_at": {
426
+ "name": "idx_collection_site_created_at",
427
+ "columns": [
428
+ {
429
+ "expression": "site_id",
430
+ "isExpression": false,
431
+ "asc": true,
432
+ "nulls": "last"
433
+ },
434
+ {
435
+ "expression": "created_at",
436
+ "isExpression": false,
437
+ "asc": true,
438
+ "nulls": "last"
439
+ }
440
+ ],
441
+ "isUnique": false,
442
+ "concurrently": false,
443
+ "method": "btree",
444
+ "with": {}
445
+ }
446
+ },
447
+ "foreignKeys": {
448
+ "collection_site_id_site_id_fk": {
449
+ "name": "collection_site_id_site_id_fk",
450
+ "tableFrom": "collection",
451
+ "tableTo": "site",
452
+ "columnsFrom": ["site_id"],
453
+ "columnsTo": ["id"],
454
+ "onDelete": "cascade",
455
+ "onUpdate": "no action"
456
+ }
457
+ },
458
+ "compositePrimaryKeys": {},
459
+ "uniqueConstraints": {},
460
+ "policies": {},
461
+ "checkConstraints": {
462
+ "chk_collection_sort_order": {
463
+ "name": "chk_collection_sort_order",
464
+ "value": "\"collection\".\"sort_order\" IN ('newest', 'oldest', 'rating_desc')"
465
+ }
466
+ },
467
+ "isRLSEnabled": false
468
+ },
469
+ "public.github_app_installation": {
470
+ "name": "github_app_installation",
471
+ "schema": "",
472
+ "columns": {
473
+ "installation_id": {
474
+ "name": "installation_id",
475
+ "type": "text",
476
+ "primaryKey": false,
477
+ "notNull": true
478
+ },
479
+ "site_id": {
480
+ "name": "site_id",
481
+ "type": "text",
482
+ "primaryKey": false,
483
+ "notNull": true
484
+ },
485
+ "account_login": {
486
+ "name": "account_login",
487
+ "type": "text",
488
+ "primaryKey": false,
489
+ "notNull": true
490
+ },
491
+ "account_type": {
492
+ "name": "account_type",
493
+ "type": "text",
494
+ "primaryKey": false,
495
+ "notNull": true
496
+ },
497
+ "account_avatar_url": {
498
+ "name": "account_avatar_url",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": true,
502
+ "default": "''"
503
+ },
504
+ "added_at": {
505
+ "name": "added_at",
506
+ "type": "integer",
507
+ "primaryKey": false,
508
+ "notNull": true
509
+ }
510
+ },
511
+ "indexes": {
512
+ "github_app_installation_by_installation": {
513
+ "name": "github_app_installation_by_installation",
514
+ "columns": [
515
+ {
516
+ "expression": "installation_id",
517
+ "isExpression": false,
518
+ "asc": true,
519
+ "nulls": "last"
520
+ }
521
+ ],
522
+ "isUnique": false,
523
+ "concurrently": false,
524
+ "method": "btree",
525
+ "with": {}
526
+ },
527
+ "github_app_installation_by_site": {
528
+ "name": "github_app_installation_by_site",
529
+ "columns": [
530
+ {
531
+ "expression": "site_id",
532
+ "isExpression": false,
533
+ "asc": true,
534
+ "nulls": "last"
535
+ }
536
+ ],
537
+ "isUnique": false,
538
+ "concurrently": false,
539
+ "method": "btree",
540
+ "with": {}
541
+ }
542
+ },
543
+ "foreignKeys": {
544
+ "github_app_installation_site_id_site_id_fk": {
545
+ "name": "github_app_installation_site_id_site_id_fk",
546
+ "tableFrom": "github_app_installation",
547
+ "tableTo": "site",
548
+ "columnsFrom": ["site_id"],
549
+ "columnsTo": ["id"],
550
+ "onDelete": "cascade",
551
+ "onUpdate": "no action"
552
+ }
553
+ },
554
+ "compositePrimaryKeys": {
555
+ "github_app_installation_installation_id_site_id_pk": {
556
+ "name": "github_app_installation_installation_id_site_id_pk",
557
+ "columns": ["installation_id", "site_id"]
558
+ }
559
+ },
560
+ "uniqueConstraints": {},
561
+ "policies": {},
562
+ "checkConstraints": {
563
+ "chk_github_app_installation_account_type": {
564
+ "name": "chk_github_app_installation_account_type",
565
+ "value": "\"github_app_installation\".\"account_type\" IN ('User', 'Organization')"
566
+ }
567
+ },
568
+ "isRLSEnabled": false
569
+ },
570
+ "public.media": {
571
+ "name": "media",
572
+ "schema": "",
573
+ "columns": {
574
+ "id": {
575
+ "name": "id",
576
+ "type": "text",
577
+ "primaryKey": true,
578
+ "notNull": true
579
+ },
580
+ "site_id": {
581
+ "name": "site_id",
582
+ "type": "text",
583
+ "primaryKey": false,
584
+ "notNull": true
585
+ },
586
+ "post_id": {
587
+ "name": "post_id",
588
+ "type": "text",
589
+ "primaryKey": false,
590
+ "notNull": false
591
+ },
592
+ "filename": {
593
+ "name": "filename",
594
+ "type": "text",
595
+ "primaryKey": false,
596
+ "notNull": true
597
+ },
598
+ "original_name": {
599
+ "name": "original_name",
600
+ "type": "text",
601
+ "primaryKey": false,
602
+ "notNull": true
603
+ },
604
+ "mime_type": {
605
+ "name": "mime_type",
606
+ "type": "text",
607
+ "primaryKey": false,
608
+ "notNull": true
609
+ },
610
+ "size": {
611
+ "name": "size",
612
+ "type": "integer",
613
+ "primaryKey": false,
614
+ "notNull": true
615
+ },
616
+ "storage_key": {
617
+ "name": "storage_key",
618
+ "type": "text",
619
+ "primaryKey": false,
620
+ "notNull": true
621
+ },
622
+ "provider": {
623
+ "name": "provider",
624
+ "type": "text",
625
+ "primaryKey": false,
626
+ "notNull": true,
627
+ "default": "'r2'"
628
+ },
629
+ "width": {
630
+ "name": "width",
631
+ "type": "integer",
632
+ "primaryKey": false,
633
+ "notNull": false
634
+ },
635
+ "height": {
636
+ "name": "height",
637
+ "type": "integer",
638
+ "primaryKey": false,
639
+ "notNull": false
640
+ },
641
+ "duration_seconds": {
642
+ "name": "duration_seconds",
643
+ "type": "integer",
644
+ "primaryKey": false,
645
+ "notNull": false
646
+ },
647
+ "alt": {
648
+ "name": "alt",
649
+ "type": "text",
650
+ "primaryKey": false,
651
+ "notNull": false
652
+ },
653
+ "position": {
654
+ "name": "position",
655
+ "type": "text",
656
+ "primaryKey": false,
657
+ "notNull": true,
658
+ "default": "'a0'"
659
+ },
660
+ "blurhash": {
661
+ "name": "blurhash",
662
+ "type": "text",
663
+ "primaryKey": false,
664
+ "notNull": false
665
+ },
666
+ "waveform": {
667
+ "name": "waveform",
668
+ "type": "text",
669
+ "primaryKey": false,
670
+ "notNull": false
671
+ },
672
+ "poster_key": {
673
+ "name": "poster_key",
674
+ "type": "text",
675
+ "primaryKey": false,
676
+ "notNull": false
677
+ },
678
+ "summary": {
679
+ "name": "summary",
680
+ "type": "text",
681
+ "primaryKey": false,
682
+ "notNull": false
683
+ },
684
+ "chars": {
685
+ "name": "chars",
686
+ "type": "integer",
687
+ "primaryKey": false,
688
+ "notNull": false
689
+ },
690
+ "media_kind": {
691
+ "name": "media_kind",
692
+ "type": "text",
693
+ "primaryKey": false,
694
+ "notNull": true,
695
+ "default": "'document'"
696
+ },
697
+ "created_at": {
698
+ "name": "created_at",
699
+ "type": "integer",
700
+ "primaryKey": false,
701
+ "notNull": true
702
+ },
703
+ "updated_at": {
704
+ "name": "updated_at",
705
+ "type": "integer",
706
+ "primaryKey": false,
707
+ "notNull": true
708
+ }
709
+ },
710
+ "indexes": {
711
+ "idx_media_site_post_id_position": {
712
+ "name": "idx_media_site_post_id_position",
713
+ "columns": [
714
+ {
715
+ "expression": "site_id",
716
+ "isExpression": false,
717
+ "asc": true,
718
+ "nulls": "last"
719
+ },
720
+ {
721
+ "expression": "post_id",
722
+ "isExpression": false,
723
+ "asc": true,
724
+ "nulls": "last"
725
+ },
726
+ {
727
+ "expression": "position",
728
+ "isExpression": false,
729
+ "asc": true,
730
+ "nulls": "last"
731
+ }
732
+ ],
733
+ "isUnique": false,
734
+ "concurrently": false,
735
+ "method": "btree",
736
+ "with": {}
737
+ },
738
+ "uq_media_site_post_position": {
739
+ "name": "uq_media_site_post_position",
740
+ "columns": [
741
+ {
742
+ "expression": "site_id",
743
+ "isExpression": false,
744
+ "asc": true,
745
+ "nulls": "last"
746
+ },
747
+ {
748
+ "expression": "post_id",
749
+ "isExpression": false,
750
+ "asc": true,
751
+ "nulls": "last"
752
+ },
753
+ {
754
+ "expression": "position",
755
+ "isExpression": false,
756
+ "asc": true,
757
+ "nulls": "last"
758
+ }
759
+ ],
760
+ "isUnique": true,
761
+ "where": "\"media\".\"post_id\" IS NOT NULL",
762
+ "concurrently": false,
763
+ "method": "btree",
764
+ "with": {}
765
+ },
766
+ "uq_media_provider_storage_key": {
767
+ "name": "uq_media_provider_storage_key",
768
+ "columns": [
769
+ {
770
+ "expression": "provider",
771
+ "isExpression": false,
772
+ "asc": true,
773
+ "nulls": "last"
774
+ },
775
+ {
776
+ "expression": "storage_key",
777
+ "isExpression": false,
778
+ "asc": true,
779
+ "nulls": "last"
780
+ }
781
+ ],
782
+ "isUnique": true,
783
+ "concurrently": false,
784
+ "method": "btree",
785
+ "with": {}
786
+ },
787
+ "idx_media_site_media_kind_post_id": {
788
+ "name": "idx_media_site_media_kind_post_id",
789
+ "columns": [
790
+ {
791
+ "expression": "site_id",
792
+ "isExpression": false,
793
+ "asc": true,
794
+ "nulls": "last"
795
+ },
796
+ {
797
+ "expression": "media_kind",
798
+ "isExpression": false,
799
+ "asc": true,
800
+ "nulls": "last"
801
+ },
802
+ {
803
+ "expression": "post_id",
804
+ "isExpression": false,
805
+ "asc": true,
806
+ "nulls": "last"
807
+ }
808
+ ],
809
+ "isUnique": false,
810
+ "concurrently": false,
811
+ "method": "btree",
812
+ "with": {}
813
+ }
814
+ },
815
+ "foreignKeys": {
816
+ "media_site_id_site_id_fk": {
817
+ "name": "media_site_id_site_id_fk",
818
+ "tableFrom": "media",
819
+ "tableTo": "site",
820
+ "columnsFrom": ["site_id"],
821
+ "columnsTo": ["id"],
822
+ "onDelete": "cascade",
823
+ "onUpdate": "no action"
824
+ },
825
+ "media_post_id_post_id_fk": {
826
+ "name": "media_post_id_post_id_fk",
827
+ "tableFrom": "media",
828
+ "tableTo": "post",
829
+ "columnsFrom": ["post_id"],
830
+ "columnsTo": ["id"],
831
+ "onDelete": "set null",
832
+ "onUpdate": "no action"
833
+ }
834
+ },
835
+ "compositePrimaryKeys": {},
836
+ "uniqueConstraints": {},
837
+ "policies": {},
838
+ "checkConstraints": {
839
+ "chk_media_size_positive": {
840
+ "name": "chk_media_size_positive",
841
+ "value": "\"media\".\"size\" > 0"
842
+ },
843
+ "chk_media_position_not_blank": {
844
+ "name": "chk_media_position_not_blank",
845
+ "value": "trim(\"media\".\"position\") <> ''"
846
+ },
847
+ "chk_media_dimensions_positive": {
848
+ "name": "chk_media_dimensions_positive",
849
+ "value": "(\n \"media\".\"width\" IS NULL OR \"media\".\"width\" > 0\n ) AND (\n \"media\".\"height\" IS NULL OR \"media\".\"height\" > 0\n )"
850
+ },
851
+ "chk_media_chars_nonnegative": {
852
+ "name": "chk_media_chars_nonnegative",
853
+ "value": "\"media\".\"chars\" IS NULL OR \"media\".\"chars\" >= 0"
854
+ }
855
+ },
856
+ "isRLSEnabled": false
857
+ },
858
+ "public.nav_item": {
859
+ "name": "nav_item",
860
+ "schema": "",
861
+ "columns": {
862
+ "id": {
863
+ "name": "id",
864
+ "type": "text",
865
+ "primaryKey": true,
866
+ "notNull": true
867
+ },
868
+ "site_id": {
869
+ "name": "site_id",
870
+ "type": "text",
871
+ "primaryKey": false,
872
+ "notNull": true
873
+ },
874
+ "type": {
875
+ "name": "type",
876
+ "type": "text",
877
+ "primaryKey": false,
878
+ "notNull": true,
879
+ "default": "'link'"
880
+ },
881
+ "system_key": {
882
+ "name": "system_key",
883
+ "type": "text",
884
+ "primaryKey": false,
885
+ "notNull": false
886
+ },
887
+ "collection_id": {
888
+ "name": "collection_id",
889
+ "type": "text",
890
+ "primaryKey": false,
891
+ "notNull": false
892
+ },
893
+ "label": {
894
+ "name": "label",
895
+ "type": "text",
896
+ "primaryKey": false,
897
+ "notNull": true
898
+ },
899
+ "url": {
900
+ "name": "url",
901
+ "type": "text",
902
+ "primaryKey": false,
903
+ "notNull": true
904
+ },
905
+ "placement": {
906
+ "name": "placement",
907
+ "type": "text",
908
+ "primaryKey": false,
909
+ "notNull": true,
910
+ "default": "'header'"
911
+ },
912
+ "position": {
913
+ "name": "position",
914
+ "type": "text",
915
+ "primaryKey": false,
916
+ "notNull": true,
917
+ "default": "'a0'"
918
+ },
919
+ "created_at": {
920
+ "name": "created_at",
921
+ "type": "integer",
922
+ "primaryKey": false,
923
+ "notNull": true
924
+ },
925
+ "updated_at": {
926
+ "name": "updated_at",
927
+ "type": "integer",
928
+ "primaryKey": false,
929
+ "notNull": true
930
+ }
931
+ },
932
+ "indexes": {
933
+ "uq_nav_item_site_position": {
934
+ "name": "uq_nav_item_site_position",
935
+ "columns": [
936
+ {
937
+ "expression": "site_id",
938
+ "isExpression": false,
939
+ "asc": true,
940
+ "nulls": "last"
941
+ },
942
+ {
943
+ "expression": "position",
944
+ "isExpression": false,
945
+ "asc": true,
946
+ "nulls": "last"
947
+ }
948
+ ],
949
+ "isUnique": true,
950
+ "concurrently": false,
951
+ "method": "btree",
952
+ "with": {}
953
+ },
954
+ "uq_nav_item_site_system_key": {
955
+ "name": "uq_nav_item_site_system_key",
956
+ "columns": [
957
+ {
958
+ "expression": "site_id",
959
+ "isExpression": false,
960
+ "asc": true,
961
+ "nulls": "last"
962
+ },
963
+ {
964
+ "expression": "system_key",
965
+ "isExpression": false,
966
+ "asc": true,
967
+ "nulls": "last"
968
+ }
969
+ ],
970
+ "isUnique": true,
971
+ "where": "\"nav_item\".\"system_key\" IS NOT NULL",
972
+ "concurrently": false,
973
+ "method": "btree",
974
+ "with": {}
975
+ },
976
+ "uq_nav_item_site_collection_id": {
977
+ "name": "uq_nav_item_site_collection_id",
978
+ "columns": [
979
+ {
980
+ "expression": "site_id",
981
+ "isExpression": false,
982
+ "asc": true,
983
+ "nulls": "last"
984
+ },
985
+ {
986
+ "expression": "collection_id",
987
+ "isExpression": false,
988
+ "asc": true,
989
+ "nulls": "last"
990
+ }
991
+ ],
992
+ "isUnique": true,
993
+ "where": "\"nav_item\".\"collection_id\" IS NOT NULL",
994
+ "concurrently": false,
995
+ "method": "btree",
996
+ "with": {}
997
+ }
998
+ },
999
+ "foreignKeys": {
1000
+ "nav_item_site_id_site_id_fk": {
1001
+ "name": "nav_item_site_id_site_id_fk",
1002
+ "tableFrom": "nav_item",
1003
+ "tableTo": "site",
1004
+ "columnsFrom": ["site_id"],
1005
+ "columnsTo": ["id"],
1006
+ "onDelete": "cascade",
1007
+ "onUpdate": "no action"
1008
+ },
1009
+ "nav_item_collection_id_collection_id_fk": {
1010
+ "name": "nav_item_collection_id_collection_id_fk",
1011
+ "tableFrom": "nav_item",
1012
+ "tableTo": "collection",
1013
+ "columnsFrom": ["collection_id"],
1014
+ "columnsTo": ["id"],
1015
+ "onDelete": "cascade",
1016
+ "onUpdate": "no action"
1017
+ }
1018
+ },
1019
+ "compositePrimaryKeys": {},
1020
+ "uniqueConstraints": {},
1021
+ "policies": {},
1022
+ "checkConstraints": {
1023
+ "chk_nav_item_type": {
1024
+ "name": "chk_nav_item_type",
1025
+ "value": "\"nav_item\".\"type\" IN ('link', 'system', 'collection')"
1026
+ },
1027
+ "chk_nav_item_placement": {
1028
+ "name": "chk_nav_item_placement",
1029
+ "value": "\"nav_item\".\"placement\" IN ('header', 'more')"
1030
+ },
1031
+ "chk_nav_item_shape": {
1032
+ "name": "chk_nav_item_shape",
1033
+ "value": "(\n \"nav_item\".\"type\" = 'link'\n AND \"nav_item\".\"system_key\" IS NULL\n AND \"nav_item\".\"collection_id\" IS NULL\n ) OR (\n \"nav_item\".\"type\" = 'system'\n AND \"nav_item\".\"system_key\" IS NOT NULL\n AND \"nav_item\".\"collection_id\" IS NULL\n ) OR (\n \"nav_item\".\"type\" = 'collection'\n AND \"nav_item\".\"system_key\" IS NULL\n AND \"nav_item\".\"collection_id\" IS NOT NULL\n )"
1034
+ }
1035
+ },
1036
+ "isRLSEnabled": false
1037
+ },
1038
+ "public.path_registry": {
1039
+ "name": "path_registry",
1040
+ "schema": "",
1041
+ "columns": {
1042
+ "id": {
1043
+ "name": "id",
1044
+ "type": "text",
1045
+ "primaryKey": true,
1046
+ "notNull": true
1047
+ },
1048
+ "site_id": {
1049
+ "name": "site_id",
1050
+ "type": "text",
1051
+ "primaryKey": false,
1052
+ "notNull": true
1053
+ },
1054
+ "path": {
1055
+ "name": "path",
1056
+ "type": "text",
1057
+ "primaryKey": false,
1058
+ "notNull": true
1059
+ },
1060
+ "kind": {
1061
+ "name": "kind",
1062
+ "type": "text",
1063
+ "primaryKey": false,
1064
+ "notNull": true
1065
+ },
1066
+ "post_id": {
1067
+ "name": "post_id",
1068
+ "type": "text",
1069
+ "primaryKey": false,
1070
+ "notNull": false
1071
+ },
1072
+ "collection_id": {
1073
+ "name": "collection_id",
1074
+ "type": "text",
1075
+ "primaryKey": false,
1076
+ "notNull": false
1077
+ },
1078
+ "redirect_to_path": {
1079
+ "name": "redirect_to_path",
1080
+ "type": "text",
1081
+ "primaryKey": false,
1082
+ "notNull": false
1083
+ },
1084
+ "redirect_type": {
1085
+ "name": "redirect_type",
1086
+ "type": "integer",
1087
+ "primaryKey": false,
1088
+ "notNull": false
1089
+ },
1090
+ "archive_query": {
1091
+ "name": "archive_query",
1092
+ "type": "text",
1093
+ "primaryKey": false,
1094
+ "notNull": false
1095
+ },
1096
+ "created_at": {
1097
+ "name": "created_at",
1098
+ "type": "integer",
1099
+ "primaryKey": false,
1100
+ "notNull": true
1101
+ },
1102
+ "updated_at": {
1103
+ "name": "updated_at",
1104
+ "type": "integer",
1105
+ "primaryKey": false,
1106
+ "notNull": true
1107
+ }
1108
+ },
1109
+ "indexes": {
1110
+ "uq_path_registry_site_path": {
1111
+ "name": "uq_path_registry_site_path",
1112
+ "columns": [
1113
+ {
1114
+ "expression": "site_id",
1115
+ "isExpression": false,
1116
+ "asc": true,
1117
+ "nulls": "last"
1118
+ },
1119
+ {
1120
+ "expression": "path",
1121
+ "isExpression": false,
1122
+ "asc": true,
1123
+ "nulls": "last"
1124
+ }
1125
+ ],
1126
+ "isUnique": true,
1127
+ "concurrently": false,
1128
+ "method": "btree",
1129
+ "with": {}
1130
+ },
1131
+ "uq_path_registry_site_post_slug": {
1132
+ "name": "uq_path_registry_site_post_slug",
1133
+ "columns": [
1134
+ {
1135
+ "expression": "site_id",
1136
+ "isExpression": false,
1137
+ "asc": true,
1138
+ "nulls": "last"
1139
+ },
1140
+ {
1141
+ "expression": "post_id",
1142
+ "isExpression": false,
1143
+ "asc": true,
1144
+ "nulls": "last"
1145
+ }
1146
+ ],
1147
+ "isUnique": true,
1148
+ "where": "\"path_registry\".\"kind\" = 'slug' AND \"path_registry\".\"post_id\" IS NOT NULL",
1149
+ "concurrently": false,
1150
+ "method": "btree",
1151
+ "with": {}
1152
+ },
1153
+ "uq_path_registry_site_collection_slug": {
1154
+ "name": "uq_path_registry_site_collection_slug",
1155
+ "columns": [
1156
+ {
1157
+ "expression": "site_id",
1158
+ "isExpression": false,
1159
+ "asc": true,
1160
+ "nulls": "last"
1161
+ },
1162
+ {
1163
+ "expression": "collection_id",
1164
+ "isExpression": false,
1165
+ "asc": true,
1166
+ "nulls": "last"
1167
+ }
1168
+ ],
1169
+ "isUnique": true,
1170
+ "where": "\"path_registry\".\"kind\" = 'slug' AND \"path_registry\".\"collection_id\" IS NOT NULL",
1171
+ "concurrently": false,
1172
+ "method": "btree",
1173
+ "with": {}
1174
+ },
1175
+ "idx_path_registry_site_post_id": {
1176
+ "name": "idx_path_registry_site_post_id",
1177
+ "columns": [
1178
+ {
1179
+ "expression": "site_id",
1180
+ "isExpression": false,
1181
+ "asc": true,
1182
+ "nulls": "last"
1183
+ },
1184
+ {
1185
+ "expression": "post_id",
1186
+ "isExpression": false,
1187
+ "asc": true,
1188
+ "nulls": "last"
1189
+ }
1190
+ ],
1191
+ "isUnique": false,
1192
+ "concurrently": false,
1193
+ "method": "btree",
1194
+ "with": {}
1195
+ },
1196
+ "idx_path_registry_site_collection_id": {
1197
+ "name": "idx_path_registry_site_collection_id",
1198
+ "columns": [
1199
+ {
1200
+ "expression": "site_id",
1201
+ "isExpression": false,
1202
+ "asc": true,
1203
+ "nulls": "last"
1204
+ },
1205
+ {
1206
+ "expression": "collection_id",
1207
+ "isExpression": false,
1208
+ "asc": true,
1209
+ "nulls": "last"
1210
+ }
1211
+ ],
1212
+ "isUnique": false,
1213
+ "concurrently": false,
1214
+ "method": "btree",
1215
+ "with": {}
1216
+ }
1217
+ },
1218
+ "foreignKeys": {
1219
+ "path_registry_site_id_site_id_fk": {
1220
+ "name": "path_registry_site_id_site_id_fk",
1221
+ "tableFrom": "path_registry",
1222
+ "tableTo": "site",
1223
+ "columnsFrom": ["site_id"],
1224
+ "columnsTo": ["id"],
1225
+ "onDelete": "cascade",
1226
+ "onUpdate": "no action"
1227
+ },
1228
+ "path_registry_post_id_post_id_fk": {
1229
+ "name": "path_registry_post_id_post_id_fk",
1230
+ "tableFrom": "path_registry",
1231
+ "tableTo": "post",
1232
+ "columnsFrom": ["post_id"],
1233
+ "columnsTo": ["id"],
1234
+ "onDelete": "cascade",
1235
+ "onUpdate": "no action"
1236
+ },
1237
+ "path_registry_collection_id_collection_id_fk": {
1238
+ "name": "path_registry_collection_id_collection_id_fk",
1239
+ "tableFrom": "path_registry",
1240
+ "tableTo": "collection",
1241
+ "columnsFrom": ["collection_id"],
1242
+ "columnsTo": ["id"],
1243
+ "onDelete": "cascade",
1244
+ "onUpdate": "no action"
1245
+ }
1246
+ },
1247
+ "compositePrimaryKeys": {},
1248
+ "uniqueConstraints": {},
1249
+ "policies": {},
1250
+ "checkConstraints": {
1251
+ "chk_path_registry_kind": {
1252
+ "name": "chk_path_registry_kind",
1253
+ "value": "\"path_registry\".\"kind\" IN ('slug', 'alias', 'redirect', 'archive')"
1254
+ },
1255
+ "chk_path_registry_shape": {
1256
+ "name": "chk_path_registry_shape",
1257
+ "value": "(\n \"path_registry\".\"kind\" IN ('slug', 'alias')\n AND (\n (\"path_registry\".\"post_id\" IS NOT NULL AND \"path_registry\".\"collection_id\" IS NULL)\n OR (\"path_registry\".\"post_id\" IS NULL AND \"path_registry\".\"collection_id\" IS NOT NULL)\n )\n AND \"path_registry\".\"redirect_to_path\" IS NULL\n AND \"path_registry\".\"redirect_type\" IS NULL\n AND \"path_registry\".\"archive_query\" IS NULL\n ) OR (\n \"path_registry\".\"kind\" = 'redirect'\n AND \"path_registry\".\"post_id\" IS NULL\n AND \"path_registry\".\"collection_id\" IS NULL\n AND \"path_registry\".\"redirect_to_path\" IS NOT NULL\n AND \"path_registry\".\"redirect_type\" IN (301, 302)\n AND \"path_registry\".\"archive_query\" IS NULL\n ) OR (\n \"path_registry\".\"kind\" = 'archive'\n AND \"path_registry\".\"post_id\" IS NULL\n AND \"path_registry\".\"collection_id\" IS NULL\n AND \"path_registry\".\"redirect_to_path\" IS NULL\n AND \"path_registry\".\"redirect_type\" IS NULL\n AND \"path_registry\".\"archive_query\" IS NOT NULL\n )"
1258
+ }
1259
+ },
1260
+ "isRLSEnabled": false
1261
+ },
1262
+ "public.post": {
1263
+ "name": "post",
1264
+ "schema": "",
1265
+ "columns": {
1266
+ "id": {
1267
+ "name": "id",
1268
+ "type": "text",
1269
+ "primaryKey": true,
1270
+ "notNull": true
1271
+ },
1272
+ "site_id": {
1273
+ "name": "site_id",
1274
+ "type": "text",
1275
+ "primaryKey": false,
1276
+ "notNull": true
1277
+ },
1278
+ "format": {
1279
+ "name": "format",
1280
+ "type": "text",
1281
+ "primaryKey": false,
1282
+ "notNull": true
1283
+ },
1284
+ "status": {
1285
+ "name": "status",
1286
+ "type": "text",
1287
+ "primaryKey": false,
1288
+ "notNull": true,
1289
+ "default": "'published'"
1290
+ },
1291
+ "visibility": {
1292
+ "name": "visibility",
1293
+ "type": "text",
1294
+ "primaryKey": false,
1295
+ "notNull": false,
1296
+ "default": "'public'"
1297
+ },
1298
+ "pinned_at": {
1299
+ "name": "pinned_at",
1300
+ "type": "integer",
1301
+ "primaryKey": false,
1302
+ "notNull": false
1303
+ },
1304
+ "featured_at": {
1305
+ "name": "featured_at",
1306
+ "type": "integer",
1307
+ "primaryKey": false,
1308
+ "notNull": false
1309
+ },
1310
+ "title": {
1311
+ "name": "title",
1312
+ "type": "text",
1313
+ "primaryKey": false,
1314
+ "notNull": false
1315
+ },
1316
+ "url": {
1317
+ "name": "url",
1318
+ "type": "text",
1319
+ "primaryKey": false,
1320
+ "notNull": false
1321
+ },
1322
+ "body": {
1323
+ "name": "body",
1324
+ "type": "text",
1325
+ "primaryKey": false,
1326
+ "notNull": false
1327
+ },
1328
+ "body_html": {
1329
+ "name": "body_html",
1330
+ "type": "text",
1331
+ "primaryKey": false,
1332
+ "notNull": false
1333
+ },
1334
+ "body_text": {
1335
+ "name": "body_text",
1336
+ "type": "text",
1337
+ "primaryKey": false,
1338
+ "notNull": false
1339
+ },
1340
+ "quote_text": {
1341
+ "name": "quote_text",
1342
+ "type": "text",
1343
+ "primaryKey": false,
1344
+ "notNull": false
1345
+ },
1346
+ "summary": {
1347
+ "name": "summary",
1348
+ "type": "text",
1349
+ "primaryKey": false,
1350
+ "notNull": false
1351
+ },
1352
+ "search_text": {
1353
+ "name": "search_text",
1354
+ "type": "text",
1355
+ "primaryKey": false,
1356
+ "notNull": false,
1357
+ "generated": {
1358
+ "as": "coalesce(\"title\", '') || ' ' || coalesce(\"url\", '') || ' ' || coalesce(\"quote_text\", '') || ' ' || coalesce(\"body_text\", '')",
1359
+ "type": "stored"
1360
+ }
1361
+ },
1362
+ "search_document": {
1363
+ "name": "search_document",
1364
+ "type": "tsvector",
1365
+ "primaryKey": false,
1366
+ "notNull": false,
1367
+ "generated": {
1368
+ "as": "setweight(to_tsvector('simple', coalesce(\"title\", '')), 'A') ||\n setweight(to_tsvector('simple', coalesce(\"url\", '')), 'A') ||\n setweight(to_tsvector('simple', coalesce(\"quote_text\", '')), 'B') ||\n setweight(to_tsvector('simple', coalesce(\"body_text\", '')), 'C')",
1369
+ "type": "stored"
1370
+ }
1371
+ },
1372
+ "rating": {
1373
+ "name": "rating",
1374
+ "type": "integer",
1375
+ "primaryKey": false,
1376
+ "notNull": false
1377
+ },
1378
+ "preview_image_key": {
1379
+ "name": "preview_image_key",
1380
+ "type": "text",
1381
+ "primaryKey": false,
1382
+ "notNull": false
1383
+ },
1384
+ "preview_kind": {
1385
+ "name": "preview_kind",
1386
+ "type": "text",
1387
+ "primaryKey": false,
1388
+ "notNull": false
1389
+ },
1390
+ "preview_provider": {
1391
+ "name": "preview_provider",
1392
+ "type": "text",
1393
+ "primaryKey": false,
1394
+ "notNull": false
1395
+ },
1396
+ "reply_to_id": {
1397
+ "name": "reply_to_id",
1398
+ "type": "text",
1399
+ "primaryKey": false,
1400
+ "notNull": false
1401
+ },
1402
+ "thread_id": {
1403
+ "name": "thread_id",
1404
+ "type": "text",
1405
+ "primaryKey": false,
1406
+ "notNull": true
1407
+ },
1408
+ "published_at": {
1409
+ "name": "published_at",
1410
+ "type": "integer",
1411
+ "primaryKey": false,
1412
+ "notNull": false
1413
+ },
1414
+ "last_activity_at": {
1415
+ "name": "last_activity_at",
1416
+ "type": "integer",
1417
+ "primaryKey": false,
1418
+ "notNull": false
1419
+ },
1420
+ "created_at": {
1421
+ "name": "created_at",
1422
+ "type": "integer",
1423
+ "primaryKey": false,
1424
+ "notNull": true
1425
+ },
1426
+ "updated_at": {
1427
+ "name": "updated_at",
1428
+ "type": "integer",
1429
+ "primaryKey": false,
1430
+ "notNull": true
1431
+ }
1432
+ },
1433
+ "indexes": {
1434
+ "idx_post_site_thread_id": {
1435
+ "name": "idx_post_site_thread_id",
1436
+ "columns": [
1437
+ {
1438
+ "expression": "site_id",
1439
+ "isExpression": false,
1440
+ "asc": true,
1441
+ "nulls": "last"
1442
+ },
1443
+ {
1444
+ "expression": "thread_id",
1445
+ "isExpression": false,
1446
+ "asc": true,
1447
+ "nulls": "last"
1448
+ }
1449
+ ],
1450
+ "isUnique": false,
1451
+ "concurrently": false,
1452
+ "method": "btree",
1453
+ "with": {}
1454
+ },
1455
+ "idx_post_site_thread_created": {
1456
+ "name": "idx_post_site_thread_created",
1457
+ "columns": [
1458
+ {
1459
+ "expression": "site_id",
1460
+ "isExpression": false,
1461
+ "asc": true,
1462
+ "nulls": "last"
1463
+ },
1464
+ {
1465
+ "expression": "thread_id",
1466
+ "isExpression": false,
1467
+ "asc": true,
1468
+ "nulls": "last"
1469
+ },
1470
+ {
1471
+ "expression": "created_at",
1472
+ "isExpression": false,
1473
+ "asc": true,
1474
+ "nulls": "last"
1475
+ },
1476
+ {
1477
+ "expression": "id",
1478
+ "isExpression": false,
1479
+ "asc": true,
1480
+ "nulls": "last"
1481
+ }
1482
+ ],
1483
+ "isUnique": false,
1484
+ "concurrently": false,
1485
+ "method": "btree",
1486
+ "with": {}
1487
+ },
1488
+ "idx_post_site_status_published": {
1489
+ "name": "idx_post_site_status_published",
1490
+ "columns": [
1491
+ {
1492
+ "expression": "site_id",
1493
+ "isExpression": false,
1494
+ "asc": true,
1495
+ "nulls": "last"
1496
+ },
1497
+ {
1498
+ "expression": "status",
1499
+ "isExpression": false,
1500
+ "asc": true,
1501
+ "nulls": "last"
1502
+ },
1503
+ {
1504
+ "expression": "published_at",
1505
+ "isExpression": false,
1506
+ "asc": true,
1507
+ "nulls": "last"
1508
+ }
1509
+ ],
1510
+ "isUnique": false,
1511
+ "concurrently": false,
1512
+ "method": "btree",
1513
+ "with": {}
1514
+ },
1515
+ "idx_post_site_status_activity": {
1516
+ "name": "idx_post_site_status_activity",
1517
+ "columns": [
1518
+ {
1519
+ "expression": "site_id",
1520
+ "isExpression": false,
1521
+ "asc": true,
1522
+ "nulls": "last"
1523
+ },
1524
+ {
1525
+ "expression": "status",
1526
+ "isExpression": false,
1527
+ "asc": true,
1528
+ "nulls": "last"
1529
+ },
1530
+ {
1531
+ "expression": "last_activity_at",
1532
+ "isExpression": false,
1533
+ "asc": true,
1534
+ "nulls": "last"
1535
+ }
1536
+ ],
1537
+ "isUnique": false,
1538
+ "concurrently": false,
1539
+ "method": "btree",
1540
+ "with": {}
1541
+ },
1542
+ "idx_post_site_root_published_activity": {
1543
+ "name": "idx_post_site_root_published_activity",
1544
+ "columns": [
1545
+ {
1546
+ "expression": "site_id",
1547
+ "isExpression": false,
1548
+ "asc": true,
1549
+ "nulls": "last"
1550
+ },
1551
+ {
1552
+ "expression": "last_activity_at",
1553
+ "isExpression": false,
1554
+ "asc": true,
1555
+ "nulls": "last"
1556
+ },
1557
+ {
1558
+ "expression": "id",
1559
+ "isExpression": false,
1560
+ "asc": true,
1561
+ "nulls": "last"
1562
+ }
1563
+ ],
1564
+ "isUnique": false,
1565
+ "where": "\"post\".\"reply_to_id\" IS NULL AND \"post\".\"status\" = 'published'",
1566
+ "concurrently": false,
1567
+ "method": "btree",
1568
+ "with": {}
1569
+ },
1570
+ "idx_post_site_root_draft_updated": {
1571
+ "name": "idx_post_site_root_draft_updated",
1572
+ "columns": [
1573
+ {
1574
+ "expression": "site_id",
1575
+ "isExpression": false,
1576
+ "asc": true,
1577
+ "nulls": "last"
1578
+ },
1579
+ {
1580
+ "expression": "updated_at",
1581
+ "isExpression": false,
1582
+ "asc": true,
1583
+ "nulls": "last"
1584
+ },
1585
+ {
1586
+ "expression": "id",
1587
+ "isExpression": false,
1588
+ "asc": true,
1589
+ "nulls": "last"
1590
+ }
1591
+ ],
1592
+ "isUnique": false,
1593
+ "where": "\"post\".\"reply_to_id\" IS NULL AND \"post\".\"status\" = 'draft'",
1594
+ "concurrently": false,
1595
+ "method": "btree",
1596
+ "with": {}
1597
+ },
1598
+ "idx_post_site_reply_thread_created": {
1599
+ "name": "idx_post_site_reply_thread_created",
1600
+ "columns": [
1601
+ {
1602
+ "expression": "site_id",
1603
+ "isExpression": false,
1604
+ "asc": true,
1605
+ "nulls": "last"
1606
+ },
1607
+ {
1608
+ "expression": "thread_id",
1609
+ "isExpression": false,
1610
+ "asc": true,
1611
+ "nulls": "last"
1612
+ },
1613
+ {
1614
+ "expression": "created_at",
1615
+ "isExpression": false,
1616
+ "asc": true,
1617
+ "nulls": "last"
1618
+ },
1619
+ {
1620
+ "expression": "id",
1621
+ "isExpression": false,
1622
+ "asc": true,
1623
+ "nulls": "last"
1624
+ }
1625
+ ],
1626
+ "isUnique": false,
1627
+ "where": "\"post\".\"reply_to_id\" IS NOT NULL AND \"post\".\"status\" = 'published'",
1628
+ "concurrently": false,
1629
+ "method": "btree",
1630
+ "with": {}
1631
+ },
1632
+ "idx_post_site_featured_featured_at": {
1633
+ "name": "idx_post_site_featured_featured_at",
1634
+ "columns": [
1635
+ {
1636
+ "expression": "site_id",
1637
+ "isExpression": false,
1638
+ "asc": true,
1639
+ "nulls": "last"
1640
+ },
1641
+ {
1642
+ "expression": "featured_at",
1643
+ "isExpression": false,
1644
+ "asc": true,
1645
+ "nulls": "last"
1646
+ },
1647
+ {
1648
+ "expression": "thread_id",
1649
+ "isExpression": false,
1650
+ "asc": true,
1651
+ "nulls": "last"
1652
+ },
1653
+ {
1654
+ "expression": "id",
1655
+ "isExpression": false,
1656
+ "asc": true,
1657
+ "nulls": "last"
1658
+ }
1659
+ ],
1660
+ "isUnique": false,
1661
+ "where": "\"post\".\"status\" = 'published' AND \"post\".\"featured_at\" IS NOT NULL",
1662
+ "concurrently": false,
1663
+ "method": "btree",
1664
+ "with": {}
1665
+ },
1666
+ "idx_post_search_document": {
1667
+ "name": "idx_post_search_document",
1668
+ "columns": [
1669
+ {
1670
+ "expression": "search_document",
1671
+ "isExpression": false,
1672
+ "asc": true,
1673
+ "nulls": "last"
1674
+ }
1675
+ ],
1676
+ "isUnique": false,
1677
+ "concurrently": false,
1678
+ "method": "gin",
1679
+ "with": {}
1680
+ },
1681
+ "idx_post_search_text_trgm": {
1682
+ "name": "idx_post_search_text_trgm",
1683
+ "columns": [
1684
+ {
1685
+ "expression": "search_text",
1686
+ "isExpression": false,
1687
+ "asc": true,
1688
+ "nulls": "last",
1689
+ "opclass": "gin_trgm_ops"
1690
+ }
1691
+ ],
1692
+ "isUnique": false,
1693
+ "concurrently": false,
1694
+ "method": "gin",
1695
+ "with": {}
1696
+ }
1697
+ },
1698
+ "foreignKeys": {
1699
+ "post_site_id_site_id_fk": {
1700
+ "name": "post_site_id_site_id_fk",
1701
+ "tableFrom": "post",
1702
+ "tableTo": "site",
1703
+ "columnsFrom": ["site_id"],
1704
+ "columnsTo": ["id"],
1705
+ "onDelete": "cascade",
1706
+ "onUpdate": "no action"
1707
+ },
1708
+ "post_site_id_reply_to_id_post_site_id_id_fk": {
1709
+ "name": "post_site_id_reply_to_id_post_site_id_id_fk",
1710
+ "tableFrom": "post",
1711
+ "tableTo": "post",
1712
+ "columnsFrom": ["site_id", "reply_to_id"],
1713
+ "columnsTo": ["site_id", "id"],
1714
+ "onDelete": "no action",
1715
+ "onUpdate": "no action"
1716
+ },
1717
+ "post_site_id_thread_id_post_site_id_id_fk": {
1718
+ "name": "post_site_id_thread_id_post_site_id_id_fk",
1719
+ "tableFrom": "post",
1720
+ "tableTo": "post",
1721
+ "columnsFrom": ["site_id", "thread_id"],
1722
+ "columnsTo": ["site_id", "id"],
1723
+ "onDelete": "no action",
1724
+ "onUpdate": "no action"
1725
+ }
1726
+ },
1727
+ "compositePrimaryKeys": {},
1728
+ "uniqueConstraints": {
1729
+ "uq_post_site_id_id": {
1730
+ "name": "uq_post_site_id_id",
1731
+ "nullsNotDistinct": false,
1732
+ "columns": ["site_id", "id"]
1733
+ }
1734
+ },
1735
+ "policies": {},
1736
+ "checkConstraints": {
1737
+ "chk_post_reply_to_not_self": {
1738
+ "name": "chk_post_reply_to_not_self",
1739
+ "value": "\"post\".\"reply_to_id\" IS NULL OR \"post\".\"reply_to_id\" <> \"post\".\"id\""
1740
+ },
1741
+ "chk_post_thread_shape": {
1742
+ "name": "chk_post_thread_shape",
1743
+ "value": "(\n \"post\".\"reply_to_id\" IS NULL\n AND \"post\".\"thread_id\" = \"post\".\"id\"\n ) OR (\n \"post\".\"reply_to_id\" IS NOT NULL\n AND \"post\".\"thread_id\" <> \"post\".\"id\"\n )"
1744
+ }
1745
+ },
1746
+ "isRLSEnabled": false
1747
+ },
1748
+ "public.rate_limit": {
1749
+ "name": "rate_limit",
1750
+ "schema": "",
1751
+ "columns": {
1752
+ "key": {
1753
+ "name": "key",
1754
+ "type": "text",
1755
+ "primaryKey": false,
1756
+ "notNull": true
1757
+ },
1758
+ "window_start": {
1759
+ "name": "window_start",
1760
+ "type": "integer",
1761
+ "primaryKey": false,
1762
+ "notNull": true
1763
+ },
1764
+ "count": {
1765
+ "name": "count",
1766
+ "type": "integer",
1767
+ "primaryKey": false,
1768
+ "notNull": true,
1769
+ "default": 0
1770
+ }
1771
+ },
1772
+ "indexes": {},
1773
+ "foreignKeys": {},
1774
+ "compositePrimaryKeys": {
1775
+ "rate_limit_key_window_start_pk": {
1776
+ "name": "rate_limit_key_window_start_pk",
1777
+ "columns": ["key", "window_start"]
1778
+ }
1779
+ },
1780
+ "uniqueConstraints": {},
1781
+ "policies": {},
1782
+ "checkConstraints": {},
1783
+ "isRLSEnabled": false
1784
+ },
1785
+ "public.session": {
1786
+ "name": "session",
1787
+ "schema": "",
1788
+ "columns": {
1789
+ "id": {
1790
+ "name": "id",
1791
+ "type": "text",
1792
+ "primaryKey": true,
1793
+ "notNull": true
1794
+ },
1795
+ "expires_at": {
1796
+ "name": "expires_at",
1797
+ "type": "timestamp with time zone",
1798
+ "primaryKey": false,
1799
+ "notNull": true
1800
+ },
1801
+ "token": {
1802
+ "name": "token",
1803
+ "type": "text",
1804
+ "primaryKey": false,
1805
+ "notNull": true
1806
+ },
1807
+ "created_at": {
1808
+ "name": "created_at",
1809
+ "type": "timestamp with time zone",
1810
+ "primaryKey": false,
1811
+ "notNull": true
1812
+ },
1813
+ "updated_at": {
1814
+ "name": "updated_at",
1815
+ "type": "timestamp with time zone",
1816
+ "primaryKey": false,
1817
+ "notNull": true
1818
+ },
1819
+ "ip_address": {
1820
+ "name": "ip_address",
1821
+ "type": "text",
1822
+ "primaryKey": false,
1823
+ "notNull": false
1824
+ },
1825
+ "user_agent": {
1826
+ "name": "user_agent",
1827
+ "type": "text",
1828
+ "primaryKey": false,
1829
+ "notNull": false
1830
+ },
1831
+ "user_id": {
1832
+ "name": "user_id",
1833
+ "type": "text",
1834
+ "primaryKey": false,
1835
+ "notNull": true
1836
+ }
1837
+ },
1838
+ "indexes": {
1839
+ "idx_session_user_id": {
1840
+ "name": "idx_session_user_id",
1841
+ "columns": [
1842
+ {
1843
+ "expression": "user_id",
1844
+ "isExpression": false,
1845
+ "asc": true,
1846
+ "nulls": "last"
1847
+ }
1848
+ ],
1849
+ "isUnique": false,
1850
+ "concurrently": false,
1851
+ "method": "btree",
1852
+ "with": {}
1853
+ }
1854
+ },
1855
+ "foreignKeys": {
1856
+ "session_user_id_user_id_fk": {
1857
+ "name": "session_user_id_user_id_fk",
1858
+ "tableFrom": "session",
1859
+ "tableTo": "user",
1860
+ "columnsFrom": ["user_id"],
1861
+ "columnsTo": ["id"],
1862
+ "onDelete": "no action",
1863
+ "onUpdate": "no action"
1864
+ }
1865
+ },
1866
+ "compositePrimaryKeys": {},
1867
+ "uniqueConstraints": {
1868
+ "session_token_unique": {
1869
+ "name": "session_token_unique",
1870
+ "nullsNotDistinct": false,
1871
+ "columns": ["token"]
1872
+ }
1873
+ },
1874
+ "policies": {},
1875
+ "checkConstraints": {},
1876
+ "isRLSEnabled": false
1877
+ },
1878
+ "public.site_setting": {
1879
+ "name": "site_setting",
1880
+ "schema": "",
1881
+ "columns": {
1882
+ "site_id": {
1883
+ "name": "site_id",
1884
+ "type": "text",
1885
+ "primaryKey": false,
1886
+ "notNull": true
1887
+ },
1888
+ "key": {
1889
+ "name": "key",
1890
+ "type": "text",
1891
+ "primaryKey": false,
1892
+ "notNull": true
1893
+ },
1894
+ "value": {
1895
+ "name": "value",
1896
+ "type": "text",
1897
+ "primaryKey": false,
1898
+ "notNull": true
1899
+ },
1900
+ "updated_at": {
1901
+ "name": "updated_at",
1902
+ "type": "integer",
1903
+ "primaryKey": false,
1904
+ "notNull": true
1905
+ }
1906
+ },
1907
+ "indexes": {
1908
+ "idx_site_setting_site_id": {
1909
+ "name": "idx_site_setting_site_id",
1910
+ "columns": [
1911
+ {
1912
+ "expression": "site_id",
1913
+ "isExpression": false,
1914
+ "asc": true,
1915
+ "nulls": "last"
1916
+ }
1917
+ ],
1918
+ "isUnique": false,
1919
+ "concurrently": false,
1920
+ "method": "btree",
1921
+ "with": {}
1922
+ }
1923
+ },
1924
+ "foreignKeys": {
1925
+ "site_setting_site_id_site_id_fk": {
1926
+ "name": "site_setting_site_id_site_id_fk",
1927
+ "tableFrom": "site_setting",
1928
+ "tableTo": "site",
1929
+ "columnsFrom": ["site_id"],
1930
+ "columnsTo": ["id"],
1931
+ "onDelete": "cascade",
1932
+ "onUpdate": "no action"
1933
+ }
1934
+ },
1935
+ "compositePrimaryKeys": {
1936
+ "site_setting_site_id_key_pk": {
1937
+ "name": "site_setting_site_id_key_pk",
1938
+ "columns": ["site_id", "key"]
1939
+ }
1940
+ },
1941
+ "uniqueConstraints": {},
1942
+ "policies": {},
1943
+ "checkConstraints": {},
1944
+ "isRLSEnabled": false
1945
+ },
1946
+ "public.site_domain": {
1947
+ "name": "site_domain",
1948
+ "schema": "",
1949
+ "columns": {
1950
+ "id": {
1951
+ "name": "id",
1952
+ "type": "text",
1953
+ "primaryKey": true,
1954
+ "notNull": true
1955
+ },
1956
+ "site_id": {
1957
+ "name": "site_id",
1958
+ "type": "text",
1959
+ "primaryKey": false,
1960
+ "notNull": true
1961
+ },
1962
+ "host": {
1963
+ "name": "host",
1964
+ "type": "text",
1965
+ "primaryKey": false,
1966
+ "notNull": true
1967
+ },
1968
+ "path_prefix": {
1969
+ "name": "path_prefix",
1970
+ "type": "text",
1971
+ "primaryKey": false,
1972
+ "notNull": false
1973
+ },
1974
+ "kind": {
1975
+ "name": "kind",
1976
+ "type": "text",
1977
+ "primaryKey": false,
1978
+ "notNull": true,
1979
+ "default": "'primary'"
1980
+ },
1981
+ "redirect_to_primary": {
1982
+ "name": "redirect_to_primary",
1983
+ "type": "boolean",
1984
+ "primaryKey": false,
1985
+ "notNull": true,
1986
+ "default": true
1987
+ },
1988
+ "created_at": {
1989
+ "name": "created_at",
1990
+ "type": "integer",
1991
+ "primaryKey": false,
1992
+ "notNull": true
1993
+ },
1994
+ "updated_at": {
1995
+ "name": "updated_at",
1996
+ "type": "integer",
1997
+ "primaryKey": false,
1998
+ "notNull": true
1999
+ }
2000
+ },
2001
+ "indexes": {
2002
+ "uq_site_domain_host": {
2003
+ "name": "uq_site_domain_host",
2004
+ "columns": [
2005
+ {
2006
+ "expression": "host",
2007
+ "isExpression": false,
2008
+ "asc": true,
2009
+ "nulls": "last"
2010
+ }
2011
+ ],
2012
+ "isUnique": true,
2013
+ "concurrently": false,
2014
+ "method": "btree",
2015
+ "with": {}
2016
+ },
2017
+ "idx_site_domain_site_id": {
2018
+ "name": "idx_site_domain_site_id",
2019
+ "columns": [
2020
+ {
2021
+ "expression": "site_id",
2022
+ "isExpression": false,
2023
+ "asc": true,
2024
+ "nulls": "last"
2025
+ }
2026
+ ],
2027
+ "isUnique": false,
2028
+ "concurrently": false,
2029
+ "method": "btree",
2030
+ "with": {}
2031
+ }
2032
+ },
2033
+ "foreignKeys": {
2034
+ "site_domain_site_id_site_id_fk": {
2035
+ "name": "site_domain_site_id_site_id_fk",
2036
+ "tableFrom": "site_domain",
2037
+ "tableTo": "site",
2038
+ "columnsFrom": ["site_id"],
2039
+ "columnsTo": ["id"],
2040
+ "onDelete": "cascade",
2041
+ "onUpdate": "no action"
2042
+ }
2043
+ },
2044
+ "compositePrimaryKeys": {},
2045
+ "uniqueConstraints": {},
2046
+ "policies": {},
2047
+ "checkConstraints": {
2048
+ "chk_site_domain_kind": {
2049
+ "name": "chk_site_domain_kind",
2050
+ "value": "\"site_domain\".\"kind\" IN ('primary', 'alias')"
2051
+ }
2052
+ },
2053
+ "isRLSEnabled": false
2054
+ },
2055
+ "public.site_member": {
2056
+ "name": "site_member",
2057
+ "schema": "",
2058
+ "columns": {
2059
+ "site_id": {
2060
+ "name": "site_id",
2061
+ "type": "text",
2062
+ "primaryKey": false,
2063
+ "notNull": true
2064
+ },
2065
+ "user_id": {
2066
+ "name": "user_id",
2067
+ "type": "text",
2068
+ "primaryKey": false,
2069
+ "notNull": true
2070
+ },
2071
+ "role": {
2072
+ "name": "role",
2073
+ "type": "text",
2074
+ "primaryKey": false,
2075
+ "notNull": true,
2076
+ "default": "'editor'"
2077
+ },
2078
+ "created_at": {
2079
+ "name": "created_at",
2080
+ "type": "integer",
2081
+ "primaryKey": false,
2082
+ "notNull": true
2083
+ },
2084
+ "updated_at": {
2085
+ "name": "updated_at",
2086
+ "type": "integer",
2087
+ "primaryKey": false,
2088
+ "notNull": true
2089
+ }
2090
+ },
2091
+ "indexes": {
2092
+ "idx_site_member_user_id": {
2093
+ "name": "idx_site_member_user_id",
2094
+ "columns": [
2095
+ {
2096
+ "expression": "user_id",
2097
+ "isExpression": false,
2098
+ "asc": true,
2099
+ "nulls": "last"
2100
+ }
2101
+ ],
2102
+ "isUnique": false,
2103
+ "concurrently": false,
2104
+ "method": "btree",
2105
+ "with": {}
2106
+ }
2107
+ },
2108
+ "foreignKeys": {
2109
+ "site_member_site_id_site_id_fk": {
2110
+ "name": "site_member_site_id_site_id_fk",
2111
+ "tableFrom": "site_member",
2112
+ "tableTo": "site",
2113
+ "columnsFrom": ["site_id"],
2114
+ "columnsTo": ["id"],
2115
+ "onDelete": "cascade",
2116
+ "onUpdate": "no action"
2117
+ }
2118
+ },
2119
+ "compositePrimaryKeys": {
2120
+ "site_member_site_id_user_id_pk": {
2121
+ "name": "site_member_site_id_user_id_pk",
2122
+ "columns": ["site_id", "user_id"]
2123
+ }
2124
+ },
2125
+ "uniqueConstraints": {},
2126
+ "policies": {},
2127
+ "checkConstraints": {
2128
+ "chk_site_member_role": {
2129
+ "name": "chk_site_member_role",
2130
+ "value": "\"site_member\".\"role\" IN ('owner', 'admin', 'editor')"
2131
+ }
2132
+ },
2133
+ "isRLSEnabled": false
2134
+ },
2135
+ "public.site": {
2136
+ "name": "site",
2137
+ "schema": "",
2138
+ "columns": {
2139
+ "id": {
2140
+ "name": "id",
2141
+ "type": "text",
2142
+ "primaryKey": true,
2143
+ "notNull": true
2144
+ },
2145
+ "key": {
2146
+ "name": "key",
2147
+ "type": "text",
2148
+ "primaryKey": false,
2149
+ "notNull": true
2150
+ },
2151
+ "status": {
2152
+ "name": "status",
2153
+ "type": "text",
2154
+ "primaryKey": false,
2155
+ "notNull": true,
2156
+ "default": "'active'"
2157
+ },
2158
+ "provisioning_idempotency_key": {
2159
+ "name": "provisioning_idempotency_key",
2160
+ "type": "text",
2161
+ "primaryKey": false,
2162
+ "notNull": false
2163
+ },
2164
+ "created_at": {
2165
+ "name": "created_at",
2166
+ "type": "integer",
2167
+ "primaryKey": false,
2168
+ "notNull": true
2169
+ },
2170
+ "updated_at": {
2171
+ "name": "updated_at",
2172
+ "type": "integer",
2173
+ "primaryKey": false,
2174
+ "notNull": true
2175
+ }
2176
+ },
2177
+ "indexes": {
2178
+ "uq_site_key": {
2179
+ "name": "uq_site_key",
2180
+ "columns": [
2181
+ {
2182
+ "expression": "key",
2183
+ "isExpression": false,
2184
+ "asc": true,
2185
+ "nulls": "last"
2186
+ }
2187
+ ],
2188
+ "isUnique": true,
2189
+ "concurrently": false,
2190
+ "method": "btree",
2191
+ "with": {}
2192
+ },
2193
+ "uq_site_provisioning_idempotency_key": {
2194
+ "name": "uq_site_provisioning_idempotency_key",
2195
+ "columns": [
2196
+ {
2197
+ "expression": "provisioning_idempotency_key",
2198
+ "isExpression": false,
2199
+ "asc": true,
2200
+ "nulls": "last"
2201
+ }
2202
+ ],
2203
+ "isUnique": true,
2204
+ "where": "\"site\".\"provisioning_idempotency_key\" IS NOT NULL",
2205
+ "concurrently": false,
2206
+ "method": "btree",
2207
+ "with": {}
2208
+ }
2209
+ },
2210
+ "foreignKeys": {},
2211
+ "compositePrimaryKeys": {},
2212
+ "uniqueConstraints": {},
2213
+ "policies": {},
2214
+ "checkConstraints": {
2215
+ "chk_site_status": {
2216
+ "name": "chk_site_status",
2217
+ "value": "\"site\".\"status\" IN ('active', 'suspended')"
2218
+ }
2219
+ },
2220
+ "isRLSEnabled": false
2221
+ },
2222
+ "public.storage_purge": {
2223
+ "name": "storage_purge",
2224
+ "schema": "",
2225
+ "columns": {
2226
+ "id": {
2227
+ "name": "id",
2228
+ "type": "text",
2229
+ "primaryKey": true,
2230
+ "notNull": true
2231
+ },
2232
+ "site_id": {
2233
+ "name": "site_id",
2234
+ "type": "text",
2235
+ "primaryKey": false,
2236
+ "notNull": true
2237
+ },
2238
+ "provider": {
2239
+ "name": "provider",
2240
+ "type": "text",
2241
+ "primaryKey": false,
2242
+ "notNull": true
2243
+ },
2244
+ "storage_key": {
2245
+ "name": "storage_key",
2246
+ "type": "text",
2247
+ "primaryKey": false,
2248
+ "notNull": true
2249
+ },
2250
+ "original_key": {
2251
+ "name": "original_key",
2252
+ "type": "text",
2253
+ "primaryKey": false,
2254
+ "notNull": true
2255
+ },
2256
+ "reason": {
2257
+ "name": "reason",
2258
+ "type": "text",
2259
+ "primaryKey": false,
2260
+ "notNull": false
2261
+ },
2262
+ "purge_after": {
2263
+ "name": "purge_after",
2264
+ "type": "integer",
2265
+ "primaryKey": false,
2266
+ "notNull": true
2267
+ },
2268
+ "created_at": {
2269
+ "name": "created_at",
2270
+ "type": "integer",
2271
+ "primaryKey": false,
2272
+ "notNull": true
2273
+ }
2274
+ },
2275
+ "indexes": {
2276
+ "uq_storage_purge_provider_key": {
2277
+ "name": "uq_storage_purge_provider_key",
2278
+ "columns": [
2279
+ {
2280
+ "expression": "provider",
2281
+ "isExpression": false,
2282
+ "asc": true,
2283
+ "nulls": "last"
2284
+ },
2285
+ {
2286
+ "expression": "storage_key",
2287
+ "isExpression": false,
2288
+ "asc": true,
2289
+ "nulls": "last"
2290
+ }
2291
+ ],
2292
+ "isUnique": true,
2293
+ "concurrently": false,
2294
+ "method": "btree",
2295
+ "with": {}
2296
+ },
2297
+ "idx_storage_purge_site_provider_due": {
2298
+ "name": "idx_storage_purge_site_provider_due",
2299
+ "columns": [
2300
+ {
2301
+ "expression": "site_id",
2302
+ "isExpression": false,
2303
+ "asc": true,
2304
+ "nulls": "last"
2305
+ },
2306
+ {
2307
+ "expression": "provider",
2308
+ "isExpression": false,
2309
+ "asc": true,
2310
+ "nulls": "last"
2311
+ },
2312
+ {
2313
+ "expression": "purge_after",
2314
+ "isExpression": false,
2315
+ "asc": true,
2316
+ "nulls": "last"
2317
+ }
2318
+ ],
2319
+ "isUnique": false,
2320
+ "concurrently": false,
2321
+ "method": "btree",
2322
+ "with": {}
2323
+ }
2324
+ },
2325
+ "foreignKeys": {
2326
+ "storage_purge_site_id_site_id_fk": {
2327
+ "name": "storage_purge_site_id_site_id_fk",
2328
+ "tableFrom": "storage_purge",
2329
+ "tableTo": "site",
2330
+ "columnsFrom": ["site_id"],
2331
+ "columnsTo": ["id"],
2332
+ "onDelete": "cascade",
2333
+ "onUpdate": "no action"
2334
+ }
2335
+ },
2336
+ "compositePrimaryKeys": {},
2337
+ "uniqueConstraints": {},
2338
+ "policies": {},
2339
+ "checkConstraints": {},
2340
+ "isRLSEnabled": false
2341
+ },
2342
+ "public.telegram_binding": {
2343
+ "name": "telegram_binding",
2344
+ "schema": "",
2345
+ "columns": {
2346
+ "id": {
2347
+ "name": "id",
2348
+ "type": "text",
2349
+ "primaryKey": true,
2350
+ "notNull": true
2351
+ },
2352
+ "site_id": {
2353
+ "name": "site_id",
2354
+ "type": "text",
2355
+ "primaryKey": false,
2356
+ "notNull": true
2357
+ },
2358
+ "bot_id": {
2359
+ "name": "bot_id",
2360
+ "type": "text",
2361
+ "primaryKey": false,
2362
+ "notNull": true
2363
+ },
2364
+ "telegram_user_id": {
2365
+ "name": "telegram_user_id",
2366
+ "type": "text",
2367
+ "primaryKey": false,
2368
+ "notNull": true
2369
+ },
2370
+ "telegram_username": {
2371
+ "name": "telegram_username",
2372
+ "type": "text",
2373
+ "primaryKey": false,
2374
+ "notNull": false
2375
+ },
2376
+ "last_update_id": {
2377
+ "name": "last_update_id",
2378
+ "type": "integer",
2379
+ "primaryKey": false,
2380
+ "notNull": false
2381
+ },
2382
+ "bound_at": {
2383
+ "name": "bound_at",
2384
+ "type": "integer",
2385
+ "primaryKey": false,
2386
+ "notNull": true
2387
+ }
2388
+ },
2389
+ "indexes": {
2390
+ "uq_telegram_binding_site_id": {
2391
+ "name": "uq_telegram_binding_site_id",
2392
+ "columns": [
2393
+ {
2394
+ "expression": "site_id",
2395
+ "isExpression": false,
2396
+ "asc": true,
2397
+ "nulls": "last"
2398
+ }
2399
+ ],
2400
+ "isUnique": true,
2401
+ "concurrently": false,
2402
+ "method": "btree",
2403
+ "with": {}
2404
+ },
2405
+ "uq_telegram_binding_bot_user": {
2406
+ "name": "uq_telegram_binding_bot_user",
2407
+ "columns": [
2408
+ {
2409
+ "expression": "bot_id",
2410
+ "isExpression": false,
2411
+ "asc": true,
2412
+ "nulls": "last"
2413
+ },
2414
+ {
2415
+ "expression": "telegram_user_id",
2416
+ "isExpression": false,
2417
+ "asc": true,
2418
+ "nulls": "last"
2419
+ }
2420
+ ],
2421
+ "isUnique": true,
2422
+ "concurrently": false,
2423
+ "method": "btree",
2424
+ "with": {}
2425
+ }
2426
+ },
2427
+ "foreignKeys": {
2428
+ "telegram_binding_site_id_site_id_fk": {
2429
+ "name": "telegram_binding_site_id_site_id_fk",
2430
+ "tableFrom": "telegram_binding",
2431
+ "tableTo": "site",
2432
+ "columnsFrom": ["site_id"],
2433
+ "columnsTo": ["id"],
2434
+ "onDelete": "cascade",
2435
+ "onUpdate": "no action"
2436
+ }
2437
+ },
2438
+ "compositePrimaryKeys": {},
2439
+ "uniqueConstraints": {},
2440
+ "policies": {},
2441
+ "checkConstraints": {},
2442
+ "isRLSEnabled": false
2443
+ },
2444
+ "public.telegram_media_group_item": {
2445
+ "name": "telegram_media_group_item",
2446
+ "schema": "",
2447
+ "columns": {
2448
+ "id": {
2449
+ "name": "id",
2450
+ "type": "text",
2451
+ "primaryKey": true,
2452
+ "notNull": true
2453
+ },
2454
+ "site_id": {
2455
+ "name": "site_id",
2456
+ "type": "text",
2457
+ "primaryKey": false,
2458
+ "notNull": true
2459
+ },
2460
+ "bot_id": {
2461
+ "name": "bot_id",
2462
+ "type": "text",
2463
+ "primaryKey": false,
2464
+ "notNull": true
2465
+ },
2466
+ "telegram_user_id": {
2467
+ "name": "telegram_user_id",
2468
+ "type": "text",
2469
+ "primaryKey": false,
2470
+ "notNull": true
2471
+ },
2472
+ "media_group_id": {
2473
+ "name": "media_group_id",
2474
+ "type": "text",
2475
+ "primaryKey": false,
2476
+ "notNull": true
2477
+ },
2478
+ "chat_id": {
2479
+ "name": "chat_id",
2480
+ "type": "integer",
2481
+ "primaryKey": false,
2482
+ "notNull": true
2483
+ },
2484
+ "message_id": {
2485
+ "name": "message_id",
2486
+ "type": "integer",
2487
+ "primaryKey": false,
2488
+ "notNull": true
2489
+ },
2490
+ "update_id": {
2491
+ "name": "update_id",
2492
+ "type": "integer",
2493
+ "primaryKey": false,
2494
+ "notNull": true
2495
+ },
2496
+ "file_id": {
2497
+ "name": "file_id",
2498
+ "type": "text",
2499
+ "primaryKey": false,
2500
+ "notNull": true
2501
+ },
2502
+ "media_kind": {
2503
+ "name": "media_kind",
2504
+ "type": "text",
2505
+ "primaryKey": false,
2506
+ "notNull": true
2507
+ },
2508
+ "mime_type": {
2509
+ "name": "mime_type",
2510
+ "type": "text",
2511
+ "primaryKey": false,
2512
+ "notNull": false
2513
+ },
2514
+ "original_name": {
2515
+ "name": "original_name",
2516
+ "type": "text",
2517
+ "primaryKey": false,
2518
+ "notNull": false
2519
+ },
2520
+ "caption_markdown": {
2521
+ "name": "caption_markdown",
2522
+ "type": "text",
2523
+ "primaryKey": false,
2524
+ "notNull": false
2525
+ },
2526
+ "width": {
2527
+ "name": "width",
2528
+ "type": "integer",
2529
+ "primaryKey": false,
2530
+ "notNull": false
2531
+ },
2532
+ "height": {
2533
+ "name": "height",
2534
+ "type": "integer",
2535
+ "primaryKey": false,
2536
+ "notNull": false
2537
+ },
2538
+ "duration_seconds": {
2539
+ "name": "duration_seconds",
2540
+ "type": "integer",
2541
+ "primaryKey": false,
2542
+ "notNull": false
2543
+ },
2544
+ "poster_file_id": {
2545
+ "name": "poster_file_id",
2546
+ "type": "text",
2547
+ "primaryKey": false,
2548
+ "notNull": false
2549
+ },
2550
+ "created_at": {
2551
+ "name": "created_at",
2552
+ "type": "integer",
2553
+ "primaryKey": false,
2554
+ "notNull": true
2555
+ }
2556
+ },
2557
+ "indexes": {
2558
+ "idx_telegram_media_group_item_group": {
2559
+ "name": "idx_telegram_media_group_item_group",
2560
+ "columns": [
2561
+ {
2562
+ "expression": "bot_id",
2563
+ "isExpression": false,
2564
+ "asc": true,
2565
+ "nulls": "last"
2566
+ },
2567
+ {
2568
+ "expression": "media_group_id",
2569
+ "isExpression": false,
2570
+ "asc": true,
2571
+ "nulls": "last"
2572
+ }
2573
+ ],
2574
+ "isUnique": false,
2575
+ "concurrently": false,
2576
+ "method": "btree",
2577
+ "with": {}
2578
+ },
2579
+ "uq_telegram_media_group_item_message": {
2580
+ "name": "uq_telegram_media_group_item_message",
2581
+ "columns": [
2582
+ {
2583
+ "expression": "bot_id",
2584
+ "isExpression": false,
2585
+ "asc": true,
2586
+ "nulls": "last"
2587
+ },
2588
+ {
2589
+ "expression": "media_group_id",
2590
+ "isExpression": false,
2591
+ "asc": true,
2592
+ "nulls": "last"
2593
+ },
2594
+ {
2595
+ "expression": "message_id",
2596
+ "isExpression": false,
2597
+ "asc": true,
2598
+ "nulls": "last"
2599
+ }
2600
+ ],
2601
+ "isUnique": true,
2602
+ "concurrently": false,
2603
+ "method": "btree",
2604
+ "with": {}
2605
+ }
2606
+ },
2607
+ "foreignKeys": {
2608
+ "telegram_media_group_item_site_id_site_id_fk": {
2609
+ "name": "telegram_media_group_item_site_id_site_id_fk",
2610
+ "tableFrom": "telegram_media_group_item",
2611
+ "tableTo": "site",
2612
+ "columnsFrom": ["site_id"],
2613
+ "columnsTo": ["id"],
2614
+ "onDelete": "cascade",
2615
+ "onUpdate": "no action"
2616
+ }
2617
+ },
2618
+ "compositePrimaryKeys": {},
2619
+ "uniqueConstraints": {},
2620
+ "policies": {},
2621
+ "checkConstraints": {},
2622
+ "isRLSEnabled": false
2623
+ },
2624
+ "public.telegram_pending_binding": {
2625
+ "name": "telegram_pending_binding",
2626
+ "schema": "",
2627
+ "columns": {
2628
+ "id": {
2629
+ "name": "id",
2630
+ "type": "text",
2631
+ "primaryKey": true,
2632
+ "notNull": true
2633
+ },
2634
+ "site_id": {
2635
+ "name": "site_id",
2636
+ "type": "text",
2637
+ "primaryKey": false,
2638
+ "notNull": true
2639
+ },
2640
+ "code": {
2641
+ "name": "code",
2642
+ "type": "text",
2643
+ "primaryKey": false,
2644
+ "notNull": true
2645
+ },
2646
+ "created_at": {
2647
+ "name": "created_at",
2648
+ "type": "integer",
2649
+ "primaryKey": false,
2650
+ "notNull": true
2651
+ },
2652
+ "expires_at": {
2653
+ "name": "expires_at",
2654
+ "type": "integer",
2655
+ "primaryKey": false,
2656
+ "notNull": true
2657
+ }
2658
+ },
2659
+ "indexes": {
2660
+ "uq_telegram_pending_binding_site_id": {
2661
+ "name": "uq_telegram_pending_binding_site_id",
2662
+ "columns": [
2663
+ {
2664
+ "expression": "site_id",
2665
+ "isExpression": false,
2666
+ "asc": true,
2667
+ "nulls": "last"
2668
+ }
2669
+ ],
2670
+ "isUnique": true,
2671
+ "concurrently": false,
2672
+ "method": "btree",
2673
+ "with": {}
2674
+ },
2675
+ "uq_telegram_pending_binding_code": {
2676
+ "name": "uq_telegram_pending_binding_code",
2677
+ "columns": [
2678
+ {
2679
+ "expression": "code",
2680
+ "isExpression": false,
2681
+ "asc": true,
2682
+ "nulls": "last"
2683
+ }
2684
+ ],
2685
+ "isUnique": true,
2686
+ "concurrently": false,
2687
+ "method": "btree",
2688
+ "with": {}
2689
+ }
2690
+ },
2691
+ "foreignKeys": {
2692
+ "telegram_pending_binding_site_id_site_id_fk": {
2693
+ "name": "telegram_pending_binding_site_id_site_id_fk",
2694
+ "tableFrom": "telegram_pending_binding",
2695
+ "tableTo": "site",
2696
+ "columnsFrom": ["site_id"],
2697
+ "columnsTo": ["id"],
2698
+ "onDelete": "cascade",
2699
+ "onUpdate": "no action"
2700
+ }
2701
+ },
2702
+ "compositePrimaryKeys": {},
2703
+ "uniqueConstraints": {},
2704
+ "policies": {},
2705
+ "checkConstraints": {},
2706
+ "isRLSEnabled": false
2707
+ },
2708
+ "public.thread_collection": {
2709
+ "name": "thread_collection",
2710
+ "schema": "",
2711
+ "columns": {
2712
+ "site_id": {
2713
+ "name": "site_id",
2714
+ "type": "text",
2715
+ "primaryKey": false,
2716
+ "notNull": true
2717
+ },
2718
+ "thread_id": {
2719
+ "name": "thread_id",
2720
+ "type": "text",
2721
+ "primaryKey": false,
2722
+ "notNull": true
2723
+ },
2724
+ "collection_id": {
2725
+ "name": "collection_id",
2726
+ "type": "text",
2727
+ "primaryKey": false,
2728
+ "notNull": true
2729
+ },
2730
+ "created_at": {
2731
+ "name": "created_at",
2732
+ "type": "integer",
2733
+ "primaryKey": false,
2734
+ "notNull": true
2735
+ },
2736
+ "position": {
2737
+ "name": "position",
2738
+ "type": "integer",
2739
+ "primaryKey": false,
2740
+ "notNull": true,
2741
+ "default": 0
2742
+ },
2743
+ "pinned_at": {
2744
+ "name": "pinned_at",
2745
+ "type": "integer",
2746
+ "primaryKey": false,
2747
+ "notNull": false
2748
+ }
2749
+ },
2750
+ "indexes": {
2751
+ "idx_thread_collection_site_collection_id": {
2752
+ "name": "idx_thread_collection_site_collection_id",
2753
+ "columns": [
2754
+ {
2755
+ "expression": "site_id",
2756
+ "isExpression": false,
2757
+ "asc": true,
2758
+ "nulls": "last"
2759
+ },
2760
+ {
2761
+ "expression": "collection_id",
2762
+ "isExpression": false,
2763
+ "asc": true,
2764
+ "nulls": "last"
2765
+ }
2766
+ ],
2767
+ "isUnique": false,
2768
+ "concurrently": false,
2769
+ "method": "btree",
2770
+ "with": {}
2771
+ },
2772
+ "idx_thread_collection_site_collection_created_thread": {
2773
+ "name": "idx_thread_collection_site_collection_created_thread",
2774
+ "columns": [
2775
+ {
2776
+ "expression": "site_id",
2777
+ "isExpression": false,
2778
+ "asc": true,
2779
+ "nulls": "last"
2780
+ },
2781
+ {
2782
+ "expression": "collection_id",
2783
+ "isExpression": false,
2784
+ "asc": true,
2785
+ "nulls": "last"
2786
+ },
2787
+ {
2788
+ "expression": "created_at",
2789
+ "isExpression": false,
2790
+ "asc": true,
2791
+ "nulls": "last"
2792
+ },
2793
+ {
2794
+ "expression": "thread_id",
2795
+ "isExpression": false,
2796
+ "asc": true,
2797
+ "nulls": "last"
2798
+ }
2799
+ ],
2800
+ "isUnique": false,
2801
+ "concurrently": false,
2802
+ "method": "btree",
2803
+ "with": {}
2804
+ }
2805
+ },
2806
+ "foreignKeys": {
2807
+ "thread_collection_site_id_site_id_fk": {
2808
+ "name": "thread_collection_site_id_site_id_fk",
2809
+ "tableFrom": "thread_collection",
2810
+ "tableTo": "site",
2811
+ "columnsFrom": ["site_id"],
2812
+ "columnsTo": ["id"],
2813
+ "onDelete": "cascade",
2814
+ "onUpdate": "no action"
2815
+ },
2816
+ "thread_collection_thread_id_post_id_fk": {
2817
+ "name": "thread_collection_thread_id_post_id_fk",
2818
+ "tableFrom": "thread_collection",
2819
+ "tableTo": "post",
2820
+ "columnsFrom": ["thread_id"],
2821
+ "columnsTo": ["id"],
2822
+ "onDelete": "cascade",
2823
+ "onUpdate": "no action"
2824
+ },
2825
+ "thread_collection_collection_id_collection_id_fk": {
2826
+ "name": "thread_collection_collection_id_collection_id_fk",
2827
+ "tableFrom": "thread_collection",
2828
+ "tableTo": "collection",
2829
+ "columnsFrom": ["collection_id"],
2830
+ "columnsTo": ["id"],
2831
+ "onDelete": "cascade",
2832
+ "onUpdate": "no action"
2833
+ }
2834
+ },
2835
+ "compositePrimaryKeys": {
2836
+ "thread_collection_site_id_thread_id_collection_id_pk": {
2837
+ "name": "thread_collection_site_id_thread_id_collection_id_pk",
2838
+ "columns": ["site_id", "thread_id", "collection_id"]
2839
+ }
2840
+ },
2841
+ "uniqueConstraints": {},
2842
+ "policies": {},
2843
+ "checkConstraints": {},
2844
+ "isRLSEnabled": false
2845
+ },
2846
+ "public.upload_session": {
2847
+ "name": "upload_session",
2848
+ "schema": "",
2849
+ "columns": {
2850
+ "id": {
2851
+ "name": "id",
2852
+ "type": "text",
2853
+ "primaryKey": true,
2854
+ "notNull": true
2855
+ },
2856
+ "site_id": {
2857
+ "name": "site_id",
2858
+ "type": "text",
2859
+ "primaryKey": false,
2860
+ "notNull": true
2861
+ },
2862
+ "media_id": {
2863
+ "name": "media_id",
2864
+ "type": "text",
2865
+ "primaryKey": false,
2866
+ "notNull": true
2867
+ },
2868
+ "original_name": {
2869
+ "name": "original_name",
2870
+ "type": "text",
2871
+ "primaryKey": false,
2872
+ "notNull": true
2873
+ },
2874
+ "filename": {
2875
+ "name": "filename",
2876
+ "type": "text",
2877
+ "primaryKey": false,
2878
+ "notNull": true
2879
+ },
2880
+ "provider": {
2881
+ "name": "provider",
2882
+ "type": "text",
2883
+ "primaryKey": false,
2884
+ "notNull": true
2885
+ },
2886
+ "expected_content_type": {
2887
+ "name": "expected_content_type",
2888
+ "type": "text",
2889
+ "primaryKey": false,
2890
+ "notNull": true
2891
+ },
2892
+ "expected_size": {
2893
+ "name": "expected_size",
2894
+ "type": "integer",
2895
+ "primaryKey": false,
2896
+ "notNull": true
2897
+ },
2898
+ "expected_checksum_sha256": {
2899
+ "name": "expected_checksum_sha256",
2900
+ "type": "text",
2901
+ "primaryKey": false,
2902
+ "notNull": false
2903
+ },
2904
+ "content_disposition": {
2905
+ "name": "content_disposition",
2906
+ "type": "text",
2907
+ "primaryKey": false,
2908
+ "notNull": true,
2909
+ "default": "'inline'"
2910
+ },
2911
+ "temp_storage_key": {
2912
+ "name": "temp_storage_key",
2913
+ "type": "text",
2914
+ "primaryKey": false,
2915
+ "notNull": true
2916
+ },
2917
+ "final_storage_key": {
2918
+ "name": "final_storage_key",
2919
+ "type": "text",
2920
+ "primaryKey": false,
2921
+ "notNull": true
2922
+ },
2923
+ "multipart_upload_id": {
2924
+ "name": "multipart_upload_id",
2925
+ "type": "text",
2926
+ "primaryKey": false,
2927
+ "notNull": false
2928
+ },
2929
+ "state": {
2930
+ "name": "state",
2931
+ "type": "text",
2932
+ "primaryKey": false,
2933
+ "notNull": true,
2934
+ "default": "'pending'"
2935
+ },
2936
+ "expires_at": {
2937
+ "name": "expires_at",
2938
+ "type": "integer",
2939
+ "primaryKey": false,
2940
+ "notNull": true
2941
+ },
2942
+ "created_at": {
2943
+ "name": "created_at",
2944
+ "type": "integer",
2945
+ "primaryKey": false,
2946
+ "notNull": true
2947
+ },
2948
+ "updated_at": {
2949
+ "name": "updated_at",
2950
+ "type": "integer",
2951
+ "primaryKey": false,
2952
+ "notNull": true
2953
+ }
2954
+ },
2955
+ "indexes": {
2956
+ "uq_upload_session_media_id": {
2957
+ "name": "uq_upload_session_media_id",
2958
+ "columns": [
2959
+ {
2960
+ "expression": "media_id",
2961
+ "isExpression": false,
2962
+ "asc": true,
2963
+ "nulls": "last"
2964
+ }
2965
+ ],
2966
+ "isUnique": true,
2967
+ "concurrently": false,
2968
+ "method": "btree",
2969
+ "with": {}
2970
+ },
2971
+ "uq_upload_session_temp_storage_key": {
2972
+ "name": "uq_upload_session_temp_storage_key",
2973
+ "columns": [
2974
+ {
2975
+ "expression": "temp_storage_key",
2976
+ "isExpression": false,
2977
+ "asc": true,
2978
+ "nulls": "last"
2979
+ }
2980
+ ],
2981
+ "isUnique": true,
2982
+ "concurrently": false,
2983
+ "method": "btree",
2984
+ "with": {}
2985
+ },
2986
+ "uq_upload_session_final_storage_key": {
2987
+ "name": "uq_upload_session_final_storage_key",
2988
+ "columns": [
2989
+ {
2990
+ "expression": "final_storage_key",
2991
+ "isExpression": false,
2992
+ "asc": true,
2993
+ "nulls": "last"
2994
+ }
2995
+ ],
2996
+ "isUnique": true,
2997
+ "concurrently": false,
2998
+ "method": "btree",
2999
+ "with": {}
3000
+ },
3001
+ "idx_upload_session_site_state": {
3002
+ "name": "idx_upload_session_site_state",
3003
+ "columns": [
3004
+ {
3005
+ "expression": "site_id",
3006
+ "isExpression": false,
3007
+ "asc": true,
3008
+ "nulls": "last"
3009
+ },
3010
+ {
3011
+ "expression": "state",
3012
+ "isExpression": false,
3013
+ "asc": true,
3014
+ "nulls": "last"
3015
+ }
3016
+ ],
3017
+ "isUnique": false,
3018
+ "concurrently": false,
3019
+ "method": "btree",
3020
+ "with": {}
3021
+ },
3022
+ "idx_upload_session_site_expires_at": {
3023
+ "name": "idx_upload_session_site_expires_at",
3024
+ "columns": [
3025
+ {
3026
+ "expression": "site_id",
3027
+ "isExpression": false,
3028
+ "asc": true,
3029
+ "nulls": "last"
3030
+ },
3031
+ {
3032
+ "expression": "expires_at",
3033
+ "isExpression": false,
3034
+ "asc": true,
3035
+ "nulls": "last"
3036
+ }
3037
+ ],
3038
+ "isUnique": false,
3039
+ "concurrently": false,
3040
+ "method": "btree",
3041
+ "with": {}
3042
+ }
3043
+ },
3044
+ "foreignKeys": {
3045
+ "upload_session_site_id_site_id_fk": {
3046
+ "name": "upload_session_site_id_site_id_fk",
3047
+ "tableFrom": "upload_session",
3048
+ "tableTo": "site",
3049
+ "columnsFrom": ["site_id"],
3050
+ "columnsTo": ["id"],
3051
+ "onDelete": "cascade",
3052
+ "onUpdate": "no action"
3053
+ }
3054
+ },
3055
+ "compositePrimaryKeys": {},
3056
+ "uniqueConstraints": {},
3057
+ "policies": {},
3058
+ "checkConstraints": {
3059
+ "chk_upload_session_expected_size_positive": {
3060
+ "name": "chk_upload_session_expected_size_positive",
3061
+ "value": "\"upload_session\".\"expected_size\" > 0"
3062
+ },
3063
+ "chk_upload_session_state": {
3064
+ "name": "chk_upload_session_state",
3065
+ "value": "\"upload_session\".\"state\" IN ('pending', 'uploaded', 'completed', 'aborted', 'failed')"
3066
+ },
3067
+ "chk_upload_session_content_disposition": {
3068
+ "name": "chk_upload_session_content_disposition",
3069
+ "value": "\"upload_session\".\"content_disposition\" IN ('inline', 'attachment')"
3070
+ }
3071
+ },
3072
+ "isRLSEnabled": false
3073
+ },
3074
+ "public.user": {
3075
+ "name": "user",
3076
+ "schema": "",
3077
+ "columns": {
3078
+ "id": {
3079
+ "name": "id",
3080
+ "type": "text",
3081
+ "primaryKey": true,
3082
+ "notNull": true
3083
+ },
3084
+ "name": {
3085
+ "name": "name",
3086
+ "type": "text",
3087
+ "primaryKey": false,
3088
+ "notNull": true
3089
+ },
3090
+ "email": {
3091
+ "name": "email",
3092
+ "type": "text",
3093
+ "primaryKey": false,
3094
+ "notNull": true
3095
+ },
3096
+ "email_verified": {
3097
+ "name": "email_verified",
3098
+ "type": "boolean",
3099
+ "primaryKey": false,
3100
+ "notNull": true,
3101
+ "default": false
3102
+ },
3103
+ "image": {
3104
+ "name": "image",
3105
+ "type": "text",
3106
+ "primaryKey": false,
3107
+ "notNull": false
3108
+ },
3109
+ "role": {
3110
+ "name": "role",
3111
+ "type": "text",
3112
+ "primaryKey": false,
3113
+ "notNull": false,
3114
+ "default": "'member'"
3115
+ },
3116
+ "created_at": {
3117
+ "name": "created_at",
3118
+ "type": "timestamp with time zone",
3119
+ "primaryKey": false,
3120
+ "notNull": true
3121
+ },
3122
+ "updated_at": {
3123
+ "name": "updated_at",
3124
+ "type": "timestamp with time zone",
3125
+ "primaryKey": false,
3126
+ "notNull": true
3127
+ }
3128
+ },
3129
+ "indexes": {},
3130
+ "foreignKeys": {},
3131
+ "compositePrimaryKeys": {},
3132
+ "uniqueConstraints": {
3133
+ "user_email_unique": {
3134
+ "name": "user_email_unique",
3135
+ "nullsNotDistinct": false,
3136
+ "columns": ["email"]
3137
+ }
3138
+ },
3139
+ "policies": {},
3140
+ "checkConstraints": {},
3141
+ "isRLSEnabled": false
3142
+ },
3143
+ "public.verification": {
3144
+ "name": "verification",
3145
+ "schema": "",
3146
+ "columns": {
3147
+ "id": {
3148
+ "name": "id",
3149
+ "type": "text",
3150
+ "primaryKey": true,
3151
+ "notNull": true
3152
+ },
3153
+ "identifier": {
3154
+ "name": "identifier",
3155
+ "type": "text",
3156
+ "primaryKey": false,
3157
+ "notNull": true
3158
+ },
3159
+ "value": {
3160
+ "name": "value",
3161
+ "type": "text",
3162
+ "primaryKey": false,
3163
+ "notNull": true
3164
+ },
3165
+ "expires_at": {
3166
+ "name": "expires_at",
3167
+ "type": "timestamp with time zone",
3168
+ "primaryKey": false,
3169
+ "notNull": true
3170
+ },
3171
+ "created_at": {
3172
+ "name": "created_at",
3173
+ "type": "timestamp with time zone",
3174
+ "primaryKey": false,
3175
+ "notNull": false
3176
+ },
3177
+ "updated_at": {
3178
+ "name": "updated_at",
3179
+ "type": "timestamp with time zone",
3180
+ "primaryKey": false,
3181
+ "notNull": false
3182
+ }
3183
+ },
3184
+ "indexes": {},
3185
+ "foreignKeys": {},
3186
+ "compositePrimaryKeys": {},
3187
+ "uniqueConstraints": {},
3188
+ "policies": {},
3189
+ "checkConstraints": {},
3190
+ "isRLSEnabled": false
3191
+ }
3192
+ },
3193
+ "enums": {},
3194
+ "schemas": {},
3195
+ "sequences": {},
3196
+ "roles": {},
3197
+ "policies": {},
3198
+ "views": {},
3199
+ "_meta": {
3200
+ "columns": {},
3201
+ "schemas": {},
3202
+ "tables": {}
3203
+ }
3204
+ }