@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,3211 @@
1
+ {
2
+ "id": "50f1e013-ae36-4d2c-94d0-aac5bbac009b",
3
+ "prevId": "cee0dc7d-eb90-4281-b08a-cc0115744035",
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_html_version": {
1335
+ "name": "body_html_version",
1336
+ "type": "integer",
1337
+ "primaryKey": false,
1338
+ "notNull": true,
1339
+ "default": 1
1340
+ },
1341
+ "body_text": {
1342
+ "name": "body_text",
1343
+ "type": "text",
1344
+ "primaryKey": false,
1345
+ "notNull": false
1346
+ },
1347
+ "quote_text": {
1348
+ "name": "quote_text",
1349
+ "type": "text",
1350
+ "primaryKey": false,
1351
+ "notNull": false
1352
+ },
1353
+ "summary": {
1354
+ "name": "summary",
1355
+ "type": "text",
1356
+ "primaryKey": false,
1357
+ "notNull": false
1358
+ },
1359
+ "search_text": {
1360
+ "name": "search_text",
1361
+ "type": "text",
1362
+ "primaryKey": false,
1363
+ "notNull": false,
1364
+ "generated": {
1365
+ "as": "coalesce(\"title\", '') || ' ' || coalesce(\"url\", '') || ' ' || coalesce(\"quote_text\", '') || ' ' || coalesce(\"body_text\", '')",
1366
+ "type": "stored"
1367
+ }
1368
+ },
1369
+ "search_document": {
1370
+ "name": "search_document",
1371
+ "type": "tsvector",
1372
+ "primaryKey": false,
1373
+ "notNull": false,
1374
+ "generated": {
1375
+ "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')",
1376
+ "type": "stored"
1377
+ }
1378
+ },
1379
+ "rating": {
1380
+ "name": "rating",
1381
+ "type": "integer",
1382
+ "primaryKey": false,
1383
+ "notNull": false
1384
+ },
1385
+ "preview_image_key": {
1386
+ "name": "preview_image_key",
1387
+ "type": "text",
1388
+ "primaryKey": false,
1389
+ "notNull": false
1390
+ },
1391
+ "preview_kind": {
1392
+ "name": "preview_kind",
1393
+ "type": "text",
1394
+ "primaryKey": false,
1395
+ "notNull": false
1396
+ },
1397
+ "preview_provider": {
1398
+ "name": "preview_provider",
1399
+ "type": "text",
1400
+ "primaryKey": false,
1401
+ "notNull": false
1402
+ },
1403
+ "reply_to_id": {
1404
+ "name": "reply_to_id",
1405
+ "type": "text",
1406
+ "primaryKey": false,
1407
+ "notNull": false
1408
+ },
1409
+ "thread_id": {
1410
+ "name": "thread_id",
1411
+ "type": "text",
1412
+ "primaryKey": false,
1413
+ "notNull": true
1414
+ },
1415
+ "published_at": {
1416
+ "name": "published_at",
1417
+ "type": "integer",
1418
+ "primaryKey": false,
1419
+ "notNull": false
1420
+ },
1421
+ "last_activity_at": {
1422
+ "name": "last_activity_at",
1423
+ "type": "integer",
1424
+ "primaryKey": false,
1425
+ "notNull": false
1426
+ },
1427
+ "created_at": {
1428
+ "name": "created_at",
1429
+ "type": "integer",
1430
+ "primaryKey": false,
1431
+ "notNull": true
1432
+ },
1433
+ "updated_at": {
1434
+ "name": "updated_at",
1435
+ "type": "integer",
1436
+ "primaryKey": false,
1437
+ "notNull": true
1438
+ }
1439
+ },
1440
+ "indexes": {
1441
+ "idx_post_site_thread_id": {
1442
+ "name": "idx_post_site_thread_id",
1443
+ "columns": [
1444
+ {
1445
+ "expression": "site_id",
1446
+ "isExpression": false,
1447
+ "asc": true,
1448
+ "nulls": "last"
1449
+ },
1450
+ {
1451
+ "expression": "thread_id",
1452
+ "isExpression": false,
1453
+ "asc": true,
1454
+ "nulls": "last"
1455
+ }
1456
+ ],
1457
+ "isUnique": false,
1458
+ "concurrently": false,
1459
+ "method": "btree",
1460
+ "with": {}
1461
+ },
1462
+ "idx_post_site_thread_created": {
1463
+ "name": "idx_post_site_thread_created",
1464
+ "columns": [
1465
+ {
1466
+ "expression": "site_id",
1467
+ "isExpression": false,
1468
+ "asc": true,
1469
+ "nulls": "last"
1470
+ },
1471
+ {
1472
+ "expression": "thread_id",
1473
+ "isExpression": false,
1474
+ "asc": true,
1475
+ "nulls": "last"
1476
+ },
1477
+ {
1478
+ "expression": "created_at",
1479
+ "isExpression": false,
1480
+ "asc": true,
1481
+ "nulls": "last"
1482
+ },
1483
+ {
1484
+ "expression": "id",
1485
+ "isExpression": false,
1486
+ "asc": true,
1487
+ "nulls": "last"
1488
+ }
1489
+ ],
1490
+ "isUnique": false,
1491
+ "concurrently": false,
1492
+ "method": "btree",
1493
+ "with": {}
1494
+ },
1495
+ "idx_post_site_status_published": {
1496
+ "name": "idx_post_site_status_published",
1497
+ "columns": [
1498
+ {
1499
+ "expression": "site_id",
1500
+ "isExpression": false,
1501
+ "asc": true,
1502
+ "nulls": "last"
1503
+ },
1504
+ {
1505
+ "expression": "status",
1506
+ "isExpression": false,
1507
+ "asc": true,
1508
+ "nulls": "last"
1509
+ },
1510
+ {
1511
+ "expression": "published_at",
1512
+ "isExpression": false,
1513
+ "asc": true,
1514
+ "nulls": "last"
1515
+ }
1516
+ ],
1517
+ "isUnique": false,
1518
+ "concurrently": false,
1519
+ "method": "btree",
1520
+ "with": {}
1521
+ },
1522
+ "idx_post_site_status_activity": {
1523
+ "name": "idx_post_site_status_activity",
1524
+ "columns": [
1525
+ {
1526
+ "expression": "site_id",
1527
+ "isExpression": false,
1528
+ "asc": true,
1529
+ "nulls": "last"
1530
+ },
1531
+ {
1532
+ "expression": "status",
1533
+ "isExpression": false,
1534
+ "asc": true,
1535
+ "nulls": "last"
1536
+ },
1537
+ {
1538
+ "expression": "last_activity_at",
1539
+ "isExpression": false,
1540
+ "asc": true,
1541
+ "nulls": "last"
1542
+ }
1543
+ ],
1544
+ "isUnique": false,
1545
+ "concurrently": false,
1546
+ "method": "btree",
1547
+ "with": {}
1548
+ },
1549
+ "idx_post_site_root_published_activity": {
1550
+ "name": "idx_post_site_root_published_activity",
1551
+ "columns": [
1552
+ {
1553
+ "expression": "site_id",
1554
+ "isExpression": false,
1555
+ "asc": true,
1556
+ "nulls": "last"
1557
+ },
1558
+ {
1559
+ "expression": "last_activity_at",
1560
+ "isExpression": false,
1561
+ "asc": true,
1562
+ "nulls": "last"
1563
+ },
1564
+ {
1565
+ "expression": "id",
1566
+ "isExpression": false,
1567
+ "asc": true,
1568
+ "nulls": "last"
1569
+ }
1570
+ ],
1571
+ "isUnique": false,
1572
+ "where": "\"post\".\"reply_to_id\" IS NULL AND \"post\".\"status\" = 'published'",
1573
+ "concurrently": false,
1574
+ "method": "btree",
1575
+ "with": {}
1576
+ },
1577
+ "idx_post_site_root_draft_updated": {
1578
+ "name": "idx_post_site_root_draft_updated",
1579
+ "columns": [
1580
+ {
1581
+ "expression": "site_id",
1582
+ "isExpression": false,
1583
+ "asc": true,
1584
+ "nulls": "last"
1585
+ },
1586
+ {
1587
+ "expression": "updated_at",
1588
+ "isExpression": false,
1589
+ "asc": true,
1590
+ "nulls": "last"
1591
+ },
1592
+ {
1593
+ "expression": "id",
1594
+ "isExpression": false,
1595
+ "asc": true,
1596
+ "nulls": "last"
1597
+ }
1598
+ ],
1599
+ "isUnique": false,
1600
+ "where": "\"post\".\"reply_to_id\" IS NULL AND \"post\".\"status\" = 'draft'",
1601
+ "concurrently": false,
1602
+ "method": "btree",
1603
+ "with": {}
1604
+ },
1605
+ "idx_post_site_reply_thread_created": {
1606
+ "name": "idx_post_site_reply_thread_created",
1607
+ "columns": [
1608
+ {
1609
+ "expression": "site_id",
1610
+ "isExpression": false,
1611
+ "asc": true,
1612
+ "nulls": "last"
1613
+ },
1614
+ {
1615
+ "expression": "thread_id",
1616
+ "isExpression": false,
1617
+ "asc": true,
1618
+ "nulls": "last"
1619
+ },
1620
+ {
1621
+ "expression": "created_at",
1622
+ "isExpression": false,
1623
+ "asc": true,
1624
+ "nulls": "last"
1625
+ },
1626
+ {
1627
+ "expression": "id",
1628
+ "isExpression": false,
1629
+ "asc": true,
1630
+ "nulls": "last"
1631
+ }
1632
+ ],
1633
+ "isUnique": false,
1634
+ "where": "\"post\".\"reply_to_id\" IS NOT NULL AND \"post\".\"status\" = 'published'",
1635
+ "concurrently": false,
1636
+ "method": "btree",
1637
+ "with": {}
1638
+ },
1639
+ "idx_post_site_featured_thread_published": {
1640
+ "name": "idx_post_site_featured_thread_published",
1641
+ "columns": [
1642
+ {
1643
+ "expression": "site_id",
1644
+ "isExpression": false,
1645
+ "asc": true,
1646
+ "nulls": "last"
1647
+ },
1648
+ {
1649
+ "expression": "thread_id",
1650
+ "isExpression": false,
1651
+ "asc": true,
1652
+ "nulls": "last"
1653
+ },
1654
+ {
1655
+ "expression": "published_at",
1656
+ "isExpression": false,
1657
+ "asc": true,
1658
+ "nulls": "last"
1659
+ },
1660
+ {
1661
+ "expression": "id",
1662
+ "isExpression": false,
1663
+ "asc": true,
1664
+ "nulls": "last"
1665
+ }
1666
+ ],
1667
+ "isUnique": false,
1668
+ "where": "\"post\".\"status\" = 'published' AND \"post\".\"featured_at\" IS NOT NULL",
1669
+ "concurrently": false,
1670
+ "method": "btree",
1671
+ "with": {}
1672
+ },
1673
+ "idx_post_search_document": {
1674
+ "name": "idx_post_search_document",
1675
+ "columns": [
1676
+ {
1677
+ "expression": "search_document",
1678
+ "isExpression": false,
1679
+ "asc": true,
1680
+ "nulls": "last"
1681
+ }
1682
+ ],
1683
+ "isUnique": false,
1684
+ "concurrently": false,
1685
+ "method": "gin",
1686
+ "with": {}
1687
+ },
1688
+ "idx_post_search_text_trgm": {
1689
+ "name": "idx_post_search_text_trgm",
1690
+ "columns": [
1691
+ {
1692
+ "expression": "search_text",
1693
+ "isExpression": false,
1694
+ "asc": true,
1695
+ "nulls": "last",
1696
+ "opclass": "gin_trgm_ops"
1697
+ }
1698
+ ],
1699
+ "isUnique": false,
1700
+ "concurrently": false,
1701
+ "method": "gin",
1702
+ "with": {}
1703
+ }
1704
+ },
1705
+ "foreignKeys": {
1706
+ "post_site_id_site_id_fk": {
1707
+ "name": "post_site_id_site_id_fk",
1708
+ "tableFrom": "post",
1709
+ "tableTo": "site",
1710
+ "columnsFrom": ["site_id"],
1711
+ "columnsTo": ["id"],
1712
+ "onDelete": "cascade",
1713
+ "onUpdate": "no action"
1714
+ },
1715
+ "post_site_id_reply_to_id_post_site_id_id_fk": {
1716
+ "name": "post_site_id_reply_to_id_post_site_id_id_fk",
1717
+ "tableFrom": "post",
1718
+ "tableTo": "post",
1719
+ "columnsFrom": ["site_id", "reply_to_id"],
1720
+ "columnsTo": ["site_id", "id"],
1721
+ "onDelete": "no action",
1722
+ "onUpdate": "no action"
1723
+ },
1724
+ "post_site_id_thread_id_post_site_id_id_fk": {
1725
+ "name": "post_site_id_thread_id_post_site_id_id_fk",
1726
+ "tableFrom": "post",
1727
+ "tableTo": "post",
1728
+ "columnsFrom": ["site_id", "thread_id"],
1729
+ "columnsTo": ["site_id", "id"],
1730
+ "onDelete": "no action",
1731
+ "onUpdate": "no action"
1732
+ }
1733
+ },
1734
+ "compositePrimaryKeys": {},
1735
+ "uniqueConstraints": {
1736
+ "uq_post_site_id_id": {
1737
+ "name": "uq_post_site_id_id",
1738
+ "nullsNotDistinct": false,
1739
+ "columns": ["site_id", "id"]
1740
+ }
1741
+ },
1742
+ "policies": {},
1743
+ "checkConstraints": {
1744
+ "chk_post_reply_to_not_self": {
1745
+ "name": "chk_post_reply_to_not_self",
1746
+ "value": "\"post\".\"reply_to_id\" IS NULL OR \"post\".\"reply_to_id\" <> \"post\".\"id\""
1747
+ },
1748
+ "chk_post_thread_shape": {
1749
+ "name": "chk_post_thread_shape",
1750
+ "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 )"
1751
+ }
1752
+ },
1753
+ "isRLSEnabled": false
1754
+ },
1755
+ "public.rate_limit": {
1756
+ "name": "rate_limit",
1757
+ "schema": "",
1758
+ "columns": {
1759
+ "key": {
1760
+ "name": "key",
1761
+ "type": "text",
1762
+ "primaryKey": false,
1763
+ "notNull": true
1764
+ },
1765
+ "window_start": {
1766
+ "name": "window_start",
1767
+ "type": "integer",
1768
+ "primaryKey": false,
1769
+ "notNull": true
1770
+ },
1771
+ "count": {
1772
+ "name": "count",
1773
+ "type": "integer",
1774
+ "primaryKey": false,
1775
+ "notNull": true,
1776
+ "default": 0
1777
+ }
1778
+ },
1779
+ "indexes": {},
1780
+ "foreignKeys": {},
1781
+ "compositePrimaryKeys": {
1782
+ "rate_limit_key_window_start_pk": {
1783
+ "name": "rate_limit_key_window_start_pk",
1784
+ "columns": ["key", "window_start"]
1785
+ }
1786
+ },
1787
+ "uniqueConstraints": {},
1788
+ "policies": {},
1789
+ "checkConstraints": {},
1790
+ "isRLSEnabled": false
1791
+ },
1792
+ "public.session": {
1793
+ "name": "session",
1794
+ "schema": "",
1795
+ "columns": {
1796
+ "id": {
1797
+ "name": "id",
1798
+ "type": "text",
1799
+ "primaryKey": true,
1800
+ "notNull": true
1801
+ },
1802
+ "expires_at": {
1803
+ "name": "expires_at",
1804
+ "type": "timestamp with time zone",
1805
+ "primaryKey": false,
1806
+ "notNull": true
1807
+ },
1808
+ "token": {
1809
+ "name": "token",
1810
+ "type": "text",
1811
+ "primaryKey": false,
1812
+ "notNull": true
1813
+ },
1814
+ "created_at": {
1815
+ "name": "created_at",
1816
+ "type": "timestamp with time zone",
1817
+ "primaryKey": false,
1818
+ "notNull": true
1819
+ },
1820
+ "updated_at": {
1821
+ "name": "updated_at",
1822
+ "type": "timestamp with time zone",
1823
+ "primaryKey": false,
1824
+ "notNull": true
1825
+ },
1826
+ "ip_address": {
1827
+ "name": "ip_address",
1828
+ "type": "text",
1829
+ "primaryKey": false,
1830
+ "notNull": false
1831
+ },
1832
+ "user_agent": {
1833
+ "name": "user_agent",
1834
+ "type": "text",
1835
+ "primaryKey": false,
1836
+ "notNull": false
1837
+ },
1838
+ "user_id": {
1839
+ "name": "user_id",
1840
+ "type": "text",
1841
+ "primaryKey": false,
1842
+ "notNull": true
1843
+ }
1844
+ },
1845
+ "indexes": {
1846
+ "idx_session_user_id": {
1847
+ "name": "idx_session_user_id",
1848
+ "columns": [
1849
+ {
1850
+ "expression": "user_id",
1851
+ "isExpression": false,
1852
+ "asc": true,
1853
+ "nulls": "last"
1854
+ }
1855
+ ],
1856
+ "isUnique": false,
1857
+ "concurrently": false,
1858
+ "method": "btree",
1859
+ "with": {}
1860
+ }
1861
+ },
1862
+ "foreignKeys": {
1863
+ "session_user_id_user_id_fk": {
1864
+ "name": "session_user_id_user_id_fk",
1865
+ "tableFrom": "session",
1866
+ "tableTo": "user",
1867
+ "columnsFrom": ["user_id"],
1868
+ "columnsTo": ["id"],
1869
+ "onDelete": "no action",
1870
+ "onUpdate": "no action"
1871
+ }
1872
+ },
1873
+ "compositePrimaryKeys": {},
1874
+ "uniqueConstraints": {
1875
+ "session_token_unique": {
1876
+ "name": "session_token_unique",
1877
+ "nullsNotDistinct": false,
1878
+ "columns": ["token"]
1879
+ }
1880
+ },
1881
+ "policies": {},
1882
+ "checkConstraints": {},
1883
+ "isRLSEnabled": false
1884
+ },
1885
+ "public.site_setting": {
1886
+ "name": "site_setting",
1887
+ "schema": "",
1888
+ "columns": {
1889
+ "site_id": {
1890
+ "name": "site_id",
1891
+ "type": "text",
1892
+ "primaryKey": false,
1893
+ "notNull": true
1894
+ },
1895
+ "key": {
1896
+ "name": "key",
1897
+ "type": "text",
1898
+ "primaryKey": false,
1899
+ "notNull": true
1900
+ },
1901
+ "value": {
1902
+ "name": "value",
1903
+ "type": "text",
1904
+ "primaryKey": false,
1905
+ "notNull": true
1906
+ },
1907
+ "updated_at": {
1908
+ "name": "updated_at",
1909
+ "type": "integer",
1910
+ "primaryKey": false,
1911
+ "notNull": true
1912
+ }
1913
+ },
1914
+ "indexes": {
1915
+ "idx_site_setting_site_id": {
1916
+ "name": "idx_site_setting_site_id",
1917
+ "columns": [
1918
+ {
1919
+ "expression": "site_id",
1920
+ "isExpression": false,
1921
+ "asc": true,
1922
+ "nulls": "last"
1923
+ }
1924
+ ],
1925
+ "isUnique": false,
1926
+ "concurrently": false,
1927
+ "method": "btree",
1928
+ "with": {}
1929
+ }
1930
+ },
1931
+ "foreignKeys": {
1932
+ "site_setting_site_id_site_id_fk": {
1933
+ "name": "site_setting_site_id_site_id_fk",
1934
+ "tableFrom": "site_setting",
1935
+ "tableTo": "site",
1936
+ "columnsFrom": ["site_id"],
1937
+ "columnsTo": ["id"],
1938
+ "onDelete": "cascade",
1939
+ "onUpdate": "no action"
1940
+ }
1941
+ },
1942
+ "compositePrimaryKeys": {
1943
+ "site_setting_site_id_key_pk": {
1944
+ "name": "site_setting_site_id_key_pk",
1945
+ "columns": ["site_id", "key"]
1946
+ }
1947
+ },
1948
+ "uniqueConstraints": {},
1949
+ "policies": {},
1950
+ "checkConstraints": {},
1951
+ "isRLSEnabled": false
1952
+ },
1953
+ "public.site_domain": {
1954
+ "name": "site_domain",
1955
+ "schema": "",
1956
+ "columns": {
1957
+ "id": {
1958
+ "name": "id",
1959
+ "type": "text",
1960
+ "primaryKey": true,
1961
+ "notNull": true
1962
+ },
1963
+ "site_id": {
1964
+ "name": "site_id",
1965
+ "type": "text",
1966
+ "primaryKey": false,
1967
+ "notNull": true
1968
+ },
1969
+ "host": {
1970
+ "name": "host",
1971
+ "type": "text",
1972
+ "primaryKey": false,
1973
+ "notNull": true
1974
+ },
1975
+ "path_prefix": {
1976
+ "name": "path_prefix",
1977
+ "type": "text",
1978
+ "primaryKey": false,
1979
+ "notNull": false
1980
+ },
1981
+ "kind": {
1982
+ "name": "kind",
1983
+ "type": "text",
1984
+ "primaryKey": false,
1985
+ "notNull": true,
1986
+ "default": "'primary'"
1987
+ },
1988
+ "redirect_to_primary": {
1989
+ "name": "redirect_to_primary",
1990
+ "type": "boolean",
1991
+ "primaryKey": false,
1992
+ "notNull": true,
1993
+ "default": true
1994
+ },
1995
+ "created_at": {
1996
+ "name": "created_at",
1997
+ "type": "integer",
1998
+ "primaryKey": false,
1999
+ "notNull": true
2000
+ },
2001
+ "updated_at": {
2002
+ "name": "updated_at",
2003
+ "type": "integer",
2004
+ "primaryKey": false,
2005
+ "notNull": true
2006
+ }
2007
+ },
2008
+ "indexes": {
2009
+ "uq_site_domain_host": {
2010
+ "name": "uq_site_domain_host",
2011
+ "columns": [
2012
+ {
2013
+ "expression": "host",
2014
+ "isExpression": false,
2015
+ "asc": true,
2016
+ "nulls": "last"
2017
+ }
2018
+ ],
2019
+ "isUnique": true,
2020
+ "concurrently": false,
2021
+ "method": "btree",
2022
+ "with": {}
2023
+ },
2024
+ "idx_site_domain_site_id": {
2025
+ "name": "idx_site_domain_site_id",
2026
+ "columns": [
2027
+ {
2028
+ "expression": "site_id",
2029
+ "isExpression": false,
2030
+ "asc": true,
2031
+ "nulls": "last"
2032
+ }
2033
+ ],
2034
+ "isUnique": false,
2035
+ "concurrently": false,
2036
+ "method": "btree",
2037
+ "with": {}
2038
+ }
2039
+ },
2040
+ "foreignKeys": {
2041
+ "site_domain_site_id_site_id_fk": {
2042
+ "name": "site_domain_site_id_site_id_fk",
2043
+ "tableFrom": "site_domain",
2044
+ "tableTo": "site",
2045
+ "columnsFrom": ["site_id"],
2046
+ "columnsTo": ["id"],
2047
+ "onDelete": "cascade",
2048
+ "onUpdate": "no action"
2049
+ }
2050
+ },
2051
+ "compositePrimaryKeys": {},
2052
+ "uniqueConstraints": {},
2053
+ "policies": {},
2054
+ "checkConstraints": {
2055
+ "chk_site_domain_kind": {
2056
+ "name": "chk_site_domain_kind",
2057
+ "value": "\"site_domain\".\"kind\" IN ('primary', 'alias')"
2058
+ }
2059
+ },
2060
+ "isRLSEnabled": false
2061
+ },
2062
+ "public.site_member": {
2063
+ "name": "site_member",
2064
+ "schema": "",
2065
+ "columns": {
2066
+ "site_id": {
2067
+ "name": "site_id",
2068
+ "type": "text",
2069
+ "primaryKey": false,
2070
+ "notNull": true
2071
+ },
2072
+ "user_id": {
2073
+ "name": "user_id",
2074
+ "type": "text",
2075
+ "primaryKey": false,
2076
+ "notNull": true
2077
+ },
2078
+ "role": {
2079
+ "name": "role",
2080
+ "type": "text",
2081
+ "primaryKey": false,
2082
+ "notNull": true,
2083
+ "default": "'editor'"
2084
+ },
2085
+ "created_at": {
2086
+ "name": "created_at",
2087
+ "type": "integer",
2088
+ "primaryKey": false,
2089
+ "notNull": true
2090
+ },
2091
+ "updated_at": {
2092
+ "name": "updated_at",
2093
+ "type": "integer",
2094
+ "primaryKey": false,
2095
+ "notNull": true
2096
+ }
2097
+ },
2098
+ "indexes": {
2099
+ "idx_site_member_user_id": {
2100
+ "name": "idx_site_member_user_id",
2101
+ "columns": [
2102
+ {
2103
+ "expression": "user_id",
2104
+ "isExpression": false,
2105
+ "asc": true,
2106
+ "nulls": "last"
2107
+ }
2108
+ ],
2109
+ "isUnique": false,
2110
+ "concurrently": false,
2111
+ "method": "btree",
2112
+ "with": {}
2113
+ }
2114
+ },
2115
+ "foreignKeys": {
2116
+ "site_member_site_id_site_id_fk": {
2117
+ "name": "site_member_site_id_site_id_fk",
2118
+ "tableFrom": "site_member",
2119
+ "tableTo": "site",
2120
+ "columnsFrom": ["site_id"],
2121
+ "columnsTo": ["id"],
2122
+ "onDelete": "cascade",
2123
+ "onUpdate": "no action"
2124
+ }
2125
+ },
2126
+ "compositePrimaryKeys": {
2127
+ "site_member_site_id_user_id_pk": {
2128
+ "name": "site_member_site_id_user_id_pk",
2129
+ "columns": ["site_id", "user_id"]
2130
+ }
2131
+ },
2132
+ "uniqueConstraints": {},
2133
+ "policies": {},
2134
+ "checkConstraints": {
2135
+ "chk_site_member_role": {
2136
+ "name": "chk_site_member_role",
2137
+ "value": "\"site_member\".\"role\" IN ('owner', 'admin', 'editor')"
2138
+ }
2139
+ },
2140
+ "isRLSEnabled": false
2141
+ },
2142
+ "public.site": {
2143
+ "name": "site",
2144
+ "schema": "",
2145
+ "columns": {
2146
+ "id": {
2147
+ "name": "id",
2148
+ "type": "text",
2149
+ "primaryKey": true,
2150
+ "notNull": true
2151
+ },
2152
+ "key": {
2153
+ "name": "key",
2154
+ "type": "text",
2155
+ "primaryKey": false,
2156
+ "notNull": true
2157
+ },
2158
+ "status": {
2159
+ "name": "status",
2160
+ "type": "text",
2161
+ "primaryKey": false,
2162
+ "notNull": true,
2163
+ "default": "'active'"
2164
+ },
2165
+ "provisioning_idempotency_key": {
2166
+ "name": "provisioning_idempotency_key",
2167
+ "type": "text",
2168
+ "primaryKey": false,
2169
+ "notNull": false
2170
+ },
2171
+ "created_at": {
2172
+ "name": "created_at",
2173
+ "type": "integer",
2174
+ "primaryKey": false,
2175
+ "notNull": true
2176
+ },
2177
+ "updated_at": {
2178
+ "name": "updated_at",
2179
+ "type": "integer",
2180
+ "primaryKey": false,
2181
+ "notNull": true
2182
+ }
2183
+ },
2184
+ "indexes": {
2185
+ "uq_site_key": {
2186
+ "name": "uq_site_key",
2187
+ "columns": [
2188
+ {
2189
+ "expression": "key",
2190
+ "isExpression": false,
2191
+ "asc": true,
2192
+ "nulls": "last"
2193
+ }
2194
+ ],
2195
+ "isUnique": true,
2196
+ "concurrently": false,
2197
+ "method": "btree",
2198
+ "with": {}
2199
+ },
2200
+ "uq_site_provisioning_idempotency_key": {
2201
+ "name": "uq_site_provisioning_idempotency_key",
2202
+ "columns": [
2203
+ {
2204
+ "expression": "provisioning_idempotency_key",
2205
+ "isExpression": false,
2206
+ "asc": true,
2207
+ "nulls": "last"
2208
+ }
2209
+ ],
2210
+ "isUnique": true,
2211
+ "where": "\"site\".\"provisioning_idempotency_key\" IS NOT NULL",
2212
+ "concurrently": false,
2213
+ "method": "btree",
2214
+ "with": {}
2215
+ }
2216
+ },
2217
+ "foreignKeys": {},
2218
+ "compositePrimaryKeys": {},
2219
+ "uniqueConstraints": {},
2220
+ "policies": {},
2221
+ "checkConstraints": {
2222
+ "chk_site_status": {
2223
+ "name": "chk_site_status",
2224
+ "value": "\"site\".\"status\" IN ('active', 'suspended')"
2225
+ }
2226
+ },
2227
+ "isRLSEnabled": false
2228
+ },
2229
+ "public.storage_purge": {
2230
+ "name": "storage_purge",
2231
+ "schema": "",
2232
+ "columns": {
2233
+ "id": {
2234
+ "name": "id",
2235
+ "type": "text",
2236
+ "primaryKey": true,
2237
+ "notNull": true
2238
+ },
2239
+ "site_id": {
2240
+ "name": "site_id",
2241
+ "type": "text",
2242
+ "primaryKey": false,
2243
+ "notNull": true
2244
+ },
2245
+ "provider": {
2246
+ "name": "provider",
2247
+ "type": "text",
2248
+ "primaryKey": false,
2249
+ "notNull": true
2250
+ },
2251
+ "storage_key": {
2252
+ "name": "storage_key",
2253
+ "type": "text",
2254
+ "primaryKey": false,
2255
+ "notNull": true
2256
+ },
2257
+ "original_key": {
2258
+ "name": "original_key",
2259
+ "type": "text",
2260
+ "primaryKey": false,
2261
+ "notNull": true
2262
+ },
2263
+ "reason": {
2264
+ "name": "reason",
2265
+ "type": "text",
2266
+ "primaryKey": false,
2267
+ "notNull": false
2268
+ },
2269
+ "purge_after": {
2270
+ "name": "purge_after",
2271
+ "type": "integer",
2272
+ "primaryKey": false,
2273
+ "notNull": true
2274
+ },
2275
+ "created_at": {
2276
+ "name": "created_at",
2277
+ "type": "integer",
2278
+ "primaryKey": false,
2279
+ "notNull": true
2280
+ }
2281
+ },
2282
+ "indexes": {
2283
+ "uq_storage_purge_provider_key": {
2284
+ "name": "uq_storage_purge_provider_key",
2285
+ "columns": [
2286
+ {
2287
+ "expression": "provider",
2288
+ "isExpression": false,
2289
+ "asc": true,
2290
+ "nulls": "last"
2291
+ },
2292
+ {
2293
+ "expression": "storage_key",
2294
+ "isExpression": false,
2295
+ "asc": true,
2296
+ "nulls": "last"
2297
+ }
2298
+ ],
2299
+ "isUnique": true,
2300
+ "concurrently": false,
2301
+ "method": "btree",
2302
+ "with": {}
2303
+ },
2304
+ "idx_storage_purge_site_provider_due": {
2305
+ "name": "idx_storage_purge_site_provider_due",
2306
+ "columns": [
2307
+ {
2308
+ "expression": "site_id",
2309
+ "isExpression": false,
2310
+ "asc": true,
2311
+ "nulls": "last"
2312
+ },
2313
+ {
2314
+ "expression": "provider",
2315
+ "isExpression": false,
2316
+ "asc": true,
2317
+ "nulls": "last"
2318
+ },
2319
+ {
2320
+ "expression": "purge_after",
2321
+ "isExpression": false,
2322
+ "asc": true,
2323
+ "nulls": "last"
2324
+ }
2325
+ ],
2326
+ "isUnique": false,
2327
+ "concurrently": false,
2328
+ "method": "btree",
2329
+ "with": {}
2330
+ }
2331
+ },
2332
+ "foreignKeys": {
2333
+ "storage_purge_site_id_site_id_fk": {
2334
+ "name": "storage_purge_site_id_site_id_fk",
2335
+ "tableFrom": "storage_purge",
2336
+ "tableTo": "site",
2337
+ "columnsFrom": ["site_id"],
2338
+ "columnsTo": ["id"],
2339
+ "onDelete": "cascade",
2340
+ "onUpdate": "no action"
2341
+ }
2342
+ },
2343
+ "compositePrimaryKeys": {},
2344
+ "uniqueConstraints": {},
2345
+ "policies": {},
2346
+ "checkConstraints": {},
2347
+ "isRLSEnabled": false
2348
+ },
2349
+ "public.telegram_binding": {
2350
+ "name": "telegram_binding",
2351
+ "schema": "",
2352
+ "columns": {
2353
+ "id": {
2354
+ "name": "id",
2355
+ "type": "text",
2356
+ "primaryKey": true,
2357
+ "notNull": true
2358
+ },
2359
+ "site_id": {
2360
+ "name": "site_id",
2361
+ "type": "text",
2362
+ "primaryKey": false,
2363
+ "notNull": true
2364
+ },
2365
+ "bot_id": {
2366
+ "name": "bot_id",
2367
+ "type": "text",
2368
+ "primaryKey": false,
2369
+ "notNull": true
2370
+ },
2371
+ "telegram_user_id": {
2372
+ "name": "telegram_user_id",
2373
+ "type": "text",
2374
+ "primaryKey": false,
2375
+ "notNull": true
2376
+ },
2377
+ "telegram_username": {
2378
+ "name": "telegram_username",
2379
+ "type": "text",
2380
+ "primaryKey": false,
2381
+ "notNull": false
2382
+ },
2383
+ "last_update_id": {
2384
+ "name": "last_update_id",
2385
+ "type": "integer",
2386
+ "primaryKey": false,
2387
+ "notNull": false
2388
+ },
2389
+ "bound_at": {
2390
+ "name": "bound_at",
2391
+ "type": "integer",
2392
+ "primaryKey": false,
2393
+ "notNull": true
2394
+ }
2395
+ },
2396
+ "indexes": {
2397
+ "uq_telegram_binding_site_id": {
2398
+ "name": "uq_telegram_binding_site_id",
2399
+ "columns": [
2400
+ {
2401
+ "expression": "site_id",
2402
+ "isExpression": false,
2403
+ "asc": true,
2404
+ "nulls": "last"
2405
+ }
2406
+ ],
2407
+ "isUnique": true,
2408
+ "concurrently": false,
2409
+ "method": "btree",
2410
+ "with": {}
2411
+ },
2412
+ "uq_telegram_binding_bot_user": {
2413
+ "name": "uq_telegram_binding_bot_user",
2414
+ "columns": [
2415
+ {
2416
+ "expression": "bot_id",
2417
+ "isExpression": false,
2418
+ "asc": true,
2419
+ "nulls": "last"
2420
+ },
2421
+ {
2422
+ "expression": "telegram_user_id",
2423
+ "isExpression": false,
2424
+ "asc": true,
2425
+ "nulls": "last"
2426
+ }
2427
+ ],
2428
+ "isUnique": true,
2429
+ "concurrently": false,
2430
+ "method": "btree",
2431
+ "with": {}
2432
+ }
2433
+ },
2434
+ "foreignKeys": {
2435
+ "telegram_binding_site_id_site_id_fk": {
2436
+ "name": "telegram_binding_site_id_site_id_fk",
2437
+ "tableFrom": "telegram_binding",
2438
+ "tableTo": "site",
2439
+ "columnsFrom": ["site_id"],
2440
+ "columnsTo": ["id"],
2441
+ "onDelete": "cascade",
2442
+ "onUpdate": "no action"
2443
+ }
2444
+ },
2445
+ "compositePrimaryKeys": {},
2446
+ "uniqueConstraints": {},
2447
+ "policies": {},
2448
+ "checkConstraints": {},
2449
+ "isRLSEnabled": false
2450
+ },
2451
+ "public.telegram_media_group_item": {
2452
+ "name": "telegram_media_group_item",
2453
+ "schema": "",
2454
+ "columns": {
2455
+ "id": {
2456
+ "name": "id",
2457
+ "type": "text",
2458
+ "primaryKey": true,
2459
+ "notNull": true
2460
+ },
2461
+ "site_id": {
2462
+ "name": "site_id",
2463
+ "type": "text",
2464
+ "primaryKey": false,
2465
+ "notNull": true
2466
+ },
2467
+ "bot_id": {
2468
+ "name": "bot_id",
2469
+ "type": "text",
2470
+ "primaryKey": false,
2471
+ "notNull": true
2472
+ },
2473
+ "telegram_user_id": {
2474
+ "name": "telegram_user_id",
2475
+ "type": "text",
2476
+ "primaryKey": false,
2477
+ "notNull": true
2478
+ },
2479
+ "media_group_id": {
2480
+ "name": "media_group_id",
2481
+ "type": "text",
2482
+ "primaryKey": false,
2483
+ "notNull": true
2484
+ },
2485
+ "chat_id": {
2486
+ "name": "chat_id",
2487
+ "type": "integer",
2488
+ "primaryKey": false,
2489
+ "notNull": true
2490
+ },
2491
+ "message_id": {
2492
+ "name": "message_id",
2493
+ "type": "integer",
2494
+ "primaryKey": false,
2495
+ "notNull": true
2496
+ },
2497
+ "update_id": {
2498
+ "name": "update_id",
2499
+ "type": "integer",
2500
+ "primaryKey": false,
2501
+ "notNull": true
2502
+ },
2503
+ "file_id": {
2504
+ "name": "file_id",
2505
+ "type": "text",
2506
+ "primaryKey": false,
2507
+ "notNull": true
2508
+ },
2509
+ "media_kind": {
2510
+ "name": "media_kind",
2511
+ "type": "text",
2512
+ "primaryKey": false,
2513
+ "notNull": true
2514
+ },
2515
+ "mime_type": {
2516
+ "name": "mime_type",
2517
+ "type": "text",
2518
+ "primaryKey": false,
2519
+ "notNull": false
2520
+ },
2521
+ "original_name": {
2522
+ "name": "original_name",
2523
+ "type": "text",
2524
+ "primaryKey": false,
2525
+ "notNull": false
2526
+ },
2527
+ "caption_markdown": {
2528
+ "name": "caption_markdown",
2529
+ "type": "text",
2530
+ "primaryKey": false,
2531
+ "notNull": false
2532
+ },
2533
+ "width": {
2534
+ "name": "width",
2535
+ "type": "integer",
2536
+ "primaryKey": false,
2537
+ "notNull": false
2538
+ },
2539
+ "height": {
2540
+ "name": "height",
2541
+ "type": "integer",
2542
+ "primaryKey": false,
2543
+ "notNull": false
2544
+ },
2545
+ "duration_seconds": {
2546
+ "name": "duration_seconds",
2547
+ "type": "integer",
2548
+ "primaryKey": false,
2549
+ "notNull": false
2550
+ },
2551
+ "poster_file_id": {
2552
+ "name": "poster_file_id",
2553
+ "type": "text",
2554
+ "primaryKey": false,
2555
+ "notNull": false
2556
+ },
2557
+ "created_at": {
2558
+ "name": "created_at",
2559
+ "type": "integer",
2560
+ "primaryKey": false,
2561
+ "notNull": true
2562
+ }
2563
+ },
2564
+ "indexes": {
2565
+ "idx_telegram_media_group_item_group": {
2566
+ "name": "idx_telegram_media_group_item_group",
2567
+ "columns": [
2568
+ {
2569
+ "expression": "bot_id",
2570
+ "isExpression": false,
2571
+ "asc": true,
2572
+ "nulls": "last"
2573
+ },
2574
+ {
2575
+ "expression": "media_group_id",
2576
+ "isExpression": false,
2577
+ "asc": true,
2578
+ "nulls": "last"
2579
+ }
2580
+ ],
2581
+ "isUnique": false,
2582
+ "concurrently": false,
2583
+ "method": "btree",
2584
+ "with": {}
2585
+ },
2586
+ "uq_telegram_media_group_item_message": {
2587
+ "name": "uq_telegram_media_group_item_message",
2588
+ "columns": [
2589
+ {
2590
+ "expression": "bot_id",
2591
+ "isExpression": false,
2592
+ "asc": true,
2593
+ "nulls": "last"
2594
+ },
2595
+ {
2596
+ "expression": "media_group_id",
2597
+ "isExpression": false,
2598
+ "asc": true,
2599
+ "nulls": "last"
2600
+ },
2601
+ {
2602
+ "expression": "message_id",
2603
+ "isExpression": false,
2604
+ "asc": true,
2605
+ "nulls": "last"
2606
+ }
2607
+ ],
2608
+ "isUnique": true,
2609
+ "concurrently": false,
2610
+ "method": "btree",
2611
+ "with": {}
2612
+ }
2613
+ },
2614
+ "foreignKeys": {
2615
+ "telegram_media_group_item_site_id_site_id_fk": {
2616
+ "name": "telegram_media_group_item_site_id_site_id_fk",
2617
+ "tableFrom": "telegram_media_group_item",
2618
+ "tableTo": "site",
2619
+ "columnsFrom": ["site_id"],
2620
+ "columnsTo": ["id"],
2621
+ "onDelete": "cascade",
2622
+ "onUpdate": "no action"
2623
+ }
2624
+ },
2625
+ "compositePrimaryKeys": {},
2626
+ "uniqueConstraints": {},
2627
+ "policies": {},
2628
+ "checkConstraints": {},
2629
+ "isRLSEnabled": false
2630
+ },
2631
+ "public.telegram_pending_binding": {
2632
+ "name": "telegram_pending_binding",
2633
+ "schema": "",
2634
+ "columns": {
2635
+ "id": {
2636
+ "name": "id",
2637
+ "type": "text",
2638
+ "primaryKey": true,
2639
+ "notNull": true
2640
+ },
2641
+ "site_id": {
2642
+ "name": "site_id",
2643
+ "type": "text",
2644
+ "primaryKey": false,
2645
+ "notNull": true
2646
+ },
2647
+ "code": {
2648
+ "name": "code",
2649
+ "type": "text",
2650
+ "primaryKey": false,
2651
+ "notNull": true
2652
+ },
2653
+ "created_at": {
2654
+ "name": "created_at",
2655
+ "type": "integer",
2656
+ "primaryKey": false,
2657
+ "notNull": true
2658
+ },
2659
+ "expires_at": {
2660
+ "name": "expires_at",
2661
+ "type": "integer",
2662
+ "primaryKey": false,
2663
+ "notNull": true
2664
+ }
2665
+ },
2666
+ "indexes": {
2667
+ "uq_telegram_pending_binding_site_id": {
2668
+ "name": "uq_telegram_pending_binding_site_id",
2669
+ "columns": [
2670
+ {
2671
+ "expression": "site_id",
2672
+ "isExpression": false,
2673
+ "asc": true,
2674
+ "nulls": "last"
2675
+ }
2676
+ ],
2677
+ "isUnique": true,
2678
+ "concurrently": false,
2679
+ "method": "btree",
2680
+ "with": {}
2681
+ },
2682
+ "uq_telegram_pending_binding_code": {
2683
+ "name": "uq_telegram_pending_binding_code",
2684
+ "columns": [
2685
+ {
2686
+ "expression": "code",
2687
+ "isExpression": false,
2688
+ "asc": true,
2689
+ "nulls": "last"
2690
+ }
2691
+ ],
2692
+ "isUnique": true,
2693
+ "concurrently": false,
2694
+ "method": "btree",
2695
+ "with": {}
2696
+ }
2697
+ },
2698
+ "foreignKeys": {
2699
+ "telegram_pending_binding_site_id_site_id_fk": {
2700
+ "name": "telegram_pending_binding_site_id_site_id_fk",
2701
+ "tableFrom": "telegram_pending_binding",
2702
+ "tableTo": "site",
2703
+ "columnsFrom": ["site_id"],
2704
+ "columnsTo": ["id"],
2705
+ "onDelete": "cascade",
2706
+ "onUpdate": "no action"
2707
+ }
2708
+ },
2709
+ "compositePrimaryKeys": {},
2710
+ "uniqueConstraints": {},
2711
+ "policies": {},
2712
+ "checkConstraints": {},
2713
+ "isRLSEnabled": false
2714
+ },
2715
+ "public.thread_collection": {
2716
+ "name": "thread_collection",
2717
+ "schema": "",
2718
+ "columns": {
2719
+ "site_id": {
2720
+ "name": "site_id",
2721
+ "type": "text",
2722
+ "primaryKey": false,
2723
+ "notNull": true
2724
+ },
2725
+ "thread_id": {
2726
+ "name": "thread_id",
2727
+ "type": "text",
2728
+ "primaryKey": false,
2729
+ "notNull": true
2730
+ },
2731
+ "collection_id": {
2732
+ "name": "collection_id",
2733
+ "type": "text",
2734
+ "primaryKey": false,
2735
+ "notNull": true
2736
+ },
2737
+ "created_at": {
2738
+ "name": "created_at",
2739
+ "type": "integer",
2740
+ "primaryKey": false,
2741
+ "notNull": true
2742
+ },
2743
+ "position": {
2744
+ "name": "position",
2745
+ "type": "integer",
2746
+ "primaryKey": false,
2747
+ "notNull": true,
2748
+ "default": 0
2749
+ },
2750
+ "pinned_at": {
2751
+ "name": "pinned_at",
2752
+ "type": "integer",
2753
+ "primaryKey": false,
2754
+ "notNull": false
2755
+ }
2756
+ },
2757
+ "indexes": {
2758
+ "idx_thread_collection_site_collection_id": {
2759
+ "name": "idx_thread_collection_site_collection_id",
2760
+ "columns": [
2761
+ {
2762
+ "expression": "site_id",
2763
+ "isExpression": false,
2764
+ "asc": true,
2765
+ "nulls": "last"
2766
+ },
2767
+ {
2768
+ "expression": "collection_id",
2769
+ "isExpression": false,
2770
+ "asc": true,
2771
+ "nulls": "last"
2772
+ }
2773
+ ],
2774
+ "isUnique": false,
2775
+ "concurrently": false,
2776
+ "method": "btree",
2777
+ "with": {}
2778
+ },
2779
+ "idx_thread_collection_site_collection_created_thread": {
2780
+ "name": "idx_thread_collection_site_collection_created_thread",
2781
+ "columns": [
2782
+ {
2783
+ "expression": "site_id",
2784
+ "isExpression": false,
2785
+ "asc": true,
2786
+ "nulls": "last"
2787
+ },
2788
+ {
2789
+ "expression": "collection_id",
2790
+ "isExpression": false,
2791
+ "asc": true,
2792
+ "nulls": "last"
2793
+ },
2794
+ {
2795
+ "expression": "created_at",
2796
+ "isExpression": false,
2797
+ "asc": true,
2798
+ "nulls": "last"
2799
+ },
2800
+ {
2801
+ "expression": "thread_id",
2802
+ "isExpression": false,
2803
+ "asc": true,
2804
+ "nulls": "last"
2805
+ }
2806
+ ],
2807
+ "isUnique": false,
2808
+ "concurrently": false,
2809
+ "method": "btree",
2810
+ "with": {}
2811
+ }
2812
+ },
2813
+ "foreignKeys": {
2814
+ "thread_collection_site_id_site_id_fk": {
2815
+ "name": "thread_collection_site_id_site_id_fk",
2816
+ "tableFrom": "thread_collection",
2817
+ "tableTo": "site",
2818
+ "columnsFrom": ["site_id"],
2819
+ "columnsTo": ["id"],
2820
+ "onDelete": "cascade",
2821
+ "onUpdate": "no action"
2822
+ },
2823
+ "thread_collection_thread_id_post_id_fk": {
2824
+ "name": "thread_collection_thread_id_post_id_fk",
2825
+ "tableFrom": "thread_collection",
2826
+ "tableTo": "post",
2827
+ "columnsFrom": ["thread_id"],
2828
+ "columnsTo": ["id"],
2829
+ "onDelete": "cascade",
2830
+ "onUpdate": "no action"
2831
+ },
2832
+ "thread_collection_collection_id_collection_id_fk": {
2833
+ "name": "thread_collection_collection_id_collection_id_fk",
2834
+ "tableFrom": "thread_collection",
2835
+ "tableTo": "collection",
2836
+ "columnsFrom": ["collection_id"],
2837
+ "columnsTo": ["id"],
2838
+ "onDelete": "cascade",
2839
+ "onUpdate": "no action"
2840
+ }
2841
+ },
2842
+ "compositePrimaryKeys": {
2843
+ "thread_collection_site_id_thread_id_collection_id_pk": {
2844
+ "name": "thread_collection_site_id_thread_id_collection_id_pk",
2845
+ "columns": ["site_id", "thread_id", "collection_id"]
2846
+ }
2847
+ },
2848
+ "uniqueConstraints": {},
2849
+ "policies": {},
2850
+ "checkConstraints": {},
2851
+ "isRLSEnabled": false
2852
+ },
2853
+ "public.upload_session": {
2854
+ "name": "upload_session",
2855
+ "schema": "",
2856
+ "columns": {
2857
+ "id": {
2858
+ "name": "id",
2859
+ "type": "text",
2860
+ "primaryKey": true,
2861
+ "notNull": true
2862
+ },
2863
+ "site_id": {
2864
+ "name": "site_id",
2865
+ "type": "text",
2866
+ "primaryKey": false,
2867
+ "notNull": true
2868
+ },
2869
+ "media_id": {
2870
+ "name": "media_id",
2871
+ "type": "text",
2872
+ "primaryKey": false,
2873
+ "notNull": true
2874
+ },
2875
+ "original_name": {
2876
+ "name": "original_name",
2877
+ "type": "text",
2878
+ "primaryKey": false,
2879
+ "notNull": true
2880
+ },
2881
+ "filename": {
2882
+ "name": "filename",
2883
+ "type": "text",
2884
+ "primaryKey": false,
2885
+ "notNull": true
2886
+ },
2887
+ "provider": {
2888
+ "name": "provider",
2889
+ "type": "text",
2890
+ "primaryKey": false,
2891
+ "notNull": true
2892
+ },
2893
+ "expected_content_type": {
2894
+ "name": "expected_content_type",
2895
+ "type": "text",
2896
+ "primaryKey": false,
2897
+ "notNull": true
2898
+ },
2899
+ "expected_size": {
2900
+ "name": "expected_size",
2901
+ "type": "integer",
2902
+ "primaryKey": false,
2903
+ "notNull": true
2904
+ },
2905
+ "expected_checksum_sha256": {
2906
+ "name": "expected_checksum_sha256",
2907
+ "type": "text",
2908
+ "primaryKey": false,
2909
+ "notNull": false
2910
+ },
2911
+ "content_disposition": {
2912
+ "name": "content_disposition",
2913
+ "type": "text",
2914
+ "primaryKey": false,
2915
+ "notNull": true,
2916
+ "default": "'inline'"
2917
+ },
2918
+ "temp_storage_key": {
2919
+ "name": "temp_storage_key",
2920
+ "type": "text",
2921
+ "primaryKey": false,
2922
+ "notNull": true
2923
+ },
2924
+ "final_storage_key": {
2925
+ "name": "final_storage_key",
2926
+ "type": "text",
2927
+ "primaryKey": false,
2928
+ "notNull": true
2929
+ },
2930
+ "multipart_upload_id": {
2931
+ "name": "multipart_upload_id",
2932
+ "type": "text",
2933
+ "primaryKey": false,
2934
+ "notNull": false
2935
+ },
2936
+ "state": {
2937
+ "name": "state",
2938
+ "type": "text",
2939
+ "primaryKey": false,
2940
+ "notNull": true,
2941
+ "default": "'pending'"
2942
+ },
2943
+ "expires_at": {
2944
+ "name": "expires_at",
2945
+ "type": "integer",
2946
+ "primaryKey": false,
2947
+ "notNull": true
2948
+ },
2949
+ "created_at": {
2950
+ "name": "created_at",
2951
+ "type": "integer",
2952
+ "primaryKey": false,
2953
+ "notNull": true
2954
+ },
2955
+ "updated_at": {
2956
+ "name": "updated_at",
2957
+ "type": "integer",
2958
+ "primaryKey": false,
2959
+ "notNull": true
2960
+ }
2961
+ },
2962
+ "indexes": {
2963
+ "uq_upload_session_media_id": {
2964
+ "name": "uq_upload_session_media_id",
2965
+ "columns": [
2966
+ {
2967
+ "expression": "media_id",
2968
+ "isExpression": false,
2969
+ "asc": true,
2970
+ "nulls": "last"
2971
+ }
2972
+ ],
2973
+ "isUnique": true,
2974
+ "concurrently": false,
2975
+ "method": "btree",
2976
+ "with": {}
2977
+ },
2978
+ "uq_upload_session_temp_storage_key": {
2979
+ "name": "uq_upload_session_temp_storage_key",
2980
+ "columns": [
2981
+ {
2982
+ "expression": "temp_storage_key",
2983
+ "isExpression": false,
2984
+ "asc": true,
2985
+ "nulls": "last"
2986
+ }
2987
+ ],
2988
+ "isUnique": true,
2989
+ "concurrently": false,
2990
+ "method": "btree",
2991
+ "with": {}
2992
+ },
2993
+ "uq_upload_session_final_storage_key": {
2994
+ "name": "uq_upload_session_final_storage_key",
2995
+ "columns": [
2996
+ {
2997
+ "expression": "final_storage_key",
2998
+ "isExpression": false,
2999
+ "asc": true,
3000
+ "nulls": "last"
3001
+ }
3002
+ ],
3003
+ "isUnique": true,
3004
+ "concurrently": false,
3005
+ "method": "btree",
3006
+ "with": {}
3007
+ },
3008
+ "idx_upload_session_site_state": {
3009
+ "name": "idx_upload_session_site_state",
3010
+ "columns": [
3011
+ {
3012
+ "expression": "site_id",
3013
+ "isExpression": false,
3014
+ "asc": true,
3015
+ "nulls": "last"
3016
+ },
3017
+ {
3018
+ "expression": "state",
3019
+ "isExpression": false,
3020
+ "asc": true,
3021
+ "nulls": "last"
3022
+ }
3023
+ ],
3024
+ "isUnique": false,
3025
+ "concurrently": false,
3026
+ "method": "btree",
3027
+ "with": {}
3028
+ },
3029
+ "idx_upload_session_site_expires_at": {
3030
+ "name": "idx_upload_session_site_expires_at",
3031
+ "columns": [
3032
+ {
3033
+ "expression": "site_id",
3034
+ "isExpression": false,
3035
+ "asc": true,
3036
+ "nulls": "last"
3037
+ },
3038
+ {
3039
+ "expression": "expires_at",
3040
+ "isExpression": false,
3041
+ "asc": true,
3042
+ "nulls": "last"
3043
+ }
3044
+ ],
3045
+ "isUnique": false,
3046
+ "concurrently": false,
3047
+ "method": "btree",
3048
+ "with": {}
3049
+ }
3050
+ },
3051
+ "foreignKeys": {
3052
+ "upload_session_site_id_site_id_fk": {
3053
+ "name": "upload_session_site_id_site_id_fk",
3054
+ "tableFrom": "upload_session",
3055
+ "tableTo": "site",
3056
+ "columnsFrom": ["site_id"],
3057
+ "columnsTo": ["id"],
3058
+ "onDelete": "cascade",
3059
+ "onUpdate": "no action"
3060
+ }
3061
+ },
3062
+ "compositePrimaryKeys": {},
3063
+ "uniqueConstraints": {},
3064
+ "policies": {},
3065
+ "checkConstraints": {
3066
+ "chk_upload_session_expected_size_positive": {
3067
+ "name": "chk_upload_session_expected_size_positive",
3068
+ "value": "\"upload_session\".\"expected_size\" > 0"
3069
+ },
3070
+ "chk_upload_session_state": {
3071
+ "name": "chk_upload_session_state",
3072
+ "value": "\"upload_session\".\"state\" IN ('pending', 'uploaded', 'completed', 'aborted', 'failed')"
3073
+ },
3074
+ "chk_upload_session_content_disposition": {
3075
+ "name": "chk_upload_session_content_disposition",
3076
+ "value": "\"upload_session\".\"content_disposition\" IN ('inline', 'attachment')"
3077
+ }
3078
+ },
3079
+ "isRLSEnabled": false
3080
+ },
3081
+ "public.user": {
3082
+ "name": "user",
3083
+ "schema": "",
3084
+ "columns": {
3085
+ "id": {
3086
+ "name": "id",
3087
+ "type": "text",
3088
+ "primaryKey": true,
3089
+ "notNull": true
3090
+ },
3091
+ "name": {
3092
+ "name": "name",
3093
+ "type": "text",
3094
+ "primaryKey": false,
3095
+ "notNull": true
3096
+ },
3097
+ "email": {
3098
+ "name": "email",
3099
+ "type": "text",
3100
+ "primaryKey": false,
3101
+ "notNull": true
3102
+ },
3103
+ "email_verified": {
3104
+ "name": "email_verified",
3105
+ "type": "boolean",
3106
+ "primaryKey": false,
3107
+ "notNull": true,
3108
+ "default": false
3109
+ },
3110
+ "image": {
3111
+ "name": "image",
3112
+ "type": "text",
3113
+ "primaryKey": false,
3114
+ "notNull": false
3115
+ },
3116
+ "role": {
3117
+ "name": "role",
3118
+ "type": "text",
3119
+ "primaryKey": false,
3120
+ "notNull": false,
3121
+ "default": "'member'"
3122
+ },
3123
+ "created_at": {
3124
+ "name": "created_at",
3125
+ "type": "timestamp with time zone",
3126
+ "primaryKey": false,
3127
+ "notNull": true
3128
+ },
3129
+ "updated_at": {
3130
+ "name": "updated_at",
3131
+ "type": "timestamp with time zone",
3132
+ "primaryKey": false,
3133
+ "notNull": true
3134
+ }
3135
+ },
3136
+ "indexes": {},
3137
+ "foreignKeys": {},
3138
+ "compositePrimaryKeys": {},
3139
+ "uniqueConstraints": {
3140
+ "user_email_unique": {
3141
+ "name": "user_email_unique",
3142
+ "nullsNotDistinct": false,
3143
+ "columns": ["email"]
3144
+ }
3145
+ },
3146
+ "policies": {},
3147
+ "checkConstraints": {},
3148
+ "isRLSEnabled": false
3149
+ },
3150
+ "public.verification": {
3151
+ "name": "verification",
3152
+ "schema": "",
3153
+ "columns": {
3154
+ "id": {
3155
+ "name": "id",
3156
+ "type": "text",
3157
+ "primaryKey": true,
3158
+ "notNull": true
3159
+ },
3160
+ "identifier": {
3161
+ "name": "identifier",
3162
+ "type": "text",
3163
+ "primaryKey": false,
3164
+ "notNull": true
3165
+ },
3166
+ "value": {
3167
+ "name": "value",
3168
+ "type": "text",
3169
+ "primaryKey": false,
3170
+ "notNull": true
3171
+ },
3172
+ "expires_at": {
3173
+ "name": "expires_at",
3174
+ "type": "timestamp with time zone",
3175
+ "primaryKey": false,
3176
+ "notNull": true
3177
+ },
3178
+ "created_at": {
3179
+ "name": "created_at",
3180
+ "type": "timestamp with time zone",
3181
+ "primaryKey": false,
3182
+ "notNull": false
3183
+ },
3184
+ "updated_at": {
3185
+ "name": "updated_at",
3186
+ "type": "timestamp with time zone",
3187
+ "primaryKey": false,
3188
+ "notNull": false
3189
+ }
3190
+ },
3191
+ "indexes": {},
3192
+ "foreignKeys": {},
3193
+ "compositePrimaryKeys": {},
3194
+ "uniqueConstraints": {},
3195
+ "policies": {},
3196
+ "checkConstraints": {},
3197
+ "isRLSEnabled": false
3198
+ }
3199
+ },
3200
+ "enums": {},
3201
+ "schemas": {},
3202
+ "sequences": {},
3203
+ "roles": {},
3204
+ "policies": {},
3205
+ "views": {},
3206
+ "_meta": {
3207
+ "columns": {},
3208
+ "schemas": {},
3209
+ "tables": {}
3210
+ }
3211
+ }