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