@jant/core 0.3.36 → 0.3.38
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.
- package/bin/commands/export.js +1 -1
- package/bin/commands/import-site.js +529 -0
- package/bin/commands/reset-password.js +3 -2
- package/dist/client/assets/heic-to-DIRPI3VF.js +1 -0
- package/dist/client/assets/url-FWFqPJPb.js +1 -0
- package/dist/client/client.css +1 -1
- package/dist/client/client.js +4012 -3276
- package/dist/index.js +10285 -5809
- package/package.json +11 -3
- package/src/__tests__/helpers/app.ts +9 -9
- package/src/__tests__/helpers/db.ts +91 -93
- package/src/app.tsx +157 -27
- package/src/auth.ts +20 -2
- package/src/client/archive-nav.js +187 -0
- package/src/client/audio-player.ts +478 -0
- package/src/client/audio-processor.ts +84 -0
- package/src/client/avatar-upload.ts +3 -2
- package/src/client/components/__tests__/jant-compose-dialog.test.ts +645 -49
- package/src/client/components/__tests__/jant-compose-editor.test.ts +208 -16
- package/src/client/components/__tests__/jant-post-form.test.ts +19 -9
- package/src/client/components/__tests__/jant-settings-avatar.test.ts +2 -2
- package/src/client/components/__tests__/jant-settings-general.test.ts +3 -3
- package/src/client/components/collection-sidebar-types.ts +7 -9
- package/src/client/components/compose-types.ts +101 -4
- package/src/client/components/jant-collection-form.ts +43 -7
- package/src/client/components/jant-collection-sidebar.ts +88 -84
- package/src/client/components/jant-compose-dialog.ts +1655 -219
- package/src/client/components/jant-compose-editor.ts +732 -168
- package/src/client/components/jant-compose-fullscreen.ts +23 -78
- package/src/client/components/jant-media-lightbox.ts +2 -0
- package/src/client/components/jant-nav-manager.ts +24 -284
- package/src/client/components/jant-post-form.ts +89 -9
- package/src/client/components/jant-post-menu.ts +1019 -0
- package/src/client/components/jant-settings-avatar.ts +3 -3
- package/src/client/components/jant-settings-general.ts +38 -4
- package/src/client/components/jant-text-preview.ts +232 -0
- package/src/client/components/nav-manager-types.ts +4 -19
- package/src/client/components/post-form-template.ts +107 -12
- package/src/client/components/post-form-types.ts +11 -4
- package/src/client/compose-bridge.ts +410 -109
- package/src/client/image-processor.ts +26 -8
- package/src/client/media-metadata.ts +247 -0
- package/src/client/multipart-upload.ts +160 -0
- package/src/client/post-form-bridge.ts +52 -1
- package/src/client/settings-bridge.ts +0 -12
- package/src/client/thread-context.ts +140 -0
- package/src/client/tiptap/create-editor.ts +46 -0
- package/src/client/tiptap/extensions.ts +5 -0
- package/src/client/tiptap/image-node.ts +2 -8
- package/src/client/tiptap/paste-image.ts +2 -13
- package/src/client/tiptap/slash-commands.ts +173 -63
- package/src/client/toast.ts +101 -3
- package/src/client/types/sortablejs.d.ts +15 -0
- package/src/client/upload-with-metadata.ts +54 -0
- package/src/client/video-processor.ts +207 -0
- package/src/client.ts +5 -2
- package/src/db/__tests__/migrations.test.ts +118 -0
- package/src/db/index.ts +52 -0
- package/src/db/migrations/0000_baseline.sql +269 -0
- package/src/db/migrations/0001_fts_setup.sql +31 -0
- package/src/db/migrations/meta/0000_snapshot.json +703 -119
- package/src/db/migrations/meta/0001_snapshot.json +1337 -0
- package/src/db/migrations/meta/_journal.json +4 -39
- package/src/db/schema.ts +409 -145
- package/src/i18n/__tests__/detect.test.ts +115 -0
- package/src/i18n/context.tsx +2 -2
- package/src/i18n/detect.ts +85 -1
- package/src/i18n/i18n.ts +1 -1
- package/src/i18n/index.ts +2 -1
- package/src/i18n/locales/en.po +487 -1217
- package/src/i18n/locales/en.ts +1 -1
- package/src/i18n/locales/zh-Hans.po +613 -996
- package/src/i18n/locales/zh-Hans.ts +1 -1
- package/src/i18n/locales/zh-Hant.po +624 -1007
- package/src/i18n/locales/zh-Hant.ts +1 -1
- package/src/i18n/middleware.ts +6 -0
- package/src/index.ts +5 -7
- package/src/lib/__tests__/blurhash-placeholder.test.ts +75 -0
- package/src/lib/__tests__/constants.test.ts +0 -1
- package/src/lib/__tests__/markdown-to-tiptap.test.ts +358 -0
- package/src/lib/__tests__/nanoid.test.ts +26 -0
- package/src/lib/__tests__/schemas.test.ts +181 -63
- package/src/lib/__tests__/slug.test.ts +126 -0
- package/src/lib/__tests__/sse.test.ts +6 -6
- package/src/lib/__tests__/summary.test.ts +264 -0
- package/src/lib/__tests__/theme.test.ts +1 -1
- package/src/lib/__tests__/timeline.test.ts +33 -30
- package/src/lib/__tests__/tiptap-to-markdown.test.ts +346 -0
- package/src/lib/__tests__/view.test.ts +141 -66
- package/src/lib/blurhash-placeholder.ts +102 -0
- package/src/lib/constants.ts +3 -1
- package/src/lib/emoji-catalog.ts +885 -68
- package/src/lib/errors.ts +11 -8
- package/src/lib/feed.ts +78 -32
- package/src/lib/html.ts +2 -1
- package/src/lib/icon-catalog.ts +5033 -1
- package/src/lib/icons.ts +3 -2
- package/src/lib/index.ts +0 -1
- package/src/lib/markdown-to-tiptap.ts +286 -0
- package/src/lib/media-helpers.ts +12 -3
- package/src/lib/nanoid.ts +29 -0
- package/src/lib/navigation.ts +1 -1
- package/src/lib/render.tsx +20 -2
- package/src/lib/resolve-config.ts +6 -2
- package/src/lib/schemas.ts +224 -55
- package/src/lib/search-snippet.ts +34 -0
- package/src/lib/slug.ts +96 -0
- package/src/lib/sse.ts +6 -6
- package/src/lib/storage.ts +115 -7
- package/src/lib/summary.ts +66 -0
- package/src/lib/theme.ts +11 -8
- package/src/lib/timeline.ts +74 -34
- package/src/lib/tiptap-render.ts +5 -10
- package/src/lib/tiptap-to-markdown.ts +305 -0
- package/src/lib/upload.ts +190 -29
- package/src/lib/url.ts +31 -0
- package/src/lib/view.ts +204 -37
- package/src/middleware/__tests__/auth.test.ts +191 -11
- package/src/middleware/__tests__/onboarding.test.ts +12 -10
- package/src/middleware/auth.ts +63 -9
- package/src/middleware/onboarding.ts +1 -1
- package/src/middleware/secure-headers.ts +40 -0
- package/src/preset.css +45 -2
- package/src/routes/__tests__/compose.test.ts +17 -24
- package/src/routes/api/__tests__/collections.test.ts +109 -61
- package/src/routes/api/__tests__/nav-items.test.ts +46 -29
- package/src/routes/api/__tests__/posts.test.ts +132 -68
- package/src/routes/api/__tests__/search.test.ts +15 -2
- package/src/routes/api/__tests__/upload-multipart.test.ts +534 -0
- package/src/routes/api/collections.ts +51 -42
- package/src/routes/api/custom-urls.ts +80 -0
- package/src/routes/api/export.ts +31 -0
- package/src/routes/api/nav-items.ts +23 -19
- package/src/routes/api/posts.ts +43 -39
- package/src/routes/api/search.ts +3 -4
- package/src/routes/api/upload-multipart.ts +245 -0
- package/src/routes/api/upload.ts +85 -19
- package/src/routes/auth/__tests__/setup.test.ts +20 -60
- package/src/routes/auth/setup.tsx +26 -33
- package/src/routes/auth/signin.tsx +3 -7
- package/src/routes/compose.tsx +10 -55
- package/src/routes/dash/__tests__/settings-avatar.test.ts +1 -1
- package/src/routes/dash/custom-urls.tsx +414 -0
- package/src/routes/dash/settings.tsx +304 -232
- package/src/routes/feed/__tests__/rss.test.ts +27 -28
- package/src/routes/feed/rss.ts +6 -4
- package/src/routes/feed/sitemap.ts +2 -12
- package/src/routes/pages/__tests__/collections.test.ts +5 -6
- package/src/routes/pages/__tests__/featured.test.ts +41 -22
- package/src/routes/pages/archive.tsx +175 -39
- package/src/routes/pages/collection.tsx +22 -10
- package/src/routes/pages/collections.tsx +3 -3
- package/src/routes/pages/featured.tsx +28 -4
- package/src/routes/pages/home.tsx +16 -15
- package/src/routes/pages/latest.tsx +1 -11
- package/src/routes/pages/new.tsx +39 -0
- package/src/routes/pages/page.tsx +95 -49
- package/src/routes/pages/search.tsx +1 -1
- package/src/services/__tests__/api-token.test.ts +135 -0
- package/src/services/__tests__/collection.test.ts +275 -227
- package/src/services/__tests__/custom-url.test.ts +213 -0
- package/src/services/__tests__/media.test.ts +162 -22
- package/src/services/__tests__/navigation.test.ts +109 -68
- package/src/services/__tests__/post-timeline.test.ts +205 -32
- package/src/services/__tests__/post.test.ts +713 -234
- package/src/services/__tests__/search.test.ts +67 -10
- package/src/services/api-token.ts +166 -0
- package/src/services/auth.ts +17 -2
- package/src/services/collection.ts +397 -131
- package/src/services/custom-url.ts +188 -0
- package/src/services/export.ts +802 -0
- package/src/services/index.ts +26 -19
- package/src/services/media.ts +100 -22
- package/src/services/navigation.ts +158 -47
- package/src/services/path.ts +339 -0
- package/src/services/post.ts +687 -154
- package/src/services/search.ts +160 -75
- package/src/styles/components.css +58 -7
- package/src/styles/tokens.css +84 -6
- package/src/styles/ui.css +2964 -457
- package/src/types/bindings.ts +4 -1
- package/src/types/config.ts +12 -4
- package/src/types/constants.ts +15 -3
- package/src/types/entities.ts +74 -35
- package/src/types/operations.ts +11 -24
- package/src/types/props.ts +51 -16
- package/src/types/views.ts +45 -22
- package/src/ui/color-themes.ts +133 -23
- package/src/ui/compose/ComposeDialog.tsx +239 -17
- package/src/ui/compose/ComposePrompt.tsx +1 -1
- package/src/ui/dash/CrudPageHeader.tsx +1 -1
- package/src/ui/dash/ListItemRow.tsx +1 -1
- package/src/ui/dash/StatusBadge.tsx +3 -1
- package/src/ui/dash/appearance/AdvancedContent.tsx +22 -1
- package/src/ui/dash/appearance/ColorThemeContent.tsx +22 -2
- package/src/ui/dash/appearance/FontThemeContent.tsx +1 -1
- package/src/ui/dash/appearance/NavigationContent.tsx +5 -45
- package/src/ui/dash/index.ts +0 -3
- package/src/ui/dash/settings/AccountContent.tsx +3 -57
- package/src/ui/dash/settings/AccountMenuContent.tsx +147 -0
- package/src/ui/dash/settings/ApiTokensContent.tsx +232 -0
- package/src/ui/dash/settings/AvatarContent.tsx +8 -0
- package/src/ui/dash/settings/SessionsContent.tsx +159 -0
- package/src/ui/dash/settings/SettingsRootContent.tsx +45 -15
- package/src/ui/feed/LinkCard.tsx +89 -40
- package/src/ui/feed/NoteCard.tsx +39 -25
- package/src/ui/feed/PostStatusBadges.tsx +67 -0
- package/src/ui/feed/QuoteCard.tsx +38 -23
- package/src/ui/feed/ThreadPreview.tsx +90 -26
- package/src/ui/feed/TimelineFeed.tsx +3 -2
- package/src/ui/feed/TimelineItem.tsx +15 -6
- package/src/ui/feed/__tests__/thread-preview.test.ts +107 -0
- package/src/ui/feed/thread-preview-state.ts +61 -0
- package/src/ui/font-themes.ts +2 -2
- package/src/ui/layouts/BaseLayout.tsx +2 -2
- package/src/ui/layouts/SiteLayout.tsx +105 -92
- package/src/ui/pages/ArchivePage.tsx +923 -98
- package/src/ui/pages/ComposePage.tsx +54 -0
- package/src/ui/pages/PostPage.tsx +30 -45
- package/src/ui/pages/SearchPage.tsx +181 -37
- package/src/ui/shared/AdminBreadcrumb.tsx +29 -0
- package/src/ui/shared/CollectionsSidebar.tsx +47 -37
- package/src/ui/shared/MediaGallery.tsx +445 -149
- package/src/ui/shared/PostFooter.tsx +204 -0
- package/src/ui/shared/StarRating.tsx +27 -0
- package/src/ui/shared/__tests__/format-chars.test.ts +35 -0
- package/src/ui/shared/index.ts +0 -1
- package/dist/client/assets/url-8Dj-5CLW.js +0 -1
- package/src/client/media-upload.ts +0 -161
- package/src/client/page-slug-bridge.ts +0 -42
- package/src/db/migrations/0000_square_wallflower.sql +0 -118
- package/src/db/migrations/0001_add_search_fts.sql +0 -34
- package/src/db/migrations/0002_add_media_attachments.sql +0 -3
- package/src/db/migrations/0003_add_navigation_links.sql +0 -8
- package/src/db/migrations/0004_add_storage_provider.sql +0 -3
- package/src/db/migrations/0005_v2_schema_migration.sql +0 -268
- package/src/db/migrations/0006_rename_slug_to_path.sql +0 -5
- package/src/db/migrations/0007_post_collections_m2m.sql +0 -94
- package/src/db/migrations/0008_add_collection_dividers.sql +0 -8
- package/src/db/migrations/0009_drop_collection_show_divider.sql +0 -2
- package/src/db/migrations/0010_add_performance_indexes.sql +0 -16
- package/src/db/migrations/0011_add_path_registry.sql +0 -23
- package/src/db/migrations/0012_add_tiptap_columns.sql +0 -2
- package/src/db/migrations/0013_replace_featured_with_visibility.sql +0 -8
- package/src/db/migrations/meta/0003_snapshot.json +0 -821
- package/src/lib/__tests__/sqid.test.ts +0 -65
- package/src/lib/sqid.ts +0 -79
- package/src/routes/api/__tests__/pages.test.ts +0 -218
- package/src/routes/api/pages.ts +0 -73
- package/src/routes/dash/__tests__/pages.test.ts +0 -226
- package/src/routes/dash/index.tsx +0 -109
- package/src/routes/dash/media.tsx +0 -135
- package/src/routes/dash/pages.tsx +0 -245
- package/src/routes/dash/posts.tsx +0 -338
- package/src/routes/dash/redirects.tsx +0 -263
- package/src/routes/pages/post.tsx +0 -59
- package/src/services/__tests__/page.test.ts +0 -298
- package/src/services/__tests__/path-registry.test.ts +0 -165
- package/src/services/__tests__/redirect.test.ts +0 -159
- package/src/services/page.ts +0 -216
- package/src/services/path-registry.ts +0 -160
- package/src/services/redirect.ts +0 -97
- package/src/ui/dash/PageForm.tsx +0 -187
- package/src/ui/dash/PostList.tsx +0 -95
- package/src/ui/dash/media/MediaListContent.tsx +0 -206
- package/src/ui/dash/media/ViewMediaContent.tsx +0 -208
- package/src/ui/dash/pages/PagesContent.tsx +0 -75
- package/src/ui/dash/posts/PostForm.tsx +0 -260
- package/src/ui/layouts/DashLayout.tsx +0 -247
- package/src/ui/pages/SinglePage.tsx +0 -23
- package/src/ui/shared/ThreadView.tsx +0 -136
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "6",
|
|
3
3
|
"dialect": "sqlite",
|
|
4
|
-
"id": "
|
|
4
|
+
"id": "6387f30b-c6d3-4ad1-a627-1ec026abed4a",
|
|
5
5
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
6
|
"tables": {
|
|
7
7
|
"account": {
|
|
@@ -115,34 +115,41 @@
|
|
|
115
115
|
"uniqueConstraints": {},
|
|
116
116
|
"checkConstraints": {}
|
|
117
117
|
},
|
|
118
|
-
"
|
|
119
|
-
"name": "
|
|
118
|
+
"api_token": {
|
|
119
|
+
"name": "api_token",
|
|
120
120
|
"columns": {
|
|
121
121
|
"id": {
|
|
122
122
|
"name": "id",
|
|
123
|
-
"type": "
|
|
123
|
+
"type": "text",
|
|
124
124
|
"primaryKey": true,
|
|
125
125
|
"notNull": true,
|
|
126
|
-
"autoincrement":
|
|
126
|
+
"autoincrement": false
|
|
127
127
|
},
|
|
128
|
-
"
|
|
129
|
-
"name": "
|
|
128
|
+
"name": {
|
|
129
|
+
"name": "name",
|
|
130
130
|
"type": "text",
|
|
131
131
|
"primaryKey": false,
|
|
132
|
-
"notNull":
|
|
132
|
+
"notNull": true,
|
|
133
133
|
"autoincrement": false
|
|
134
134
|
},
|
|
135
|
-
"
|
|
136
|
-
"name": "
|
|
135
|
+
"token_hash": {
|
|
136
|
+
"name": "token_hash",
|
|
137
137
|
"type": "text",
|
|
138
138
|
"primaryKey": false,
|
|
139
139
|
"notNull": true,
|
|
140
140
|
"autoincrement": false
|
|
141
141
|
},
|
|
142
|
-
"
|
|
143
|
-
"name": "
|
|
142
|
+
"prefix": {
|
|
143
|
+
"name": "prefix",
|
|
144
144
|
"type": "text",
|
|
145
145
|
"primaryKey": false,
|
|
146
|
+
"notNull": true,
|
|
147
|
+
"autoincrement": false
|
|
148
|
+
},
|
|
149
|
+
"last_used_at": {
|
|
150
|
+
"name": "last_used_at",
|
|
151
|
+
"type": "integer",
|
|
152
|
+
"primaryKey": false,
|
|
146
153
|
"notNull": false,
|
|
147
154
|
"autoincrement": false
|
|
148
155
|
},
|
|
@@ -162,9 +169,9 @@
|
|
|
162
169
|
}
|
|
163
170
|
},
|
|
164
171
|
"indexes": {
|
|
165
|
-
"
|
|
166
|
-
"name": "
|
|
167
|
-
"columns": ["
|
|
172
|
+
"api_token_token_hash_unique": {
|
|
173
|
+
"name": "api_token_token_hash_unique",
|
|
174
|
+
"columns": ["token_hash"],
|
|
168
175
|
"isUnique": true
|
|
169
176
|
}
|
|
170
177
|
},
|
|
@@ -173,6 +180,71 @@
|
|
|
173
180
|
"uniqueConstraints": {},
|
|
174
181
|
"checkConstraints": {}
|
|
175
182
|
},
|
|
183
|
+
"collection": {
|
|
184
|
+
"name": "collection",
|
|
185
|
+
"columns": {
|
|
186
|
+
"id": {
|
|
187
|
+
"name": "id",
|
|
188
|
+
"type": "text",
|
|
189
|
+
"primaryKey": true,
|
|
190
|
+
"notNull": true,
|
|
191
|
+
"autoincrement": false
|
|
192
|
+
},
|
|
193
|
+
"title": {
|
|
194
|
+
"name": "title",
|
|
195
|
+
"type": "text",
|
|
196
|
+
"primaryKey": false,
|
|
197
|
+
"notNull": true,
|
|
198
|
+
"autoincrement": false
|
|
199
|
+
},
|
|
200
|
+
"description": {
|
|
201
|
+
"name": "description",
|
|
202
|
+
"type": "text",
|
|
203
|
+
"primaryKey": false,
|
|
204
|
+
"notNull": false,
|
|
205
|
+
"autoincrement": false
|
|
206
|
+
},
|
|
207
|
+
"icon": {
|
|
208
|
+
"name": "icon",
|
|
209
|
+
"type": "text",
|
|
210
|
+
"primaryKey": false,
|
|
211
|
+
"notNull": false,
|
|
212
|
+
"autoincrement": false
|
|
213
|
+
},
|
|
214
|
+
"sort_order": {
|
|
215
|
+
"name": "sort_order",
|
|
216
|
+
"type": "text",
|
|
217
|
+
"primaryKey": false,
|
|
218
|
+
"notNull": true,
|
|
219
|
+
"autoincrement": false,
|
|
220
|
+
"default": "'newest'"
|
|
221
|
+
},
|
|
222
|
+
"created_at": {
|
|
223
|
+
"name": "created_at",
|
|
224
|
+
"type": "integer",
|
|
225
|
+
"primaryKey": false,
|
|
226
|
+
"notNull": true,
|
|
227
|
+
"autoincrement": false
|
|
228
|
+
},
|
|
229
|
+
"updated_at": {
|
|
230
|
+
"name": "updated_at",
|
|
231
|
+
"type": "integer",
|
|
232
|
+
"primaryKey": false,
|
|
233
|
+
"notNull": true,
|
|
234
|
+
"autoincrement": false
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"indexes": {},
|
|
238
|
+
"foreignKeys": {},
|
|
239
|
+
"compositePrimaryKeys": {},
|
|
240
|
+
"uniqueConstraints": {},
|
|
241
|
+
"checkConstraints": {
|
|
242
|
+
"chk_collection_sort_order": {
|
|
243
|
+
"name": "chk_collection_sort_order",
|
|
244
|
+
"value": "\"collection\".\"sort_order\" IN ('newest', 'oldest', 'rating_desc', 'rating_asc')"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
176
248
|
"media": {
|
|
177
249
|
"name": "media",
|
|
178
250
|
"columns": {
|
|
@@ -185,7 +257,7 @@
|
|
|
185
257
|
},
|
|
186
258
|
"post_id": {
|
|
187
259
|
"name": "post_id",
|
|
188
|
-
"type": "
|
|
260
|
+
"type": "text",
|
|
189
261
|
"primaryKey": false,
|
|
190
262
|
"notNull": false,
|
|
191
263
|
"autoincrement": false
|
|
@@ -218,13 +290,21 @@
|
|
|
218
290
|
"notNull": true,
|
|
219
291
|
"autoincrement": false
|
|
220
292
|
},
|
|
221
|
-
"
|
|
222
|
-
"name": "
|
|
293
|
+
"storage_key": {
|
|
294
|
+
"name": "storage_key",
|
|
223
295
|
"type": "text",
|
|
224
296
|
"primaryKey": false,
|
|
225
297
|
"notNull": true,
|
|
226
298
|
"autoincrement": false
|
|
227
299
|
},
|
|
300
|
+
"provider": {
|
|
301
|
+
"name": "provider",
|
|
302
|
+
"type": "text",
|
|
303
|
+
"primaryKey": false,
|
|
304
|
+
"notNull": true,
|
|
305
|
+
"autoincrement": false,
|
|
306
|
+
"default": "'r2'"
|
|
307
|
+
},
|
|
228
308
|
"width": {
|
|
229
309
|
"name": "width",
|
|
230
310
|
"type": "integer",
|
|
@@ -246,109 +326,443 @@
|
|
|
246
326
|
"notNull": false,
|
|
247
327
|
"autoincrement": false
|
|
248
328
|
},
|
|
329
|
+
"position": {
|
|
330
|
+
"name": "position",
|
|
331
|
+
"type": "text",
|
|
332
|
+
"primaryKey": false,
|
|
333
|
+
"notNull": true,
|
|
334
|
+
"autoincrement": false,
|
|
335
|
+
"default": "'a0'"
|
|
336
|
+
},
|
|
337
|
+
"blurhash": {
|
|
338
|
+
"name": "blurhash",
|
|
339
|
+
"type": "text",
|
|
340
|
+
"primaryKey": false,
|
|
341
|
+
"notNull": false,
|
|
342
|
+
"autoincrement": false
|
|
343
|
+
},
|
|
344
|
+
"waveform": {
|
|
345
|
+
"name": "waveform",
|
|
346
|
+
"type": "text",
|
|
347
|
+
"primaryKey": false,
|
|
348
|
+
"notNull": false,
|
|
349
|
+
"autoincrement": false
|
|
350
|
+
},
|
|
351
|
+
"poster_key": {
|
|
352
|
+
"name": "poster_key",
|
|
353
|
+
"type": "text",
|
|
354
|
+
"primaryKey": false,
|
|
355
|
+
"notNull": false,
|
|
356
|
+
"autoincrement": false
|
|
357
|
+
},
|
|
358
|
+
"summary": {
|
|
359
|
+
"name": "summary",
|
|
360
|
+
"type": "text",
|
|
361
|
+
"primaryKey": false,
|
|
362
|
+
"notNull": false,
|
|
363
|
+
"autoincrement": false
|
|
364
|
+
},
|
|
365
|
+
"chars": {
|
|
366
|
+
"name": "chars",
|
|
367
|
+
"type": "integer",
|
|
368
|
+
"primaryKey": false,
|
|
369
|
+
"notNull": false,
|
|
370
|
+
"autoincrement": false
|
|
371
|
+
},
|
|
372
|
+
"media_kind": {
|
|
373
|
+
"name": "media_kind",
|
|
374
|
+
"type": "text",
|
|
375
|
+
"primaryKey": false,
|
|
376
|
+
"notNull": true,
|
|
377
|
+
"autoincrement": false,
|
|
378
|
+
"default": "'document'"
|
|
379
|
+
},
|
|
249
380
|
"created_at": {
|
|
250
381
|
"name": "created_at",
|
|
251
382
|
"type": "integer",
|
|
252
383
|
"primaryKey": false,
|
|
253
384
|
"notNull": true,
|
|
254
385
|
"autoincrement": false
|
|
386
|
+
},
|
|
387
|
+
"updated_at": {
|
|
388
|
+
"name": "updated_at",
|
|
389
|
+
"type": "integer",
|
|
390
|
+
"primaryKey": false,
|
|
391
|
+
"notNull": true,
|
|
392
|
+
"autoincrement": false
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"indexes": {
|
|
396
|
+
"idx_media_post_id_position": {
|
|
397
|
+
"name": "idx_media_post_id_position",
|
|
398
|
+
"columns": ["post_id", "position"],
|
|
399
|
+
"isUnique": false
|
|
400
|
+
},
|
|
401
|
+
"uq_media_post_position": {
|
|
402
|
+
"name": "uq_media_post_position",
|
|
403
|
+
"columns": ["post_id", "position"],
|
|
404
|
+
"isUnique": true,
|
|
405
|
+
"where": "\"media\".\"post_id\" IS NOT NULL"
|
|
406
|
+
},
|
|
407
|
+
"uq_media_provider_storage_key": {
|
|
408
|
+
"name": "uq_media_provider_storage_key",
|
|
409
|
+
"columns": ["provider", "storage_key"],
|
|
410
|
+
"isUnique": true
|
|
411
|
+
},
|
|
412
|
+
"idx_media_media_kind_post_id": {
|
|
413
|
+
"name": "idx_media_media_kind_post_id",
|
|
414
|
+
"columns": ["media_kind", "post_id"],
|
|
415
|
+
"isUnique": false
|
|
255
416
|
}
|
|
256
417
|
},
|
|
257
|
-
"indexes": {},
|
|
258
418
|
"foreignKeys": {
|
|
259
|
-
"
|
|
260
|
-
"name": "
|
|
419
|
+
"media_post_id_post_id_fk": {
|
|
420
|
+
"name": "media_post_id_post_id_fk",
|
|
261
421
|
"tableFrom": "media",
|
|
262
|
-
"tableTo": "
|
|
422
|
+
"tableTo": "post",
|
|
263
423
|
"columnsFrom": ["post_id"],
|
|
264
424
|
"columnsTo": ["id"],
|
|
265
|
-
"onDelete": "
|
|
425
|
+
"onDelete": "set null",
|
|
266
426
|
"onUpdate": "no action"
|
|
267
427
|
}
|
|
268
428
|
},
|
|
269
429
|
"compositePrimaryKeys": {},
|
|
270
430
|
"uniqueConstraints": {},
|
|
271
|
-
"checkConstraints": {
|
|
431
|
+
"checkConstraints": {
|
|
432
|
+
"chk_media_provider": {
|
|
433
|
+
"name": "chk_media_provider",
|
|
434
|
+
"value": "\"media\".\"provider\" IN ('r2', 's3')"
|
|
435
|
+
},
|
|
436
|
+
"chk_media_media_kind": {
|
|
437
|
+
"name": "chk_media_media_kind",
|
|
438
|
+
"value": "\"media\".\"media_kind\" IN ('image', 'video', 'audio', 'text', 'document')"
|
|
439
|
+
},
|
|
440
|
+
"chk_media_size_positive": {
|
|
441
|
+
"name": "chk_media_size_positive",
|
|
442
|
+
"value": "\"media\".\"size\" > 0"
|
|
443
|
+
},
|
|
444
|
+
"chk_media_position_not_blank": {
|
|
445
|
+
"name": "chk_media_position_not_blank",
|
|
446
|
+
"value": "trim(\"media\".\"position\") <> ''"
|
|
447
|
+
},
|
|
448
|
+
"chk_media_dimensions_positive": {
|
|
449
|
+
"name": "chk_media_dimensions_positive",
|
|
450
|
+
"value": "(\n \"media\".\"width\" IS NULL OR \"media\".\"width\" > 0\n ) AND (\n \"media\".\"height\" IS NULL OR \"media\".\"height\" > 0\n )"
|
|
451
|
+
},
|
|
452
|
+
"chk_media_chars_nonnegative": {
|
|
453
|
+
"name": "chk_media_chars_nonnegative",
|
|
454
|
+
"value": "\"media\".\"chars\" IS NULL OR \"media\".\"chars\" >= 0"
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
"nav_item": {
|
|
459
|
+
"name": "nav_item",
|
|
460
|
+
"columns": {
|
|
461
|
+
"id": {
|
|
462
|
+
"name": "id",
|
|
463
|
+
"type": "text",
|
|
464
|
+
"primaryKey": true,
|
|
465
|
+
"notNull": true,
|
|
466
|
+
"autoincrement": false
|
|
467
|
+
},
|
|
468
|
+
"type": {
|
|
469
|
+
"name": "type",
|
|
470
|
+
"type": "text",
|
|
471
|
+
"primaryKey": false,
|
|
472
|
+
"notNull": true,
|
|
473
|
+
"autoincrement": false,
|
|
474
|
+
"default": "'link'"
|
|
475
|
+
},
|
|
476
|
+
"label": {
|
|
477
|
+
"name": "label",
|
|
478
|
+
"type": "text",
|
|
479
|
+
"primaryKey": false,
|
|
480
|
+
"notNull": true,
|
|
481
|
+
"autoincrement": false
|
|
482
|
+
},
|
|
483
|
+
"url": {
|
|
484
|
+
"name": "url",
|
|
485
|
+
"type": "text",
|
|
486
|
+
"primaryKey": false,
|
|
487
|
+
"notNull": true,
|
|
488
|
+
"autoincrement": false
|
|
489
|
+
},
|
|
490
|
+
"position": {
|
|
491
|
+
"name": "position",
|
|
492
|
+
"type": "text",
|
|
493
|
+
"primaryKey": false,
|
|
494
|
+
"notNull": true,
|
|
495
|
+
"autoincrement": false,
|
|
496
|
+
"default": "'a0'"
|
|
497
|
+
},
|
|
498
|
+
"created_at": {
|
|
499
|
+
"name": "created_at",
|
|
500
|
+
"type": "integer",
|
|
501
|
+
"primaryKey": false,
|
|
502
|
+
"notNull": true,
|
|
503
|
+
"autoincrement": false
|
|
504
|
+
},
|
|
505
|
+
"updated_at": {
|
|
506
|
+
"name": "updated_at",
|
|
507
|
+
"type": "integer",
|
|
508
|
+
"primaryKey": false,
|
|
509
|
+
"notNull": true,
|
|
510
|
+
"autoincrement": false
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
"indexes": {
|
|
514
|
+
"uq_nav_item_position": {
|
|
515
|
+
"name": "uq_nav_item_position",
|
|
516
|
+
"columns": ["position"],
|
|
517
|
+
"isUnique": true
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
"foreignKeys": {},
|
|
521
|
+
"compositePrimaryKeys": {},
|
|
522
|
+
"uniqueConstraints": {},
|
|
523
|
+
"checkConstraints": {
|
|
524
|
+
"chk_nav_item_type": {
|
|
525
|
+
"name": "chk_nav_item_type",
|
|
526
|
+
"value": "\"nav_item\".\"type\" IN ('link', 'system')"
|
|
527
|
+
}
|
|
528
|
+
}
|
|
272
529
|
},
|
|
273
|
-
"
|
|
274
|
-
"name": "
|
|
530
|
+
"path_registry": {
|
|
531
|
+
"name": "path_registry",
|
|
275
532
|
"columns": {
|
|
533
|
+
"id": {
|
|
534
|
+
"name": "id",
|
|
535
|
+
"type": "text",
|
|
536
|
+
"primaryKey": true,
|
|
537
|
+
"notNull": true,
|
|
538
|
+
"autoincrement": false
|
|
539
|
+
},
|
|
540
|
+
"path": {
|
|
541
|
+
"name": "path",
|
|
542
|
+
"type": "text",
|
|
543
|
+
"primaryKey": false,
|
|
544
|
+
"notNull": true,
|
|
545
|
+
"autoincrement": false
|
|
546
|
+
},
|
|
547
|
+
"kind": {
|
|
548
|
+
"name": "kind",
|
|
549
|
+
"type": "text",
|
|
550
|
+
"primaryKey": false,
|
|
551
|
+
"notNull": true,
|
|
552
|
+
"autoincrement": false
|
|
553
|
+
},
|
|
276
554
|
"post_id": {
|
|
277
555
|
"name": "post_id",
|
|
556
|
+
"type": "text",
|
|
557
|
+
"primaryKey": false,
|
|
558
|
+
"notNull": false,
|
|
559
|
+
"autoincrement": false
|
|
560
|
+
},
|
|
561
|
+
"collection_id": {
|
|
562
|
+
"name": "collection_id",
|
|
563
|
+
"type": "text",
|
|
564
|
+
"primaryKey": false,
|
|
565
|
+
"notNull": false,
|
|
566
|
+
"autoincrement": false
|
|
567
|
+
},
|
|
568
|
+
"redirect_to_path": {
|
|
569
|
+
"name": "redirect_to_path",
|
|
570
|
+
"type": "text",
|
|
571
|
+
"primaryKey": false,
|
|
572
|
+
"notNull": false,
|
|
573
|
+
"autoincrement": false
|
|
574
|
+
},
|
|
575
|
+
"redirect_type": {
|
|
576
|
+
"name": "redirect_type",
|
|
577
|
+
"type": "integer",
|
|
578
|
+
"primaryKey": false,
|
|
579
|
+
"notNull": false,
|
|
580
|
+
"autoincrement": false
|
|
581
|
+
},
|
|
582
|
+
"created_at": {
|
|
583
|
+
"name": "created_at",
|
|
278
584
|
"type": "integer",
|
|
279
585
|
"primaryKey": false,
|
|
280
586
|
"notNull": true,
|
|
281
587
|
"autoincrement": false
|
|
282
588
|
},
|
|
589
|
+
"updated_at": {
|
|
590
|
+
"name": "updated_at",
|
|
591
|
+
"type": "integer",
|
|
592
|
+
"primaryKey": false,
|
|
593
|
+
"notNull": true,
|
|
594
|
+
"autoincrement": false
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
"indexes": {
|
|
598
|
+
"path_registry_path_unique": {
|
|
599
|
+
"name": "path_registry_path_unique",
|
|
600
|
+
"columns": ["path"],
|
|
601
|
+
"isUnique": true
|
|
602
|
+
},
|
|
603
|
+
"uq_path_registry_post_slug": {
|
|
604
|
+
"name": "uq_path_registry_post_slug",
|
|
605
|
+
"columns": ["post_id"],
|
|
606
|
+
"isUnique": true,
|
|
607
|
+
"where": "\"path_registry\".\"kind\" = 'slug' AND \"path_registry\".\"post_id\" IS NOT NULL"
|
|
608
|
+
},
|
|
609
|
+
"uq_path_registry_collection_slug": {
|
|
610
|
+
"name": "uq_path_registry_collection_slug",
|
|
611
|
+
"columns": ["collection_id"],
|
|
612
|
+
"isUnique": true,
|
|
613
|
+
"where": "\"path_registry\".\"kind\" = 'slug' AND \"path_registry\".\"collection_id\" IS NOT NULL"
|
|
614
|
+
},
|
|
615
|
+
"idx_path_registry_post_id": {
|
|
616
|
+
"name": "idx_path_registry_post_id",
|
|
617
|
+
"columns": ["post_id"],
|
|
618
|
+
"isUnique": false
|
|
619
|
+
},
|
|
620
|
+
"idx_path_registry_collection_id": {
|
|
621
|
+
"name": "idx_path_registry_collection_id",
|
|
622
|
+
"columns": ["collection_id"],
|
|
623
|
+
"isUnique": false
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
"foreignKeys": {
|
|
627
|
+
"path_registry_post_id_post_id_fk": {
|
|
628
|
+
"name": "path_registry_post_id_post_id_fk",
|
|
629
|
+
"tableFrom": "path_registry",
|
|
630
|
+
"tableTo": "post",
|
|
631
|
+
"columnsFrom": ["post_id"],
|
|
632
|
+
"columnsTo": ["id"],
|
|
633
|
+
"onDelete": "cascade",
|
|
634
|
+
"onUpdate": "no action"
|
|
635
|
+
},
|
|
636
|
+
"path_registry_collection_id_collection_id_fk": {
|
|
637
|
+
"name": "path_registry_collection_id_collection_id_fk",
|
|
638
|
+
"tableFrom": "path_registry",
|
|
639
|
+
"tableTo": "collection",
|
|
640
|
+
"columnsFrom": ["collection_id"],
|
|
641
|
+
"columnsTo": ["id"],
|
|
642
|
+
"onDelete": "cascade",
|
|
643
|
+
"onUpdate": "no action"
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
"compositePrimaryKeys": {},
|
|
647
|
+
"uniqueConstraints": {},
|
|
648
|
+
"checkConstraints": {
|
|
649
|
+
"chk_path_registry_kind": {
|
|
650
|
+
"name": "chk_path_registry_kind",
|
|
651
|
+
"value": "\"path_registry\".\"kind\" IN ('slug', 'alias', 'redirect')"
|
|
652
|
+
},
|
|
653
|
+
"chk_path_registry_shape": {
|
|
654
|
+
"name": "chk_path_registry_shape",
|
|
655
|
+
"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 ) 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 )"
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
"post_collection": {
|
|
660
|
+
"name": "post_collection",
|
|
661
|
+
"columns": {
|
|
662
|
+
"post_id": {
|
|
663
|
+
"name": "post_id",
|
|
664
|
+
"type": "text",
|
|
665
|
+
"primaryKey": false,
|
|
666
|
+
"notNull": true,
|
|
667
|
+
"autoincrement": false
|
|
668
|
+
},
|
|
283
669
|
"collection_id": {
|
|
284
670
|
"name": "collection_id",
|
|
285
|
-
"type": "
|
|
671
|
+
"type": "text",
|
|
286
672
|
"primaryKey": false,
|
|
287
673
|
"notNull": true,
|
|
288
674
|
"autoincrement": false
|
|
289
675
|
},
|
|
290
|
-
"
|
|
291
|
-
"name": "
|
|
676
|
+
"created_at": {
|
|
677
|
+
"name": "created_at",
|
|
292
678
|
"type": "integer",
|
|
293
679
|
"primaryKey": false,
|
|
294
680
|
"notNull": true,
|
|
295
681
|
"autoincrement": false
|
|
296
682
|
}
|
|
297
683
|
},
|
|
298
|
-
"indexes": {
|
|
684
|
+
"indexes": {
|
|
685
|
+
"idx_post_collection_collection_id": {
|
|
686
|
+
"name": "idx_post_collection_collection_id",
|
|
687
|
+
"columns": ["collection_id"],
|
|
688
|
+
"isUnique": false
|
|
689
|
+
}
|
|
690
|
+
},
|
|
299
691
|
"foreignKeys": {
|
|
300
|
-
"
|
|
301
|
-
"name": "
|
|
302
|
-
"tableFrom": "
|
|
303
|
-
"tableTo": "
|
|
692
|
+
"post_collection_post_id_post_id_fk": {
|
|
693
|
+
"name": "post_collection_post_id_post_id_fk",
|
|
694
|
+
"tableFrom": "post_collection",
|
|
695
|
+
"tableTo": "post",
|
|
304
696
|
"columnsFrom": ["post_id"],
|
|
305
697
|
"columnsTo": ["id"],
|
|
306
|
-
"onDelete": "
|
|
698
|
+
"onDelete": "cascade",
|
|
307
699
|
"onUpdate": "no action"
|
|
308
700
|
},
|
|
309
|
-
"
|
|
310
|
-
"name": "
|
|
311
|
-
"tableFrom": "
|
|
312
|
-
"tableTo": "
|
|
701
|
+
"post_collection_collection_id_collection_id_fk": {
|
|
702
|
+
"name": "post_collection_collection_id_collection_id_fk",
|
|
703
|
+
"tableFrom": "post_collection",
|
|
704
|
+
"tableTo": "collection",
|
|
313
705
|
"columnsFrom": ["collection_id"],
|
|
314
706
|
"columnsTo": ["id"],
|
|
315
|
-
"onDelete": "
|
|
707
|
+
"onDelete": "cascade",
|
|
316
708
|
"onUpdate": "no action"
|
|
317
709
|
}
|
|
318
710
|
},
|
|
319
711
|
"compositePrimaryKeys": {
|
|
320
|
-
"
|
|
712
|
+
"post_collection_post_id_collection_id_pk": {
|
|
321
713
|
"columns": ["post_id", "collection_id"],
|
|
322
|
-
"name": "
|
|
714
|
+
"name": "post_collection_post_id_collection_id_pk"
|
|
323
715
|
}
|
|
324
716
|
},
|
|
325
717
|
"uniqueConstraints": {},
|
|
326
718
|
"checkConstraints": {}
|
|
327
719
|
},
|
|
328
|
-
"
|
|
329
|
-
"name": "
|
|
720
|
+
"post": {
|
|
721
|
+
"name": "post",
|
|
330
722
|
"columns": {
|
|
331
723
|
"id": {
|
|
332
724
|
"name": "id",
|
|
333
|
-
"type": "
|
|
725
|
+
"type": "text",
|
|
334
726
|
"primaryKey": true,
|
|
335
727
|
"notNull": true,
|
|
336
|
-
"autoincrement":
|
|
728
|
+
"autoincrement": false
|
|
337
729
|
},
|
|
338
|
-
"
|
|
339
|
-
"name": "
|
|
730
|
+
"format": {
|
|
731
|
+
"name": "format",
|
|
340
732
|
"type": "text",
|
|
341
733
|
"primaryKey": false,
|
|
342
734
|
"notNull": true,
|
|
343
735
|
"autoincrement": false
|
|
344
736
|
},
|
|
737
|
+
"status": {
|
|
738
|
+
"name": "status",
|
|
739
|
+
"type": "text",
|
|
740
|
+
"primaryKey": false,
|
|
741
|
+
"notNull": true,
|
|
742
|
+
"autoincrement": false,
|
|
743
|
+
"default": "'published'"
|
|
744
|
+
},
|
|
345
745
|
"visibility": {
|
|
346
746
|
"name": "visibility",
|
|
347
747
|
"type": "text",
|
|
348
748
|
"primaryKey": false,
|
|
349
|
-
"notNull":
|
|
749
|
+
"notNull": false,
|
|
350
750
|
"autoincrement": false,
|
|
351
|
-
"default": "'
|
|
751
|
+
"default": "'public'"
|
|
752
|
+
},
|
|
753
|
+
"pinned_at": {
|
|
754
|
+
"name": "pinned_at",
|
|
755
|
+
"type": "integer",
|
|
756
|
+
"primaryKey": false,
|
|
757
|
+
"notNull": false,
|
|
758
|
+
"autoincrement": false
|
|
759
|
+
},
|
|
760
|
+
"featured_at": {
|
|
761
|
+
"name": "featured_at",
|
|
762
|
+
"type": "integer",
|
|
763
|
+
"primaryKey": false,
|
|
764
|
+
"notNull": false,
|
|
765
|
+
"autoincrement": false
|
|
352
766
|
},
|
|
353
767
|
"title": {
|
|
354
768
|
"name": "title",
|
|
@@ -357,60 +771,67 @@
|
|
|
357
771
|
"notNull": false,
|
|
358
772
|
"autoincrement": false
|
|
359
773
|
},
|
|
360
|
-
"
|
|
361
|
-
"name": "
|
|
774
|
+
"url": {
|
|
775
|
+
"name": "url",
|
|
362
776
|
"type": "text",
|
|
363
777
|
"primaryKey": false,
|
|
364
778
|
"notNull": false,
|
|
365
779
|
"autoincrement": false
|
|
366
780
|
},
|
|
367
|
-
"
|
|
368
|
-
"name": "
|
|
781
|
+
"body": {
|
|
782
|
+
"name": "body",
|
|
369
783
|
"type": "text",
|
|
370
784
|
"primaryKey": false,
|
|
371
785
|
"notNull": false,
|
|
372
786
|
"autoincrement": false
|
|
373
787
|
},
|
|
374
|
-
"
|
|
375
|
-
"name": "
|
|
788
|
+
"body_html": {
|
|
789
|
+
"name": "body_html",
|
|
376
790
|
"type": "text",
|
|
377
791
|
"primaryKey": false,
|
|
378
792
|
"notNull": false,
|
|
379
793
|
"autoincrement": false
|
|
380
794
|
},
|
|
381
|
-
"
|
|
382
|
-
"name": "
|
|
795
|
+
"body_text": {
|
|
796
|
+
"name": "body_text",
|
|
383
797
|
"type": "text",
|
|
384
798
|
"primaryKey": false,
|
|
385
799
|
"notNull": false,
|
|
386
800
|
"autoincrement": false
|
|
387
801
|
},
|
|
388
|
-
"
|
|
389
|
-
"name": "
|
|
802
|
+
"quote_text": {
|
|
803
|
+
"name": "quote_text",
|
|
390
804
|
"type": "text",
|
|
391
805
|
"primaryKey": false,
|
|
392
806
|
"notNull": false,
|
|
393
807
|
"autoincrement": false
|
|
394
808
|
},
|
|
395
|
-
"
|
|
396
|
-
"name": "
|
|
809
|
+
"summary": {
|
|
810
|
+
"name": "summary",
|
|
397
811
|
"type": "text",
|
|
398
812
|
"primaryKey": false,
|
|
399
813
|
"notNull": false,
|
|
400
814
|
"autoincrement": false
|
|
401
815
|
},
|
|
816
|
+
"rating": {
|
|
817
|
+
"name": "rating",
|
|
818
|
+
"type": "integer",
|
|
819
|
+
"primaryKey": false,
|
|
820
|
+
"notNull": false,
|
|
821
|
+
"autoincrement": false
|
|
822
|
+
},
|
|
402
823
|
"reply_to_id": {
|
|
403
824
|
"name": "reply_to_id",
|
|
404
|
-
"type": "
|
|
825
|
+
"type": "text",
|
|
405
826
|
"primaryKey": false,
|
|
406
827
|
"notNull": false,
|
|
407
828
|
"autoincrement": false
|
|
408
829
|
},
|
|
409
830
|
"thread_id": {
|
|
410
831
|
"name": "thread_id",
|
|
411
|
-
"type": "
|
|
832
|
+
"type": "text",
|
|
412
833
|
"primaryKey": false,
|
|
413
|
-
"notNull":
|
|
834
|
+
"notNull": true,
|
|
414
835
|
"autoincrement": false
|
|
415
836
|
},
|
|
416
837
|
"deleted_at": {
|
|
@@ -424,7 +845,14 @@
|
|
|
424
845
|
"name": "published_at",
|
|
425
846
|
"type": "integer",
|
|
426
847
|
"primaryKey": false,
|
|
427
|
-
"notNull":
|
|
848
|
+
"notNull": false,
|
|
849
|
+
"autoincrement": false
|
|
850
|
+
},
|
|
851
|
+
"last_activity_at": {
|
|
852
|
+
"name": "last_activity_at",
|
|
853
|
+
"type": "integer",
|
|
854
|
+
"primaryKey": false,
|
|
855
|
+
"notNull": false,
|
|
428
856
|
"autoincrement": false
|
|
429
857
|
},
|
|
430
858
|
"created_at": {
|
|
@@ -442,63 +870,125 @@
|
|
|
442
870
|
"autoincrement": false
|
|
443
871
|
}
|
|
444
872
|
},
|
|
445
|
-
"indexes": {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
},
|
|
451
|
-
"redirects": {
|
|
452
|
-
"name": "redirects",
|
|
453
|
-
"columns": {
|
|
454
|
-
"id": {
|
|
455
|
-
"name": "id",
|
|
456
|
-
"type": "integer",
|
|
457
|
-
"primaryKey": true,
|
|
458
|
-
"notNull": true,
|
|
459
|
-
"autoincrement": true
|
|
460
|
-
},
|
|
461
|
-
"from_path": {
|
|
462
|
-
"name": "from_path",
|
|
463
|
-
"type": "text",
|
|
464
|
-
"primaryKey": false,
|
|
465
|
-
"notNull": true,
|
|
466
|
-
"autoincrement": false
|
|
467
|
-
},
|
|
468
|
-
"to_path": {
|
|
469
|
-
"name": "to_path",
|
|
470
|
-
"type": "text",
|
|
471
|
-
"primaryKey": false,
|
|
472
|
-
"notNull": true,
|
|
473
|
-
"autoincrement": false
|
|
474
|
-
},
|
|
475
|
-
"type": {
|
|
476
|
-
"name": "type",
|
|
477
|
-
"type": "integer",
|
|
478
|
-
"primaryKey": false,
|
|
479
|
-
"notNull": true,
|
|
480
|
-
"autoincrement": false,
|
|
481
|
-
"default": 301
|
|
873
|
+
"indexes": {
|
|
874
|
+
"uq_post_id_thread_id": {
|
|
875
|
+
"name": "uq_post_id_thread_id",
|
|
876
|
+
"columns": ["id", "thread_id"],
|
|
877
|
+
"isUnique": true
|
|
482
878
|
},
|
|
483
|
-
"
|
|
484
|
-
"name": "
|
|
485
|
-
"
|
|
486
|
-
"
|
|
487
|
-
|
|
488
|
-
|
|
879
|
+
"idx_post_thread_id": {
|
|
880
|
+
"name": "idx_post_thread_id",
|
|
881
|
+
"columns": ["thread_id"],
|
|
882
|
+
"isUnique": false
|
|
883
|
+
},
|
|
884
|
+
"idx_post_thread_live_created": {
|
|
885
|
+
"name": "idx_post_thread_live_created",
|
|
886
|
+
"columns": ["thread_id", "created_at", "id"],
|
|
887
|
+
"isUnique": false,
|
|
888
|
+
"where": "\"post\".\"deleted_at\" IS NULL"
|
|
889
|
+
},
|
|
890
|
+
"idx_post_status_deleted_published": {
|
|
891
|
+
"name": "idx_post_status_deleted_published",
|
|
892
|
+
"columns": ["status", "deleted_at", "published_at"],
|
|
893
|
+
"isUnique": false
|
|
894
|
+
},
|
|
895
|
+
"idx_post_status_deleted_activity": {
|
|
896
|
+
"name": "idx_post_status_deleted_activity",
|
|
897
|
+
"columns": ["status", "deleted_at", "last_activity_at"],
|
|
898
|
+
"isUnique": false
|
|
899
|
+
},
|
|
900
|
+
"idx_post_root_live_published_activity": {
|
|
901
|
+
"name": "idx_post_root_live_published_activity",
|
|
902
|
+
"columns": ["last_activity_at", "id"],
|
|
903
|
+
"isUnique": false,
|
|
904
|
+
"where": "\"post\".\"deleted_at\" IS NULL AND \"post\".\"reply_to_id\" IS NULL AND \"post\".\"status\" = 'published'"
|
|
905
|
+
},
|
|
906
|
+
"idx_post_root_live_draft_updated": {
|
|
907
|
+
"name": "idx_post_root_live_draft_updated",
|
|
908
|
+
"columns": ["updated_at", "id"],
|
|
909
|
+
"isUnique": false,
|
|
910
|
+
"where": "\"post\".\"deleted_at\" IS NULL AND \"post\".\"reply_to_id\" IS NULL AND \"post\".\"status\" = 'draft'"
|
|
911
|
+
},
|
|
912
|
+
"idx_post_reply_live_thread_created": {
|
|
913
|
+
"name": "idx_post_reply_live_thread_created",
|
|
914
|
+
"columns": ["thread_id", "created_at", "id"],
|
|
915
|
+
"isUnique": false,
|
|
916
|
+
"where": "\"post\".\"deleted_at\" IS NULL AND \"post\".\"reply_to_id\" IS NOT NULL AND \"post\".\"status\" = 'published'"
|
|
489
917
|
}
|
|
490
918
|
},
|
|
491
|
-
"
|
|
492
|
-
"
|
|
493
|
-
"name": "
|
|
494
|
-
"
|
|
495
|
-
"
|
|
919
|
+
"foreignKeys": {
|
|
920
|
+
"post_reply_to_id_post_id_fk": {
|
|
921
|
+
"name": "post_reply_to_id_post_id_fk",
|
|
922
|
+
"tableFrom": "post",
|
|
923
|
+
"tableTo": "post",
|
|
924
|
+
"columnsFrom": ["reply_to_id"],
|
|
925
|
+
"columnsTo": ["id"],
|
|
926
|
+
"onDelete": "no action",
|
|
927
|
+
"onUpdate": "no action"
|
|
928
|
+
},
|
|
929
|
+
"post_thread_id_post_id_fk": {
|
|
930
|
+
"name": "post_thread_id_post_id_fk",
|
|
931
|
+
"tableFrom": "post",
|
|
932
|
+
"tableTo": "post",
|
|
933
|
+
"columnsFrom": ["thread_id"],
|
|
934
|
+
"columnsTo": ["id"],
|
|
935
|
+
"onDelete": "no action",
|
|
936
|
+
"onUpdate": "no action"
|
|
937
|
+
},
|
|
938
|
+
"post_reply_to_id_thread_id_post_id_thread_id_fk": {
|
|
939
|
+
"name": "post_reply_to_id_thread_id_post_id_thread_id_fk",
|
|
940
|
+
"tableFrom": "post",
|
|
941
|
+
"tableTo": "post",
|
|
942
|
+
"columnsFrom": ["reply_to_id", "thread_id"],
|
|
943
|
+
"columnsTo": ["id", "thread_id"],
|
|
944
|
+
"onDelete": "no action",
|
|
945
|
+
"onUpdate": "no action"
|
|
496
946
|
}
|
|
497
947
|
},
|
|
498
|
-
"foreignKeys": {},
|
|
499
948
|
"compositePrimaryKeys": {},
|
|
500
949
|
"uniqueConstraints": {},
|
|
501
|
-
"checkConstraints": {
|
|
950
|
+
"checkConstraints": {
|
|
951
|
+
"chk_post_format": {
|
|
952
|
+
"name": "chk_post_format",
|
|
953
|
+
"value": "\"post\".\"format\" IN ('note', 'link', 'quote')"
|
|
954
|
+
},
|
|
955
|
+
"chk_post_status": {
|
|
956
|
+
"name": "chk_post_status",
|
|
957
|
+
"value": "\"post\".\"status\" IN ('draft', 'published')"
|
|
958
|
+
},
|
|
959
|
+
"chk_post_visibility": {
|
|
960
|
+
"name": "chk_post_visibility",
|
|
961
|
+
"value": "\"post\".\"visibility\" IN ('public', 'unlisted', 'private')"
|
|
962
|
+
},
|
|
963
|
+
"chk_post_root_visibility_present": {
|
|
964
|
+
"name": "chk_post_root_visibility_present",
|
|
965
|
+
"value": "(\n \"post\".\"reply_to_id\" IS NULL\n AND \"post\".\"visibility\" IS NOT NULL\n ) OR (\n \"post\".\"reply_to_id\" IS NOT NULL\n AND \"post\".\"visibility\" IS NULL\n )"
|
|
966
|
+
},
|
|
967
|
+
"chk_post_reply_to_not_self": {
|
|
968
|
+
"name": "chk_post_reply_to_not_self",
|
|
969
|
+
"value": "\"post\".\"reply_to_id\" IS NULL OR \"post\".\"reply_to_id\" <> \"post\".\"id\""
|
|
970
|
+
},
|
|
971
|
+
"chk_post_thread_shape": {
|
|
972
|
+
"name": "chk_post_thread_shape",
|
|
973
|
+
"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 )"
|
|
974
|
+
},
|
|
975
|
+
"chk_post_reply_not_pinned": {
|
|
976
|
+
"name": "chk_post_reply_not_pinned",
|
|
977
|
+
"value": "\"post\".\"pinned_at\" IS NULL OR \"post\".\"reply_to_id\" IS NULL"
|
|
978
|
+
},
|
|
979
|
+
"chk_post_format_shape": {
|
|
980
|
+
"name": "chk_post_format_shape",
|
|
981
|
+
"value": "(\n \"post\".\"format\" = 'note'\n AND (\"post\".\"url\" IS NULL OR trim(\"post\".\"url\") = '')\n AND (\"post\".\"quote_text\" IS NULL OR trim(\"post\".\"quote_text\") = '')\n ) OR (\n \"post\".\"format\" = 'link'\n AND \"post\".\"url\" IS NOT NULL\n AND trim(\"post\".\"url\") <> ''\n AND (\"post\".\"quote_text\" IS NULL OR trim(\"post\".\"quote_text\") = '')\n ) OR (\n \"post\".\"format\" = 'quote'\n AND \"post\".\"quote_text\" IS NOT NULL\n AND trim(\"post\".\"quote_text\") <> ''\n )"
|
|
982
|
+
},
|
|
983
|
+
"chk_post_rating_range": {
|
|
984
|
+
"name": "chk_post_rating_range",
|
|
985
|
+
"value": "\"post\".\"rating\" IS NULL OR \"post\".\"rating\" BETWEEN 1 AND 5"
|
|
986
|
+
},
|
|
987
|
+
"chk_post_status_published_at": {
|
|
988
|
+
"name": "chk_post_status_published_at",
|
|
989
|
+
"value": "(\n \"post\".\"status\" = 'draft'\n AND \"post\".\"published_at\" IS NULL\n ) OR (\n \"post\".\"status\" = 'published'\n AND \"post\".\"published_at\" IS NOT NULL\n )"
|
|
990
|
+
}
|
|
991
|
+
}
|
|
502
992
|
},
|
|
503
993
|
"session": {
|
|
504
994
|
"name": "session",
|
|
@@ -565,6 +1055,11 @@
|
|
|
565
1055
|
"name": "session_token_unique",
|
|
566
1056
|
"columns": ["token"],
|
|
567
1057
|
"isUnique": true
|
|
1058
|
+
},
|
|
1059
|
+
"idx_session_user_id": {
|
|
1060
|
+
"name": "idx_session_user_id",
|
|
1061
|
+
"columns": ["user_id"],
|
|
1062
|
+
"isUnique": false
|
|
568
1063
|
}
|
|
569
1064
|
},
|
|
570
1065
|
"foreignKeys": {
|
|
@@ -582,8 +1077,8 @@
|
|
|
582
1077
|
"uniqueConstraints": {},
|
|
583
1078
|
"checkConstraints": {}
|
|
584
1079
|
},
|
|
585
|
-
"
|
|
586
|
-
"name": "
|
|
1080
|
+
"setting": {
|
|
1081
|
+
"name": "setting",
|
|
587
1082
|
"columns": {
|
|
588
1083
|
"key": {
|
|
589
1084
|
"name": "key",
|
|
@@ -613,6 +1108,95 @@
|
|
|
613
1108
|
"uniqueConstraints": {},
|
|
614
1109
|
"checkConstraints": {}
|
|
615
1110
|
},
|
|
1111
|
+
"sidebar_item": {
|
|
1112
|
+
"name": "sidebar_item",
|
|
1113
|
+
"columns": {
|
|
1114
|
+
"id": {
|
|
1115
|
+
"name": "id",
|
|
1116
|
+
"type": "text",
|
|
1117
|
+
"primaryKey": true,
|
|
1118
|
+
"notNull": true,
|
|
1119
|
+
"autoincrement": false
|
|
1120
|
+
},
|
|
1121
|
+
"type": {
|
|
1122
|
+
"name": "type",
|
|
1123
|
+
"type": "text",
|
|
1124
|
+
"primaryKey": false,
|
|
1125
|
+
"notNull": true,
|
|
1126
|
+
"autoincrement": false
|
|
1127
|
+
},
|
|
1128
|
+
"collection_id": {
|
|
1129
|
+
"name": "collection_id",
|
|
1130
|
+
"type": "text",
|
|
1131
|
+
"primaryKey": false,
|
|
1132
|
+
"notNull": false,
|
|
1133
|
+
"autoincrement": false
|
|
1134
|
+
},
|
|
1135
|
+
"position": {
|
|
1136
|
+
"name": "position",
|
|
1137
|
+
"type": "text",
|
|
1138
|
+
"primaryKey": false,
|
|
1139
|
+
"notNull": true,
|
|
1140
|
+
"autoincrement": false,
|
|
1141
|
+
"default": "'a0'"
|
|
1142
|
+
},
|
|
1143
|
+
"created_at": {
|
|
1144
|
+
"name": "created_at",
|
|
1145
|
+
"type": "integer",
|
|
1146
|
+
"primaryKey": false,
|
|
1147
|
+
"notNull": true,
|
|
1148
|
+
"autoincrement": false
|
|
1149
|
+
},
|
|
1150
|
+
"updated_at": {
|
|
1151
|
+
"name": "updated_at",
|
|
1152
|
+
"type": "integer",
|
|
1153
|
+
"primaryKey": false,
|
|
1154
|
+
"notNull": true,
|
|
1155
|
+
"autoincrement": false
|
|
1156
|
+
}
|
|
1157
|
+
},
|
|
1158
|
+
"indexes": {
|
|
1159
|
+
"idx_sidebar_item_collection_id": {
|
|
1160
|
+
"name": "idx_sidebar_item_collection_id",
|
|
1161
|
+
"columns": ["collection_id"],
|
|
1162
|
+
"isUnique": false
|
|
1163
|
+
},
|
|
1164
|
+
"uq_sidebar_item_position": {
|
|
1165
|
+
"name": "uq_sidebar_item_position",
|
|
1166
|
+
"columns": ["position"],
|
|
1167
|
+
"isUnique": true
|
|
1168
|
+
},
|
|
1169
|
+
"uq_sidebar_item_collection_once": {
|
|
1170
|
+
"name": "uq_sidebar_item_collection_once",
|
|
1171
|
+
"columns": ["collection_id"],
|
|
1172
|
+
"isUnique": true,
|
|
1173
|
+
"where": "\"sidebar_item\".\"type\" = 'collection' AND \"sidebar_item\".\"collection_id\" IS NOT NULL"
|
|
1174
|
+
}
|
|
1175
|
+
},
|
|
1176
|
+
"foreignKeys": {
|
|
1177
|
+
"sidebar_item_collection_id_collection_id_fk": {
|
|
1178
|
+
"name": "sidebar_item_collection_id_collection_id_fk",
|
|
1179
|
+
"tableFrom": "sidebar_item",
|
|
1180
|
+
"tableTo": "collection",
|
|
1181
|
+
"columnsFrom": ["collection_id"],
|
|
1182
|
+
"columnsTo": ["id"],
|
|
1183
|
+
"onDelete": "cascade",
|
|
1184
|
+
"onUpdate": "no action"
|
|
1185
|
+
}
|
|
1186
|
+
},
|
|
1187
|
+
"compositePrimaryKeys": {},
|
|
1188
|
+
"uniqueConstraints": {},
|
|
1189
|
+
"checkConstraints": {
|
|
1190
|
+
"chk_sidebar_item_type": {
|
|
1191
|
+
"name": "chk_sidebar_item_type",
|
|
1192
|
+
"value": "\"sidebar_item\".\"type\" IN ('collection', 'divider')"
|
|
1193
|
+
},
|
|
1194
|
+
"chk_sidebar_item_shape": {
|
|
1195
|
+
"name": "chk_sidebar_item_shape",
|
|
1196
|
+
"value": "(\n \"sidebar_item\".\"type\" = 'collection' AND \"sidebar_item\".\"collection_id\" IS NOT NULL\n ) OR (\n \"sidebar_item\".\"type\" = 'divider' AND \"sidebar_item\".\"collection_id\" IS NULL\n )"
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
616
1200
|
"user": {
|
|
617
1201
|
"name": "user",
|
|
618
1202
|
"columns": {
|
|
@@ -658,7 +1242,7 @@
|
|
|
658
1242
|
"primaryKey": false,
|
|
659
1243
|
"notNull": false,
|
|
660
1244
|
"autoincrement": false,
|
|
661
|
-
"default": "'
|
|
1245
|
+
"default": "'member'"
|
|
662
1246
|
},
|
|
663
1247
|
"created_at": {
|
|
664
1248
|
"name": "created_at",
|