@meith/db 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/LICENSE.md +165 -0
  2. package/migrations/0000_initial_schema.sql +538 -0
  3. package/migrations/0001_seed_usergroups.sql +111 -0
  4. package/migrations/0002_group_promotions.sql +25 -0
  5. package/migrations/0003_counter_maintenance.sql +34 -0
  6. package/migrations/0004_post_render_cache.sql +7 -0
  7. package/migrations/0005_reports.sql +51 -0
  8. package/migrations/0006_warnings.sql +91 -0
  9. package/migrations/0007_notifications.sql +44 -0
  10. package/migrations/0008_subscriptions.sql +48 -0
  11. package/migrations/0009_member_preferences.sql +13 -0
  12. package/migrations/0010_profile_fields.sql +53 -0
  13. package/migrations/0011_private_messages.sql +63 -0
  14. package/migrations/0012_user_relations.sql +18 -0
  15. package/migrations/0013_reputation.sql +45 -0
  16. package/migrations/0014_signatures.sql +16 -0
  17. package/migrations/0015_admin_sessions.sql +24 -0
  18. package/migrations/0016_attachments.sql +51 -0
  19. package/migrations/0017_avatars.sql +33 -0
  20. package/migrations/0018_mass_mail.sql +15 -0
  21. package/migrations/0019_word_filters.sql +8 -0
  22. package/migrations/0020_searches.sql +15 -0
  23. package/migrations/0021_presence_stats.sql +18 -0
  24. package/migrations/0022_api_tokens_webhooks.sql +58 -0
  25. package/migrations/0023_install_state.sql +6 -0
  26. package/migrations/0024_component_versions.sql +13 -0
  27. package/migrations/0025_import.sql +25 -0
  28. package/migrations/0026_polls.sql +40 -0
  29. package/migrations/0027_drafts.sql +13 -0
  30. package/migrations/0028_board_vocabulary.sql +32 -0
  31. package/migrations/0029_announcements.sql +16 -0
  32. package/migrations/0030_antispam.sql +18 -0
  33. package/migrations/0031_markdown.sql +24 -0
  34. package/migrations/0032_theme_enablement.sql +1 -0
  35. package/migrations/0033_group_identity.sql +5 -0
  36. package/migrations/0034_search_document_version.sql +4 -0
  37. package/migrations/0035_categories_hold_no_threads.sql +1 -0
  38. package/migrations/0036_expiring_group_grants.sql +6 -0
  39. package/migrations/0037_automatic_timezone.sql +3 -0
  40. package/migrations/0038_primary_group_grants.sql +3 -0
  41. package/migrations/0039_moderator_log_forum_scope.sql +1 -0
  42. package/migrations/0040_moderator_restore_grants.sql +1 -0
  43. package/migrations/0041_drop_placebo_moderator_rights.sql +3 -0
  44. package/migrations/0042_drop_placebo_delete_others.sql +2 -0
  45. package/migrations/0043_federated_identity.sql +28 -0
  46. package/migrations/0044_second_factor.sql +34 -0
  47. package/migrations/0045_drop_dead_task_due_index.sql +1 -0
  48. package/migrations/0046_member_locale.sql +1 -0
  49. package/migrations/0047_navigation_items.sql +34 -0
  50. package/migrations/0048_web_push.sql +16 -0
  51. package/migrations/0049_plugin_health.sql +7 -0
  52. package/migrations/0050_drop_forum_password_grants.sql +1 -0
  53. package/migrations/0051_glossy_barracuda.sql +1 -0
  54. package/migrations/0052_many_professor_monster.sql +2 -0
  55. package/migrations/0053_strange_maximus.sql +14 -0
  56. package/migrations/0054_legacy_import_sources.sql +25 -0
  57. package/migrations/0055_poll_parity.sql +14 -0
  58. package/migrations/0056_marketplace_catalog.sql +11 -0
  59. package/migrations/meta/0000_snapshot.json +4412 -0
  60. package/migrations/meta/0006_snapshot.json +5411 -0
  61. package/migrations/meta/0007_snapshot.json +5634 -0
  62. package/migrations/meta/0008_snapshot.json +5779 -0
  63. package/migrations/meta/0009_snapshot.json +5816 -0
  64. package/migrations/meta/0010_snapshot.json +6117 -0
  65. package/migrations/meta/0011_snapshot.json +6406 -0
  66. package/migrations/meta/0012_snapshot.json +6517 -0
  67. package/migrations/meta/0013_snapshot.json +6722 -0
  68. package/migrations/meta/0014_snapshot.json +6777 -0
  69. package/migrations/meta/0015_snapshot.json +6914 -0
  70. package/migrations/meta/0016_snapshot.json +7192 -0
  71. package/migrations/meta/0017_snapshot.json +7248 -0
  72. package/migrations/meta/0018_snapshot.json +7355 -0
  73. package/migrations/meta/0019_snapshot.json +7419 -0
  74. package/migrations/meta/0020_snapshot.json +7562 -0
  75. package/migrations/meta/0021_snapshot.json +7653 -0
  76. package/migrations/meta/0031_snapshot.json +8162 -0
  77. package/migrations/meta/0032_snapshot.json +8169 -0
  78. package/migrations/meta/0033_snapshot.json +8193 -0
  79. package/migrations/meta/0034_snapshot.json +8221 -0
  80. package/migrations/meta/0036_snapshot.json +8262 -0
  81. package/migrations/meta/0037_snapshot.json +8262 -0
  82. package/migrations/meta/0038_snapshot.json +8293 -0
  83. package/migrations/meta/0039_snapshot.json +8308 -0
  84. package/migrations/meta/0041_snapshot.json +8287 -0
  85. package/migrations/meta/0042_snapshot.json +8274 -0
  86. package/migrations/meta/0043_snapshot.json +8521 -0
  87. package/migrations/meta/0044_snapshot.json +8814 -0
  88. package/migrations/meta/0045_snapshot.json +8797 -0
  89. package/migrations/meta/0046_snapshot.json +8804 -0
  90. package/migrations/meta/0047_snapshot.json +9018 -0
  91. package/migrations/meta/0048_snapshot.json +9145 -0
  92. package/migrations/meta/0049_snapshot.json +9190 -0
  93. package/migrations/meta/0050_snapshot.json +9126 -0
  94. package/migrations/meta/0051_snapshot.json +9132 -0
  95. package/migrations/meta/0052_snapshot.json +9148 -0
  96. package/migrations/meta/0053_snapshot.json +9268 -0
  97. package/migrations/meta/0054_snapshot.json +9378 -0
  98. package/migrations/meta/0056_snapshot.json +9447 -0
  99. package/migrations/meta/_journal.json +405 -0
  100. package/package.json +64 -0
  101. package/src/account-repos.ts +580 -0
  102. package/src/actor-builder.ts +130 -0
  103. package/src/admin-repo.ts +85 -0
  104. package/src/admin-session-repo.ts +205 -0
  105. package/src/admin-undo-repo.ts +128 -0
  106. package/src/announcement-repo.ts +176 -0
  107. package/src/antispam-repo.ts +145 -0
  108. package/src/api-repo.ts +276 -0
  109. package/src/attachment-admin-repo.ts +161 -0
  110. package/src/attachment-repo.ts +240 -0
  111. package/src/authorization-source.ts +138 -0
  112. package/src/avatar-repo.ts +185 -0
  113. package/src/ban-repos.ts +146 -0
  114. package/src/client.ts +85 -0
  115. package/src/content-admin-repo.ts +298 -0
  116. package/src/content-counters.ts +152 -0
  117. package/src/counter-recount.ts +263 -0
  118. package/src/cursor.ts +16 -0
  119. package/src/denormalised-username.ts +34 -0
  120. package/src/discovery-repo.ts +140 -0
  121. package/src/draft-repo.ts +59 -0
  122. package/src/feed-repo.ts +219 -0
  123. package/src/forum-admin-repo.ts +310 -0
  124. package/src/forum-repo.ts +206 -0
  125. package/src/group-admin-repo.ts +256 -0
  126. package/src/group-identity-repo.ts +84 -0
  127. package/src/identity-link-repo.ts +145 -0
  128. package/src/import-repo.ts +123 -0
  129. package/src/import-sink.ts +1377 -0
  130. package/src/index.ts +316 -0
  131. package/src/inline-moderation.ts +344 -0
  132. package/src/install-repo.ts +67 -0
  133. package/src/latest-repo.ts +115 -0
  134. package/src/maintenance-repo.ts +54 -0
  135. package/src/marketplace-repo.ts +111 -0
  136. package/src/member-profile-repo.ts +82 -0
  137. package/src/member-settings-repo.ts +160 -0
  138. package/src/message-repo.ts +384 -0
  139. package/src/migrate-run.ts +18 -0
  140. package/src/migrate.ts +129 -0
  141. package/src/modcp-repo.ts +253 -0
  142. package/src/moderation-queue.ts +279 -0
  143. package/src/navigation-repo.ts +288 -0
  144. package/src/notification-repo.ts +402 -0
  145. package/src/orphan-keys.ts +19 -0
  146. package/src/outbox-repo.ts +78 -0
  147. package/src/permission-version.ts +24 -0
  148. package/src/permissions-map.ts +52 -0
  149. package/src/pglite.fixture.ts +87 -0
  150. package/src/plugin-data.ts +88 -0
  151. package/src/plugin-grants.ts +369 -0
  152. package/src/plugin-health-repo.ts +80 -0
  153. package/src/plugin-purge-repo.ts +91 -0
  154. package/src/plugin-users.ts +39 -0
  155. package/src/poll-repo.ts +334 -0
  156. package/src/post-repo.ts +261 -0
  157. package/src/post-writes.ts +227 -0
  158. package/src/presence-repo.ts +220 -0
  159. package/src/profile-field-repo.ts +182 -0
  160. package/src/promotion-repo.ts +152 -0
  161. package/src/read-state-repo.ts +81 -0
  162. package/src/relation-repo.ts +113 -0
  163. package/src/render-backfill.ts +110 -0
  164. package/src/render-signature.ts +33 -0
  165. package/src/report-repo.ts +349 -0
  166. package/src/reputation-repo.ts +295 -0
  167. package/src/result-rows.ts +13 -0
  168. package/src/row-values.ts +7 -0
  169. package/src/schema/content.ts +451 -0
  170. package/src/schema/identity.ts +699 -0
  171. package/src/schema/index.ts +10 -0
  172. package/src/schema/messages.ts +76 -0
  173. package/src/schema/permission-columns.ts +34 -0
  174. package/src/schema/platform.ts +376 -0
  175. package/src/schema/structure.ts +164 -0
  176. package/src/search-repo.ts +359 -0
  177. package/src/search-store.ts +113 -0
  178. package/src/seed-groups.ts +11 -0
  179. package/src/settings-repo.ts +32 -0
  180. package/src/signature-repo.ts +102 -0
  181. package/src/sql-lists.ts +17 -0
  182. package/src/staff-groups.ts +50 -0
  183. package/src/stats-repo.ts +151 -0
  184. package/src/subscription-repo.ts +350 -0
  185. package/src/system-health-repo.ts +130 -0
  186. package/src/task-repo.ts +104 -0
  187. package/src/theme-admin-repo.ts +172 -0
  188. package/src/theme-repo.ts +43 -0
  189. package/src/thread-audience.ts +45 -0
  190. package/src/thread-counters.ts +107 -0
  191. package/src/thread-repo.ts +255 -0
  192. package/src/thread-surgery.ts +282 -0
  193. package/src/thread-tools.ts +311 -0
  194. package/src/thread-views.ts +41 -0
  195. package/src/thread-writes.ts +356 -0
  196. package/src/two-factor-repo.ts +235 -0
  197. package/src/upgrade-repo.ts +66 -0
  198. package/src/user-admin-repo.ts +367 -0
  199. package/src/user-bulk-repo.ts +397 -0
  200. package/src/user-merge-map.ts +111 -0
  201. package/src/user-merge-repo.ts +304 -0
  202. package/src/visibility-counters.ts +190 -0
  203. package/src/visibility.ts +17 -0
  204. package/src/vocabulary-repo.ts +54 -0
  205. package/src/warning-repo.ts +328 -0
@@ -0,0 +1,4412 @@
1
+ {
2
+ "id": "32c7c8a7-158d-40ba-a5e4-5d330abc51d5",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.ban_filters": {
8
+ "name": "ban_filters",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "integer",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "identity": {
17
+ "type": "byDefault",
18
+ "name": "ban_filters_id_seq",
19
+ "schema": "public",
20
+ "increment": "1",
21
+ "startWith": "1",
22
+ "minValue": "1",
23
+ "maxValue": "2147483647",
24
+ "cache": "1",
25
+ "cycle": false
26
+ }
27
+ },
28
+ "type": {
29
+ "name": "type",
30
+ "type": "text",
31
+ "primaryKey": false,
32
+ "notNull": true
33
+ },
34
+ "pattern": {
35
+ "name": "pattern",
36
+ "type": "text",
37
+ "primaryKey": false,
38
+ "notNull": true
39
+ },
40
+ "note": {
41
+ "name": "note",
42
+ "type": "text",
43
+ "primaryKey": false,
44
+ "notNull": false
45
+ },
46
+ "created_by_user_id": {
47
+ "name": "created_by_user_id",
48
+ "type": "integer",
49
+ "primaryKey": false,
50
+ "notNull": false
51
+ },
52
+ "created_at": {
53
+ "name": "created_at",
54
+ "type": "timestamp with time zone",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "default": "now()"
58
+ }
59
+ },
60
+ "indexes": {
61
+ "ban_filters_type_idx": {
62
+ "name": "ban_filters_type_idx",
63
+ "columns": [
64
+ {
65
+ "expression": "type",
66
+ "isExpression": false,
67
+ "asc": true,
68
+ "nulls": "last"
69
+ }
70
+ ],
71
+ "isUnique": false,
72
+ "concurrently": false,
73
+ "method": "btree",
74
+ "with": {}
75
+ },
76
+ "ban_filters_type_pattern_key": {
77
+ "name": "ban_filters_type_pattern_key",
78
+ "columns": [
79
+ {
80
+ "expression": "type",
81
+ "isExpression": false,
82
+ "asc": true,
83
+ "nulls": "last"
84
+ },
85
+ {
86
+ "expression": "pattern",
87
+ "isExpression": false,
88
+ "asc": true,
89
+ "nulls": "last"
90
+ }
91
+ ],
92
+ "isUnique": true,
93
+ "concurrently": false,
94
+ "method": "btree",
95
+ "with": {}
96
+ }
97
+ },
98
+ "foreignKeys": {
99
+ "ban_filters_created_by_user_id_users_id_fk": {
100
+ "name": "ban_filters_created_by_user_id_users_id_fk",
101
+ "tableFrom": "ban_filters",
102
+ "tableTo": "users",
103
+ "columnsFrom": ["created_by_user_id"],
104
+ "columnsTo": ["id"],
105
+ "onDelete": "set null",
106
+ "onUpdate": "no action"
107
+ }
108
+ },
109
+ "compositePrimaryKeys": {},
110
+ "uniqueConstraints": {},
111
+ "policies": {},
112
+ "checkConstraints": {},
113
+ "isRLSEnabled": false
114
+ },
115
+ "public.bans": {
116
+ "name": "bans",
117
+ "schema": "",
118
+ "columns": {
119
+ "id": {
120
+ "name": "id",
121
+ "type": "integer",
122
+ "primaryKey": true,
123
+ "notNull": true,
124
+ "identity": {
125
+ "type": "byDefault",
126
+ "name": "bans_id_seq",
127
+ "schema": "public",
128
+ "increment": "1",
129
+ "startWith": "1",
130
+ "minValue": "1",
131
+ "maxValue": "2147483647",
132
+ "cache": "1",
133
+ "cycle": false
134
+ }
135
+ },
136
+ "user_id": {
137
+ "name": "user_id",
138
+ "type": "integer",
139
+ "primaryKey": false,
140
+ "notNull": true
141
+ },
142
+ "banned_by_user_id": {
143
+ "name": "banned_by_user_id",
144
+ "type": "integer",
145
+ "primaryKey": false,
146
+ "notNull": false
147
+ },
148
+ "reason": {
149
+ "name": "reason",
150
+ "type": "text",
151
+ "primaryKey": false,
152
+ "notNull": false
153
+ },
154
+ "public_reason": {
155
+ "name": "public_reason",
156
+ "type": "text",
157
+ "primaryKey": false,
158
+ "notNull": false
159
+ },
160
+ "previous_primary_group_id": {
161
+ "name": "previous_primary_group_id",
162
+ "type": "integer",
163
+ "primaryKey": false,
164
+ "notNull": false
165
+ },
166
+ "expires_at": {
167
+ "name": "expires_at",
168
+ "type": "timestamp with time zone",
169
+ "primaryKey": false,
170
+ "notNull": false
171
+ },
172
+ "lifted_at": {
173
+ "name": "lifted_at",
174
+ "type": "timestamp with time zone",
175
+ "primaryKey": false,
176
+ "notNull": false
177
+ },
178
+ "created_at": {
179
+ "name": "created_at",
180
+ "type": "timestamp with time zone",
181
+ "primaryKey": false,
182
+ "notNull": true,
183
+ "default": "now()"
184
+ }
185
+ },
186
+ "indexes": {
187
+ "bans_active_user_key": {
188
+ "name": "bans_active_user_key",
189
+ "columns": [
190
+ {
191
+ "expression": "user_id",
192
+ "isExpression": false,
193
+ "asc": true,
194
+ "nulls": "last"
195
+ }
196
+ ],
197
+ "isUnique": true,
198
+ "where": "\"bans\".\"lifted_at\" is null",
199
+ "concurrently": false,
200
+ "method": "btree",
201
+ "with": {}
202
+ },
203
+ "bans_expires_idx": {
204
+ "name": "bans_expires_idx",
205
+ "columns": [
206
+ {
207
+ "expression": "expires_at",
208
+ "isExpression": false,
209
+ "asc": true,
210
+ "nulls": "last"
211
+ }
212
+ ],
213
+ "isUnique": false,
214
+ "where": "\"bans\".\"lifted_at\" is null",
215
+ "concurrently": false,
216
+ "method": "btree",
217
+ "with": {}
218
+ }
219
+ },
220
+ "foreignKeys": {
221
+ "bans_user_id_users_id_fk": {
222
+ "name": "bans_user_id_users_id_fk",
223
+ "tableFrom": "bans",
224
+ "tableTo": "users",
225
+ "columnsFrom": ["user_id"],
226
+ "columnsTo": ["id"],
227
+ "onDelete": "cascade",
228
+ "onUpdate": "no action"
229
+ },
230
+ "bans_banned_by_user_id_users_id_fk": {
231
+ "name": "bans_banned_by_user_id_users_id_fk",
232
+ "tableFrom": "bans",
233
+ "tableTo": "users",
234
+ "columnsFrom": ["banned_by_user_id"],
235
+ "columnsTo": ["id"],
236
+ "onDelete": "set null",
237
+ "onUpdate": "no action"
238
+ },
239
+ "bans_previous_primary_group_id_usergroups_id_fk": {
240
+ "name": "bans_previous_primary_group_id_usergroups_id_fk",
241
+ "tableFrom": "bans",
242
+ "tableTo": "usergroups",
243
+ "columnsFrom": ["previous_primary_group_id"],
244
+ "columnsTo": ["id"],
245
+ "onDelete": "set null",
246
+ "onUpdate": "no action"
247
+ }
248
+ },
249
+ "compositePrimaryKeys": {},
250
+ "uniqueConstraints": {},
251
+ "policies": {},
252
+ "checkConstraints": {},
253
+ "isRLSEnabled": false
254
+ },
255
+ "public.credential_tokens": {
256
+ "name": "credential_tokens",
257
+ "schema": "",
258
+ "columns": {
259
+ "id": {
260
+ "name": "id",
261
+ "type": "integer",
262
+ "primaryKey": true,
263
+ "notNull": true,
264
+ "identity": {
265
+ "type": "byDefault",
266
+ "name": "credential_tokens_id_seq",
267
+ "schema": "public",
268
+ "increment": "1",
269
+ "startWith": "1",
270
+ "minValue": "1",
271
+ "maxValue": "2147483647",
272
+ "cache": "1",
273
+ "cycle": false
274
+ }
275
+ },
276
+ "token_hash": {
277
+ "name": "token_hash",
278
+ "type": "text",
279
+ "primaryKey": false,
280
+ "notNull": true
281
+ },
282
+ "user_id": {
283
+ "name": "user_id",
284
+ "type": "integer",
285
+ "primaryKey": false,
286
+ "notNull": true
287
+ },
288
+ "purpose": {
289
+ "name": "purpose",
290
+ "type": "text",
291
+ "primaryKey": false,
292
+ "notNull": true
293
+ },
294
+ "payload": {
295
+ "name": "payload",
296
+ "type": "text",
297
+ "primaryKey": false,
298
+ "notNull": false
299
+ },
300
+ "consumed_at": {
301
+ "name": "consumed_at",
302
+ "type": "timestamp with time zone",
303
+ "primaryKey": false,
304
+ "notNull": false
305
+ },
306
+ "expires_at": {
307
+ "name": "expires_at",
308
+ "type": "timestamp with time zone",
309
+ "primaryKey": false,
310
+ "notNull": true
311
+ },
312
+ "created_at": {
313
+ "name": "created_at",
314
+ "type": "timestamp with time zone",
315
+ "primaryKey": false,
316
+ "notNull": true,
317
+ "default": "now()"
318
+ }
319
+ },
320
+ "indexes": {
321
+ "credential_tokens_hash_key": {
322
+ "name": "credential_tokens_hash_key",
323
+ "columns": [
324
+ {
325
+ "expression": "token_hash",
326
+ "isExpression": false,
327
+ "asc": true,
328
+ "nulls": "last"
329
+ }
330
+ ],
331
+ "isUnique": true,
332
+ "concurrently": false,
333
+ "method": "btree",
334
+ "with": {}
335
+ },
336
+ "credential_tokens_user_purpose_idx": {
337
+ "name": "credential_tokens_user_purpose_idx",
338
+ "columns": [
339
+ {
340
+ "expression": "user_id",
341
+ "isExpression": false,
342
+ "asc": true,
343
+ "nulls": "last"
344
+ },
345
+ {
346
+ "expression": "purpose",
347
+ "isExpression": false,
348
+ "asc": true,
349
+ "nulls": "last"
350
+ }
351
+ ],
352
+ "isUnique": false,
353
+ "concurrently": false,
354
+ "method": "btree",
355
+ "with": {}
356
+ },
357
+ "credential_tokens_expires_idx": {
358
+ "name": "credential_tokens_expires_idx",
359
+ "columns": [
360
+ {
361
+ "expression": "expires_at",
362
+ "isExpression": false,
363
+ "asc": true,
364
+ "nulls": "last"
365
+ }
366
+ ],
367
+ "isUnique": false,
368
+ "concurrently": false,
369
+ "method": "btree",
370
+ "with": {}
371
+ }
372
+ },
373
+ "foreignKeys": {
374
+ "credential_tokens_user_id_users_id_fk": {
375
+ "name": "credential_tokens_user_id_users_id_fk",
376
+ "tableFrom": "credential_tokens",
377
+ "tableTo": "users",
378
+ "columnsFrom": ["user_id"],
379
+ "columnsTo": ["id"],
380
+ "onDelete": "cascade",
381
+ "onUpdate": "no action"
382
+ }
383
+ },
384
+ "compositePrimaryKeys": {},
385
+ "uniqueConstraints": {},
386
+ "policies": {},
387
+ "checkConstraints": {},
388
+ "isRLSEnabled": false
389
+ },
390
+ "public.login_attempts": {
391
+ "name": "login_attempts",
392
+ "schema": "",
393
+ "columns": {
394
+ "id": {
395
+ "name": "id",
396
+ "type": "integer",
397
+ "primaryKey": true,
398
+ "notNull": true,
399
+ "identity": {
400
+ "type": "byDefault",
401
+ "name": "login_attempts_id_seq",
402
+ "schema": "public",
403
+ "increment": "1",
404
+ "startWith": "1",
405
+ "minValue": "1",
406
+ "maxValue": "2147483647",
407
+ "cache": "1",
408
+ "cycle": false
409
+ }
410
+ },
411
+ "bucket": {
412
+ "name": "bucket",
413
+ "type": "text",
414
+ "primaryKey": false,
415
+ "notNull": true
416
+ },
417
+ "succeeded": {
418
+ "name": "succeeded",
419
+ "type": "boolean",
420
+ "primaryKey": false,
421
+ "notNull": true
422
+ },
423
+ "occurred_at": {
424
+ "name": "occurred_at",
425
+ "type": "timestamp with time zone",
426
+ "primaryKey": false,
427
+ "notNull": true,
428
+ "default": "now()"
429
+ }
430
+ },
431
+ "indexes": {
432
+ "login_attempts_bucket_idx": {
433
+ "name": "login_attempts_bucket_idx",
434
+ "columns": [
435
+ {
436
+ "expression": "bucket",
437
+ "isExpression": false,
438
+ "asc": true,
439
+ "nulls": "last"
440
+ },
441
+ {
442
+ "expression": "occurred_at",
443
+ "isExpression": false,
444
+ "asc": true,
445
+ "nulls": "last"
446
+ }
447
+ ],
448
+ "isUnique": false,
449
+ "concurrently": false,
450
+ "method": "btree",
451
+ "with": {}
452
+ }
453
+ },
454
+ "foreignKeys": {},
455
+ "compositePrimaryKeys": {},
456
+ "uniqueConstraints": {},
457
+ "policies": {},
458
+ "checkConstraints": {},
459
+ "isRLSEnabled": false
460
+ },
461
+ "public.remember_tokens": {
462
+ "name": "remember_tokens",
463
+ "schema": "",
464
+ "columns": {
465
+ "id": {
466
+ "name": "id",
467
+ "type": "integer",
468
+ "primaryKey": true,
469
+ "notNull": true,
470
+ "identity": {
471
+ "type": "byDefault",
472
+ "name": "remember_tokens_id_seq",
473
+ "schema": "public",
474
+ "increment": "1",
475
+ "startWith": "1",
476
+ "minValue": "1",
477
+ "maxValue": "2147483647",
478
+ "cache": "1",
479
+ "cycle": false
480
+ }
481
+ },
482
+ "token_hash": {
483
+ "name": "token_hash",
484
+ "type": "text",
485
+ "primaryKey": false,
486
+ "notNull": true
487
+ },
488
+ "family_id": {
489
+ "name": "family_id",
490
+ "type": "text",
491
+ "primaryKey": false,
492
+ "notNull": true
493
+ },
494
+ "user_id": {
495
+ "name": "user_id",
496
+ "type": "integer",
497
+ "primaryKey": false,
498
+ "notNull": true
499
+ },
500
+ "used_at": {
501
+ "name": "used_at",
502
+ "type": "timestamp with time zone",
503
+ "primaryKey": false,
504
+ "notNull": false
505
+ },
506
+ "revoked_at": {
507
+ "name": "revoked_at",
508
+ "type": "timestamp with time zone",
509
+ "primaryKey": false,
510
+ "notNull": false
511
+ },
512
+ "revoked_reason": {
513
+ "name": "revoked_reason",
514
+ "type": "text",
515
+ "primaryKey": false,
516
+ "notNull": false
517
+ },
518
+ "expires_at": {
519
+ "name": "expires_at",
520
+ "type": "timestamp with time zone",
521
+ "primaryKey": false,
522
+ "notNull": true
523
+ },
524
+ "created_at": {
525
+ "name": "created_at",
526
+ "type": "timestamp with time zone",
527
+ "primaryKey": false,
528
+ "notNull": true,
529
+ "default": "now()"
530
+ }
531
+ },
532
+ "indexes": {
533
+ "remember_tokens_hash_key": {
534
+ "name": "remember_tokens_hash_key",
535
+ "columns": [
536
+ {
537
+ "expression": "token_hash",
538
+ "isExpression": false,
539
+ "asc": true,
540
+ "nulls": "last"
541
+ }
542
+ ],
543
+ "isUnique": true,
544
+ "concurrently": false,
545
+ "method": "btree",
546
+ "with": {}
547
+ },
548
+ "remember_tokens_family_idx": {
549
+ "name": "remember_tokens_family_idx",
550
+ "columns": [
551
+ {
552
+ "expression": "family_id",
553
+ "isExpression": false,
554
+ "asc": true,
555
+ "nulls": "last"
556
+ }
557
+ ],
558
+ "isUnique": false,
559
+ "concurrently": false,
560
+ "method": "btree",
561
+ "with": {}
562
+ },
563
+ "remember_tokens_user_idx": {
564
+ "name": "remember_tokens_user_idx",
565
+ "columns": [
566
+ {
567
+ "expression": "user_id",
568
+ "isExpression": false,
569
+ "asc": true,
570
+ "nulls": "last"
571
+ }
572
+ ],
573
+ "isUnique": false,
574
+ "concurrently": false,
575
+ "method": "btree",
576
+ "with": {}
577
+ },
578
+ "remember_tokens_expires_idx": {
579
+ "name": "remember_tokens_expires_idx",
580
+ "columns": [
581
+ {
582
+ "expression": "expires_at",
583
+ "isExpression": false,
584
+ "asc": true,
585
+ "nulls": "last"
586
+ }
587
+ ],
588
+ "isUnique": false,
589
+ "concurrently": false,
590
+ "method": "btree",
591
+ "with": {}
592
+ }
593
+ },
594
+ "foreignKeys": {
595
+ "remember_tokens_user_id_users_id_fk": {
596
+ "name": "remember_tokens_user_id_users_id_fk",
597
+ "tableFrom": "remember_tokens",
598
+ "tableTo": "users",
599
+ "columnsFrom": ["user_id"],
600
+ "columnsTo": ["id"],
601
+ "onDelete": "cascade",
602
+ "onUpdate": "no action"
603
+ }
604
+ },
605
+ "compositePrimaryKeys": {},
606
+ "uniqueConstraints": {},
607
+ "policies": {},
608
+ "checkConstraints": {},
609
+ "isRLSEnabled": false
610
+ },
611
+ "public.sessions": {
612
+ "name": "sessions",
613
+ "schema": "",
614
+ "columns": {
615
+ "id": {
616
+ "name": "id",
617
+ "type": "integer",
618
+ "primaryKey": true,
619
+ "notNull": true,
620
+ "identity": {
621
+ "type": "byDefault",
622
+ "name": "sessions_id_seq",
623
+ "schema": "public",
624
+ "increment": "1",
625
+ "startWith": "1",
626
+ "minValue": "1",
627
+ "maxValue": "2147483647",
628
+ "cache": "1",
629
+ "cycle": false
630
+ }
631
+ },
632
+ "token_hash": {
633
+ "name": "token_hash",
634
+ "type": "text",
635
+ "primaryKey": false,
636
+ "notNull": true
637
+ },
638
+ "user_id": {
639
+ "name": "user_id",
640
+ "type": "integer",
641
+ "primaryKey": false,
642
+ "notNull": false
643
+ },
644
+ "location_path": {
645
+ "name": "location_path",
646
+ "type": "text",
647
+ "primaryKey": false,
648
+ "notNull": false
649
+ },
650
+ "location_forum_id": {
651
+ "name": "location_forum_id",
652
+ "type": "integer",
653
+ "primaryKey": false,
654
+ "notNull": false
655
+ },
656
+ "location_thread_id": {
657
+ "name": "location_thread_id",
658
+ "type": "integer",
659
+ "primaryKey": false,
660
+ "notNull": false
661
+ },
662
+ "ip_prefix": {
663
+ "name": "ip_prefix",
664
+ "type": "text",
665
+ "primaryKey": false,
666
+ "notNull": false
667
+ },
668
+ "user_agent": {
669
+ "name": "user_agent",
670
+ "type": "text",
671
+ "primaryKey": false,
672
+ "notNull": false
673
+ },
674
+ "superseded_by_session_id": {
675
+ "name": "superseded_by_session_id",
676
+ "type": "integer",
677
+ "primaryKey": false,
678
+ "notNull": false
679
+ },
680
+ "last_seen_at": {
681
+ "name": "last_seen_at",
682
+ "type": "timestamp with time zone",
683
+ "primaryKey": false,
684
+ "notNull": true,
685
+ "default": "now()"
686
+ },
687
+ "expires_at": {
688
+ "name": "expires_at",
689
+ "type": "timestamp with time zone",
690
+ "primaryKey": false,
691
+ "notNull": true
692
+ },
693
+ "revoked_at": {
694
+ "name": "revoked_at",
695
+ "type": "timestamp with time zone",
696
+ "primaryKey": false,
697
+ "notNull": false
698
+ },
699
+ "created_at": {
700
+ "name": "created_at",
701
+ "type": "timestamp with time zone",
702
+ "primaryKey": false,
703
+ "notNull": true,
704
+ "default": "now()"
705
+ }
706
+ },
707
+ "indexes": {
708
+ "sessions_token_hash_key": {
709
+ "name": "sessions_token_hash_key",
710
+ "columns": [
711
+ {
712
+ "expression": "token_hash",
713
+ "isExpression": false,
714
+ "asc": true,
715
+ "nulls": "last"
716
+ }
717
+ ],
718
+ "isUnique": true,
719
+ "concurrently": false,
720
+ "method": "btree",
721
+ "with": {}
722
+ },
723
+ "sessions_last_seen_idx": {
724
+ "name": "sessions_last_seen_idx",
725
+ "columns": [
726
+ {
727
+ "expression": "last_seen_at",
728
+ "isExpression": false,
729
+ "asc": true,
730
+ "nulls": "last"
731
+ }
732
+ ],
733
+ "isUnique": false,
734
+ "concurrently": false,
735
+ "method": "btree",
736
+ "with": {}
737
+ },
738
+ "sessions_user_idx": {
739
+ "name": "sessions_user_idx",
740
+ "columns": [
741
+ {
742
+ "expression": "user_id",
743
+ "isExpression": false,
744
+ "asc": true,
745
+ "nulls": "last"
746
+ }
747
+ ],
748
+ "isUnique": false,
749
+ "concurrently": false,
750
+ "method": "btree",
751
+ "with": {}
752
+ },
753
+ "sessions_expires_idx": {
754
+ "name": "sessions_expires_idx",
755
+ "columns": [
756
+ {
757
+ "expression": "expires_at",
758
+ "isExpression": false,
759
+ "asc": true,
760
+ "nulls": "last"
761
+ }
762
+ ],
763
+ "isUnique": false,
764
+ "concurrently": false,
765
+ "method": "btree",
766
+ "with": {}
767
+ }
768
+ },
769
+ "foreignKeys": {
770
+ "sessions_user_id_users_id_fk": {
771
+ "name": "sessions_user_id_users_id_fk",
772
+ "tableFrom": "sessions",
773
+ "tableTo": "users",
774
+ "columnsFrom": ["user_id"],
775
+ "columnsTo": ["id"],
776
+ "onDelete": "cascade",
777
+ "onUpdate": "no action"
778
+ }
779
+ },
780
+ "compositePrimaryKeys": {},
781
+ "uniqueConstraints": {},
782
+ "policies": {},
783
+ "checkConstraints": {},
784
+ "isRLSEnabled": false
785
+ },
786
+ "public.user_group_memberships": {
787
+ "name": "user_group_memberships",
788
+ "schema": "",
789
+ "columns": {
790
+ "user_id": {
791
+ "name": "user_id",
792
+ "type": "integer",
793
+ "primaryKey": false,
794
+ "notNull": true
795
+ },
796
+ "group_id": {
797
+ "name": "group_id",
798
+ "type": "integer",
799
+ "primaryKey": false,
800
+ "notNull": true
801
+ },
802
+ "is_display_group": {
803
+ "name": "is_display_group",
804
+ "type": "boolean",
805
+ "primaryKey": false,
806
+ "notNull": true,
807
+ "default": false
808
+ },
809
+ "granted_by_user_id": {
810
+ "name": "granted_by_user_id",
811
+ "type": "integer",
812
+ "primaryKey": false,
813
+ "notNull": false
814
+ },
815
+ "granted_at": {
816
+ "name": "granted_at",
817
+ "type": "timestamp with time zone",
818
+ "primaryKey": false,
819
+ "notNull": true,
820
+ "default": "now()"
821
+ }
822
+ },
823
+ "indexes": {
824
+ "user_group_memberships_pkey": {
825
+ "name": "user_group_memberships_pkey",
826
+ "columns": [
827
+ {
828
+ "expression": "user_id",
829
+ "isExpression": false,
830
+ "asc": true,
831
+ "nulls": "last"
832
+ },
833
+ {
834
+ "expression": "group_id",
835
+ "isExpression": false,
836
+ "asc": true,
837
+ "nulls": "last"
838
+ }
839
+ ],
840
+ "isUnique": true,
841
+ "concurrently": false,
842
+ "method": "btree",
843
+ "with": {}
844
+ },
845
+ "user_group_memberships_user_idx": {
846
+ "name": "user_group_memberships_user_idx",
847
+ "columns": [
848
+ {
849
+ "expression": "user_id",
850
+ "isExpression": false,
851
+ "asc": true,
852
+ "nulls": "last"
853
+ }
854
+ ],
855
+ "isUnique": false,
856
+ "concurrently": false,
857
+ "method": "btree",
858
+ "with": {}
859
+ },
860
+ "user_group_memberships_group_idx": {
861
+ "name": "user_group_memberships_group_idx",
862
+ "columns": [
863
+ {
864
+ "expression": "group_id",
865
+ "isExpression": false,
866
+ "asc": true,
867
+ "nulls": "last"
868
+ }
869
+ ],
870
+ "isUnique": false,
871
+ "concurrently": false,
872
+ "method": "btree",
873
+ "with": {}
874
+ }
875
+ },
876
+ "foreignKeys": {
877
+ "user_group_memberships_user_id_users_id_fk": {
878
+ "name": "user_group_memberships_user_id_users_id_fk",
879
+ "tableFrom": "user_group_memberships",
880
+ "tableTo": "users",
881
+ "columnsFrom": ["user_id"],
882
+ "columnsTo": ["id"],
883
+ "onDelete": "cascade",
884
+ "onUpdate": "no action"
885
+ },
886
+ "user_group_memberships_group_id_usergroups_id_fk": {
887
+ "name": "user_group_memberships_group_id_usergroups_id_fk",
888
+ "tableFrom": "user_group_memberships",
889
+ "tableTo": "usergroups",
890
+ "columnsFrom": ["group_id"],
891
+ "columnsTo": ["id"],
892
+ "onDelete": "cascade",
893
+ "onUpdate": "no action"
894
+ },
895
+ "user_group_memberships_granted_by_user_id_users_id_fk": {
896
+ "name": "user_group_memberships_granted_by_user_id_users_id_fk",
897
+ "tableFrom": "user_group_memberships",
898
+ "tableTo": "users",
899
+ "columnsFrom": ["granted_by_user_id"],
900
+ "columnsTo": ["id"],
901
+ "onDelete": "set null",
902
+ "onUpdate": "no action"
903
+ }
904
+ },
905
+ "compositePrimaryKeys": {},
906
+ "uniqueConstraints": {},
907
+ "policies": {},
908
+ "checkConstraints": {},
909
+ "isRLSEnabled": false
910
+ },
911
+ "public.usergroups": {
912
+ "name": "usergroups",
913
+ "schema": "",
914
+ "columns": {
915
+ "id": {
916
+ "name": "id",
917
+ "type": "integer",
918
+ "primaryKey": true,
919
+ "notNull": true,
920
+ "identity": {
921
+ "type": "byDefault",
922
+ "name": "usergroups_id_seq",
923
+ "schema": "public",
924
+ "increment": "1",
925
+ "startWith": "1",
926
+ "minValue": "1",
927
+ "maxValue": "2147483647",
928
+ "cache": "1",
929
+ "cycle": false
930
+ }
931
+ },
932
+ "key": {
933
+ "name": "key",
934
+ "type": "text",
935
+ "primaryKey": false,
936
+ "notNull": true
937
+ },
938
+ "title": {
939
+ "name": "title",
940
+ "type": "text",
941
+ "primaryKey": false,
942
+ "notNull": true
943
+ },
944
+ "description": {
945
+ "name": "description",
946
+ "type": "text",
947
+ "primaryKey": false,
948
+ "notNull": false
949
+ },
950
+ "badge_token": {
951
+ "name": "badge_token",
952
+ "type": "text",
953
+ "primaryKey": false,
954
+ "notNull": false
955
+ },
956
+ "display_order": {
957
+ "name": "display_order",
958
+ "type": "integer",
959
+ "primaryKey": false,
960
+ "notNull": true,
961
+ "default": 0
962
+ },
963
+ "is_system": {
964
+ "name": "is_system",
965
+ "type": "boolean",
966
+ "primaryKey": false,
967
+ "notNull": true,
968
+ "default": false
969
+ },
970
+ "is_staff_group": {
971
+ "name": "is_staff_group",
972
+ "type": "boolean",
973
+ "primaryKey": false,
974
+ "notNull": true,
975
+ "default": false
976
+ },
977
+ "can_view": {
978
+ "name": "can_view",
979
+ "type": "boolean",
980
+ "primaryKey": false,
981
+ "notNull": true,
982
+ "default": false
983
+ },
984
+ "can_view_threads": {
985
+ "name": "can_view_threads",
986
+ "type": "boolean",
987
+ "primaryKey": false,
988
+ "notNull": true,
989
+ "default": false
990
+ },
991
+ "can_view_others_threads": {
992
+ "name": "can_view_others_threads",
993
+ "type": "boolean",
994
+ "primaryKey": false,
995
+ "notNull": true,
996
+ "default": false
997
+ },
998
+ "can_search": {
999
+ "name": "can_search",
1000
+ "type": "boolean",
1001
+ "primaryKey": false,
1002
+ "notNull": true,
1003
+ "default": false
1004
+ },
1005
+ "can_post_threads": {
1006
+ "name": "can_post_threads",
1007
+ "type": "boolean",
1008
+ "primaryKey": false,
1009
+ "notNull": true,
1010
+ "default": false
1011
+ },
1012
+ "can_post_replies": {
1013
+ "name": "can_post_replies",
1014
+ "type": "boolean",
1015
+ "primaryKey": false,
1016
+ "notNull": true,
1017
+ "default": false
1018
+ },
1019
+ "can_post_polls": {
1020
+ "name": "can_post_polls",
1021
+ "type": "boolean",
1022
+ "primaryKey": false,
1023
+ "notNull": true,
1024
+ "default": false
1025
+ },
1026
+ "can_vote_polls": {
1027
+ "name": "can_vote_polls",
1028
+ "type": "boolean",
1029
+ "primaryKey": false,
1030
+ "notNull": true,
1031
+ "default": false
1032
+ },
1033
+ "can_rate_threads": {
1034
+ "name": "can_rate_threads",
1035
+ "type": "boolean",
1036
+ "primaryKey": false,
1037
+ "notNull": true,
1038
+ "default": false
1039
+ },
1040
+ "can_edit_own_posts": {
1041
+ "name": "can_edit_own_posts",
1042
+ "type": "boolean",
1043
+ "primaryKey": false,
1044
+ "notNull": true,
1045
+ "default": false
1046
+ },
1047
+ "can_delete_own_posts": {
1048
+ "name": "can_delete_own_posts",
1049
+ "type": "boolean",
1050
+ "primaryKey": false,
1051
+ "notNull": true,
1052
+ "default": false
1053
+ },
1054
+ "can_delete_own_threads": {
1055
+ "name": "can_delete_own_threads",
1056
+ "type": "boolean",
1057
+ "primaryKey": false,
1058
+ "notNull": true,
1059
+ "default": false
1060
+ },
1061
+ "can_edit_others_posts": {
1062
+ "name": "can_edit_others_posts",
1063
+ "type": "boolean",
1064
+ "primaryKey": false,
1065
+ "notNull": true,
1066
+ "default": false
1067
+ },
1068
+ "can_delete_others_posts": {
1069
+ "name": "can_delete_others_posts",
1070
+ "type": "boolean",
1071
+ "primaryKey": false,
1072
+ "notNull": true,
1073
+ "default": false
1074
+ },
1075
+ "can_soft_delete_posts": {
1076
+ "name": "can_soft_delete_posts",
1077
+ "type": "boolean",
1078
+ "primaryKey": false,
1079
+ "notNull": true,
1080
+ "default": false
1081
+ },
1082
+ "can_view_unapproved": {
1083
+ "name": "can_view_unapproved",
1084
+ "type": "boolean",
1085
+ "primaryKey": false,
1086
+ "notNull": true,
1087
+ "default": false
1088
+ },
1089
+ "can_view_deleted": {
1090
+ "name": "can_view_deleted",
1091
+ "type": "boolean",
1092
+ "primaryKey": false,
1093
+ "notNull": true,
1094
+ "default": false
1095
+ },
1096
+ "can_approve_content": {
1097
+ "name": "can_approve_content",
1098
+ "type": "boolean",
1099
+ "primaryKey": false,
1100
+ "notNull": true,
1101
+ "default": false
1102
+ },
1103
+ "can_upload_attachments": {
1104
+ "name": "can_upload_attachments",
1105
+ "type": "boolean",
1106
+ "primaryKey": false,
1107
+ "notNull": true,
1108
+ "default": false
1109
+ },
1110
+ "can_download_attachments": {
1111
+ "name": "can_download_attachments",
1112
+ "type": "boolean",
1113
+ "primaryKey": false,
1114
+ "notNull": true,
1115
+ "default": false
1116
+ },
1117
+ "can_subscribe": {
1118
+ "name": "can_subscribe",
1119
+ "type": "boolean",
1120
+ "primaryKey": false,
1121
+ "notNull": true,
1122
+ "default": false
1123
+ },
1124
+ "can_view_profiles": {
1125
+ "name": "can_view_profiles",
1126
+ "type": "boolean",
1127
+ "primaryKey": false,
1128
+ "notNull": true,
1129
+ "default": false
1130
+ },
1131
+ "can_view_member_list": {
1132
+ "name": "can_view_member_list",
1133
+ "type": "boolean",
1134
+ "primaryKey": false,
1135
+ "notNull": true,
1136
+ "default": false
1137
+ },
1138
+ "can_use_private_messages": {
1139
+ "name": "can_use_private_messages",
1140
+ "type": "boolean",
1141
+ "primaryKey": false,
1142
+ "notNull": true,
1143
+ "default": false
1144
+ },
1145
+ "can_use_signature": {
1146
+ "name": "can_use_signature",
1147
+ "type": "boolean",
1148
+ "primaryKey": false,
1149
+ "notNull": true,
1150
+ "default": false
1151
+ },
1152
+ "can_upload_avatar": {
1153
+ "name": "can_upload_avatar",
1154
+ "type": "boolean",
1155
+ "primaryKey": false,
1156
+ "notNull": true,
1157
+ "default": false
1158
+ },
1159
+ "can_report_content": {
1160
+ "name": "can_report_content",
1161
+ "type": "boolean",
1162
+ "primaryKey": false,
1163
+ "notNull": true,
1164
+ "default": false
1165
+ },
1166
+ "can_view_board_offline": {
1167
+ "name": "can_view_board_offline",
1168
+ "type": "boolean",
1169
+ "primaryKey": false,
1170
+ "notNull": true,
1171
+ "default": false
1172
+ },
1173
+ "can_bypass_flood_check": {
1174
+ "name": "can_bypass_flood_check",
1175
+ "type": "boolean",
1176
+ "primaryKey": false,
1177
+ "notNull": true,
1178
+ "default": false
1179
+ },
1180
+ "can_access_mod_cp": {
1181
+ "name": "can_access_mod_cp",
1182
+ "type": "boolean",
1183
+ "primaryKey": false,
1184
+ "notNull": true,
1185
+ "default": false
1186
+ },
1187
+ "is_super_moderator": {
1188
+ "name": "is_super_moderator",
1189
+ "type": "boolean",
1190
+ "primaryKey": false,
1191
+ "notNull": true,
1192
+ "default": false
1193
+ },
1194
+ "is_administrator": {
1195
+ "name": "is_administrator",
1196
+ "type": "boolean",
1197
+ "primaryKey": false,
1198
+ "notNull": true,
1199
+ "default": false
1200
+ },
1201
+ "can_access_admin_cp": {
1202
+ "name": "can_access_admin_cp",
1203
+ "type": "boolean",
1204
+ "primaryKey": false,
1205
+ "notNull": true,
1206
+ "default": false
1207
+ },
1208
+ "max_posts_per_day": {
1209
+ "name": "max_posts_per_day",
1210
+ "type": "integer",
1211
+ "primaryKey": false,
1212
+ "notNull": true,
1213
+ "default": 0
1214
+ },
1215
+ "edit_time_limit_minutes": {
1216
+ "name": "edit_time_limit_minutes",
1217
+ "type": "integer",
1218
+ "primaryKey": false,
1219
+ "notNull": true,
1220
+ "default": 0
1221
+ },
1222
+ "max_attachments_per_post": {
1223
+ "name": "max_attachments_per_post",
1224
+ "type": "integer",
1225
+ "primaryKey": false,
1226
+ "notNull": true,
1227
+ "default": 0
1228
+ },
1229
+ "max_attachment_size_kb": {
1230
+ "name": "max_attachment_size_kb",
1231
+ "type": "integer",
1232
+ "primaryKey": false,
1233
+ "notNull": true,
1234
+ "default": 0
1235
+ },
1236
+ "max_private_messages_per_day": {
1237
+ "name": "max_private_messages_per_day",
1238
+ "type": "integer",
1239
+ "primaryKey": false,
1240
+ "notNull": true,
1241
+ "default": 0
1242
+ },
1243
+ "max_signature_length": {
1244
+ "name": "max_signature_length",
1245
+ "type": "integer",
1246
+ "primaryKey": false,
1247
+ "notNull": true,
1248
+ "default": 0
1249
+ },
1250
+ "requires_thread_approval": {
1251
+ "name": "requires_thread_approval",
1252
+ "type": "boolean",
1253
+ "primaryKey": false,
1254
+ "notNull": true,
1255
+ "default": true
1256
+ },
1257
+ "requires_post_approval": {
1258
+ "name": "requires_post_approval",
1259
+ "type": "boolean",
1260
+ "primaryKey": false,
1261
+ "notNull": true,
1262
+ "default": true
1263
+ },
1264
+ "requires_approval_on_edit": {
1265
+ "name": "requires_approval_on_edit",
1266
+ "type": "boolean",
1267
+ "primaryKey": false,
1268
+ "notNull": true,
1269
+ "default": true
1270
+ },
1271
+ "created_at": {
1272
+ "name": "created_at",
1273
+ "type": "timestamp with time zone",
1274
+ "primaryKey": false,
1275
+ "notNull": true,
1276
+ "default": "now()"
1277
+ },
1278
+ "updated_at": {
1279
+ "name": "updated_at",
1280
+ "type": "timestamp with time zone",
1281
+ "primaryKey": false,
1282
+ "notNull": true,
1283
+ "default": "now()"
1284
+ }
1285
+ },
1286
+ "indexes": {
1287
+ "usergroups_key_key": {
1288
+ "name": "usergroups_key_key",
1289
+ "columns": [
1290
+ {
1291
+ "expression": "key",
1292
+ "isExpression": false,
1293
+ "asc": true,
1294
+ "nulls": "last"
1295
+ }
1296
+ ],
1297
+ "isUnique": true,
1298
+ "concurrently": false,
1299
+ "method": "btree",
1300
+ "with": {}
1301
+ },
1302
+ "usergroups_display_order_idx": {
1303
+ "name": "usergroups_display_order_idx",
1304
+ "columns": [
1305
+ {
1306
+ "expression": "display_order",
1307
+ "isExpression": false,
1308
+ "asc": true,
1309
+ "nulls": "last"
1310
+ }
1311
+ ],
1312
+ "isUnique": false,
1313
+ "concurrently": false,
1314
+ "method": "btree",
1315
+ "with": {}
1316
+ }
1317
+ },
1318
+ "foreignKeys": {},
1319
+ "compositePrimaryKeys": {},
1320
+ "uniqueConstraints": {},
1321
+ "policies": {},
1322
+ "checkConstraints": {},
1323
+ "isRLSEnabled": false
1324
+ },
1325
+ "public.users": {
1326
+ "name": "users",
1327
+ "schema": "",
1328
+ "columns": {
1329
+ "id": {
1330
+ "name": "id",
1331
+ "type": "integer",
1332
+ "primaryKey": true,
1333
+ "notNull": true,
1334
+ "identity": {
1335
+ "type": "byDefault",
1336
+ "name": "users_id_seq",
1337
+ "schema": "public",
1338
+ "increment": "1",
1339
+ "startWith": "1",
1340
+ "minValue": "1",
1341
+ "maxValue": "2147483647",
1342
+ "cache": "1",
1343
+ "cycle": false
1344
+ }
1345
+ },
1346
+ "username": {
1347
+ "name": "username",
1348
+ "type": "text",
1349
+ "primaryKey": false,
1350
+ "notNull": true
1351
+ },
1352
+ "username_lower": {
1353
+ "name": "username_lower",
1354
+ "type": "text",
1355
+ "primaryKey": false,
1356
+ "notNull": true
1357
+ },
1358
+ "email": {
1359
+ "name": "email",
1360
+ "type": "text",
1361
+ "primaryKey": false,
1362
+ "notNull": true
1363
+ },
1364
+ "email_lower": {
1365
+ "name": "email_lower",
1366
+ "type": "text",
1367
+ "primaryKey": false,
1368
+ "notNull": true
1369
+ },
1370
+ "password_hash": {
1371
+ "name": "password_hash",
1372
+ "type": "text",
1373
+ "primaryKey": false,
1374
+ "notNull": false
1375
+ },
1376
+ "password_algo": {
1377
+ "name": "password_algo",
1378
+ "type": "text",
1379
+ "primaryKey": false,
1380
+ "notNull": false
1381
+ },
1382
+ "password_changed_at": {
1383
+ "name": "password_changed_at",
1384
+ "type": "timestamp with time zone",
1385
+ "primaryKey": false,
1386
+ "notNull": false
1387
+ },
1388
+ "primary_group_id": {
1389
+ "name": "primary_group_id",
1390
+ "type": "integer",
1391
+ "primaryKey": false,
1392
+ "notNull": true
1393
+ },
1394
+ "display_group_id": {
1395
+ "name": "display_group_id",
1396
+ "type": "integer",
1397
+ "primaryKey": false,
1398
+ "notNull": false
1399
+ },
1400
+ "state": {
1401
+ "name": "state",
1402
+ "type": "text",
1403
+ "primaryKey": false,
1404
+ "notNull": true,
1405
+ "default": "'active'"
1406
+ },
1407
+ "post_count": {
1408
+ "name": "post_count",
1409
+ "type": "integer",
1410
+ "primaryKey": false,
1411
+ "notNull": true,
1412
+ "default": 0
1413
+ },
1414
+ "thread_count": {
1415
+ "name": "thread_count",
1416
+ "type": "integer",
1417
+ "primaryKey": false,
1418
+ "notNull": true,
1419
+ "default": 0
1420
+ },
1421
+ "reputation": {
1422
+ "name": "reputation",
1423
+ "type": "integer",
1424
+ "primaryKey": false,
1425
+ "notNull": true,
1426
+ "default": 0
1427
+ },
1428
+ "warning_points": {
1429
+ "name": "warning_points",
1430
+ "type": "smallint",
1431
+ "primaryKey": false,
1432
+ "notNull": true,
1433
+ "default": 0
1434
+ },
1435
+ "registration_ip_prefix": {
1436
+ "name": "registration_ip_prefix",
1437
+ "type": "text",
1438
+ "primaryKey": false,
1439
+ "notNull": false
1440
+ },
1441
+ "last_ip_prefix": {
1442
+ "name": "last_ip_prefix",
1443
+ "type": "text",
1444
+ "primaryKey": false,
1445
+ "notNull": false
1446
+ },
1447
+ "last_active_at": {
1448
+ "name": "last_active_at",
1449
+ "type": "timestamp with time zone",
1450
+ "primaryKey": false,
1451
+ "notNull": false
1452
+ },
1453
+ "email_verified_at": {
1454
+ "name": "email_verified_at",
1455
+ "type": "timestamp with time zone",
1456
+ "primaryKey": false,
1457
+ "notNull": false
1458
+ },
1459
+ "deleted_at": {
1460
+ "name": "deleted_at",
1461
+ "type": "timestamp with time zone",
1462
+ "primaryKey": false,
1463
+ "notNull": false
1464
+ },
1465
+ "legacy_mybb_uid": {
1466
+ "name": "legacy_mybb_uid",
1467
+ "type": "integer",
1468
+ "primaryKey": false,
1469
+ "notNull": false
1470
+ },
1471
+ "created_at": {
1472
+ "name": "created_at",
1473
+ "type": "timestamp with time zone",
1474
+ "primaryKey": false,
1475
+ "notNull": true,
1476
+ "default": "now()"
1477
+ },
1478
+ "updated_at": {
1479
+ "name": "updated_at",
1480
+ "type": "timestamp with time zone",
1481
+ "primaryKey": false,
1482
+ "notNull": true,
1483
+ "default": "now()"
1484
+ }
1485
+ },
1486
+ "indexes": {
1487
+ "users_username_lower_key": {
1488
+ "name": "users_username_lower_key",
1489
+ "columns": [
1490
+ {
1491
+ "expression": "username_lower",
1492
+ "isExpression": false,
1493
+ "asc": true,
1494
+ "nulls": "last"
1495
+ }
1496
+ ],
1497
+ "isUnique": true,
1498
+ "concurrently": false,
1499
+ "method": "btree",
1500
+ "with": {}
1501
+ },
1502
+ "users_email_lower_key": {
1503
+ "name": "users_email_lower_key",
1504
+ "columns": [
1505
+ {
1506
+ "expression": "email_lower",
1507
+ "isExpression": false,
1508
+ "asc": true,
1509
+ "nulls": "last"
1510
+ }
1511
+ ],
1512
+ "isUnique": true,
1513
+ "concurrently": false,
1514
+ "method": "btree",
1515
+ "with": {}
1516
+ },
1517
+ "users_legacy_mybb_uid_key": {
1518
+ "name": "users_legacy_mybb_uid_key",
1519
+ "columns": [
1520
+ {
1521
+ "expression": "legacy_mybb_uid",
1522
+ "isExpression": false,
1523
+ "asc": true,
1524
+ "nulls": "last"
1525
+ }
1526
+ ],
1527
+ "isUnique": true,
1528
+ "where": "\"users\".\"legacy_mybb_uid\" is not null",
1529
+ "concurrently": false,
1530
+ "method": "btree",
1531
+ "with": {}
1532
+ },
1533
+ "users_primary_group_idx": {
1534
+ "name": "users_primary_group_idx",
1535
+ "columns": [
1536
+ {
1537
+ "expression": "primary_group_id",
1538
+ "isExpression": false,
1539
+ "asc": true,
1540
+ "nulls": "last"
1541
+ }
1542
+ ],
1543
+ "isUnique": false,
1544
+ "concurrently": false,
1545
+ "method": "btree",
1546
+ "with": {}
1547
+ },
1548
+ "users_active_created_idx": {
1549
+ "name": "users_active_created_idx",
1550
+ "columns": [
1551
+ {
1552
+ "expression": "created_at",
1553
+ "isExpression": false,
1554
+ "asc": true,
1555
+ "nulls": "last"
1556
+ }
1557
+ ],
1558
+ "isUnique": false,
1559
+ "where": "\"users\".\"state\" = 'active'",
1560
+ "concurrently": false,
1561
+ "method": "btree",
1562
+ "with": {}
1563
+ },
1564
+ "users_last_active_idx": {
1565
+ "name": "users_last_active_idx",
1566
+ "columns": [
1567
+ {
1568
+ "expression": "last_active_at",
1569
+ "isExpression": false,
1570
+ "asc": true,
1571
+ "nulls": "last"
1572
+ }
1573
+ ],
1574
+ "isUnique": false,
1575
+ "concurrently": false,
1576
+ "method": "btree",
1577
+ "with": {}
1578
+ }
1579
+ },
1580
+ "foreignKeys": {
1581
+ "users_primary_group_id_usergroups_id_fk": {
1582
+ "name": "users_primary_group_id_usergroups_id_fk",
1583
+ "tableFrom": "users",
1584
+ "tableTo": "usergroups",
1585
+ "columnsFrom": ["primary_group_id"],
1586
+ "columnsTo": ["id"],
1587
+ "onDelete": "restrict",
1588
+ "onUpdate": "no action"
1589
+ },
1590
+ "users_display_group_id_usergroups_id_fk": {
1591
+ "name": "users_display_group_id_usergroups_id_fk",
1592
+ "tableFrom": "users",
1593
+ "tableTo": "usergroups",
1594
+ "columnsFrom": ["display_group_id"],
1595
+ "columnsTo": ["id"],
1596
+ "onDelete": "set null",
1597
+ "onUpdate": "no action"
1598
+ }
1599
+ },
1600
+ "compositePrimaryKeys": {},
1601
+ "uniqueConstraints": {},
1602
+ "policies": {},
1603
+ "checkConstraints": {},
1604
+ "isRLSEnabled": false
1605
+ },
1606
+ "public.forum_moderators": {
1607
+ "name": "forum_moderators",
1608
+ "schema": "",
1609
+ "columns": {
1610
+ "id": {
1611
+ "name": "id",
1612
+ "type": "integer",
1613
+ "primaryKey": true,
1614
+ "notNull": true,
1615
+ "identity": {
1616
+ "type": "byDefault",
1617
+ "name": "forum_moderators_id_seq",
1618
+ "schema": "public",
1619
+ "increment": "1",
1620
+ "startWith": "1",
1621
+ "minValue": "1",
1622
+ "maxValue": "2147483647",
1623
+ "cache": "1",
1624
+ "cycle": false
1625
+ }
1626
+ },
1627
+ "forum_id": {
1628
+ "name": "forum_id",
1629
+ "type": "integer",
1630
+ "primaryKey": false,
1631
+ "notNull": true
1632
+ },
1633
+ "user_id": {
1634
+ "name": "user_id",
1635
+ "type": "integer",
1636
+ "primaryKey": false,
1637
+ "notNull": false
1638
+ },
1639
+ "group_id": {
1640
+ "name": "group_id",
1641
+ "type": "integer",
1642
+ "primaryKey": false,
1643
+ "notNull": false
1644
+ },
1645
+ "cascade_to_subforums": {
1646
+ "name": "cascade_to_subforums",
1647
+ "type": "boolean",
1648
+ "primaryKey": false,
1649
+ "notNull": true,
1650
+ "default": false
1651
+ },
1652
+ "can_edit_posts": {
1653
+ "name": "can_edit_posts",
1654
+ "type": "boolean",
1655
+ "primaryKey": false,
1656
+ "notNull": true,
1657
+ "default": false
1658
+ },
1659
+ "can_soft_delete_posts": {
1660
+ "name": "can_soft_delete_posts",
1661
+ "type": "boolean",
1662
+ "primaryKey": false,
1663
+ "notNull": true,
1664
+ "default": false
1665
+ },
1666
+ "can_restore_posts": {
1667
+ "name": "can_restore_posts",
1668
+ "type": "boolean",
1669
+ "primaryKey": false,
1670
+ "notNull": true,
1671
+ "default": false
1672
+ },
1673
+ "can_hard_delete_posts": {
1674
+ "name": "can_hard_delete_posts",
1675
+ "type": "boolean",
1676
+ "primaryKey": false,
1677
+ "notNull": true,
1678
+ "default": false
1679
+ },
1680
+ "can_approve_content": {
1681
+ "name": "can_approve_content",
1682
+ "type": "boolean",
1683
+ "primaryKey": false,
1684
+ "notNull": true,
1685
+ "default": false
1686
+ },
1687
+ "can_open_close_threads": {
1688
+ "name": "can_open_close_threads",
1689
+ "type": "boolean",
1690
+ "primaryKey": false,
1691
+ "notNull": true,
1692
+ "default": false
1693
+ },
1694
+ "can_stick_threads": {
1695
+ "name": "can_stick_threads",
1696
+ "type": "boolean",
1697
+ "primaryKey": false,
1698
+ "notNull": true,
1699
+ "default": false
1700
+ },
1701
+ "can_move_threads": {
1702
+ "name": "can_move_threads",
1703
+ "type": "boolean",
1704
+ "primaryKey": false,
1705
+ "notNull": true,
1706
+ "default": false
1707
+ },
1708
+ "can_merge_threads": {
1709
+ "name": "can_merge_threads",
1710
+ "type": "boolean",
1711
+ "primaryKey": false,
1712
+ "notNull": true,
1713
+ "default": false
1714
+ },
1715
+ "can_split_threads": {
1716
+ "name": "can_split_threads",
1717
+ "type": "boolean",
1718
+ "primaryKey": false,
1719
+ "notNull": true,
1720
+ "default": false
1721
+ },
1722
+ "can_manage_polls": {
1723
+ "name": "can_manage_polls",
1724
+ "type": "boolean",
1725
+ "primaryKey": false,
1726
+ "notNull": true,
1727
+ "default": false
1728
+ },
1729
+ "can_view_ips": {
1730
+ "name": "can_view_ips",
1731
+ "type": "boolean",
1732
+ "primaryKey": false,
1733
+ "notNull": true,
1734
+ "default": false
1735
+ },
1736
+ "created_at": {
1737
+ "name": "created_at",
1738
+ "type": "timestamp with time zone",
1739
+ "primaryKey": false,
1740
+ "notNull": true,
1741
+ "default": "now()"
1742
+ }
1743
+ },
1744
+ "indexes": {
1745
+ "forum_moderators_user_key": {
1746
+ "name": "forum_moderators_user_key",
1747
+ "columns": [
1748
+ {
1749
+ "expression": "forum_id",
1750
+ "isExpression": false,
1751
+ "asc": true,
1752
+ "nulls": "last"
1753
+ },
1754
+ {
1755
+ "expression": "user_id",
1756
+ "isExpression": false,
1757
+ "asc": true,
1758
+ "nulls": "last"
1759
+ }
1760
+ ],
1761
+ "isUnique": true,
1762
+ "where": "\"forum_moderators\".\"user_id\" is not null",
1763
+ "concurrently": false,
1764
+ "method": "btree",
1765
+ "with": {}
1766
+ },
1767
+ "forum_moderators_group_key": {
1768
+ "name": "forum_moderators_group_key",
1769
+ "columns": [
1770
+ {
1771
+ "expression": "forum_id",
1772
+ "isExpression": false,
1773
+ "asc": true,
1774
+ "nulls": "last"
1775
+ },
1776
+ {
1777
+ "expression": "group_id",
1778
+ "isExpression": false,
1779
+ "asc": true,
1780
+ "nulls": "last"
1781
+ }
1782
+ ],
1783
+ "isUnique": true,
1784
+ "where": "\"forum_moderators\".\"group_id\" is not null",
1785
+ "concurrently": false,
1786
+ "method": "btree",
1787
+ "with": {}
1788
+ },
1789
+ "forum_moderators_user_idx": {
1790
+ "name": "forum_moderators_user_idx",
1791
+ "columns": [
1792
+ {
1793
+ "expression": "user_id",
1794
+ "isExpression": false,
1795
+ "asc": true,
1796
+ "nulls": "last"
1797
+ }
1798
+ ],
1799
+ "isUnique": false,
1800
+ "concurrently": false,
1801
+ "method": "btree",
1802
+ "with": {}
1803
+ },
1804
+ "forum_moderators_group_idx": {
1805
+ "name": "forum_moderators_group_idx",
1806
+ "columns": [
1807
+ {
1808
+ "expression": "group_id",
1809
+ "isExpression": false,
1810
+ "asc": true,
1811
+ "nulls": "last"
1812
+ }
1813
+ ],
1814
+ "isUnique": false,
1815
+ "concurrently": false,
1816
+ "method": "btree",
1817
+ "with": {}
1818
+ }
1819
+ },
1820
+ "foreignKeys": {
1821
+ "forum_moderators_forum_id_forums_id_fk": {
1822
+ "name": "forum_moderators_forum_id_forums_id_fk",
1823
+ "tableFrom": "forum_moderators",
1824
+ "tableTo": "forums",
1825
+ "columnsFrom": ["forum_id"],
1826
+ "columnsTo": ["id"],
1827
+ "onDelete": "cascade",
1828
+ "onUpdate": "no action"
1829
+ },
1830
+ "forum_moderators_user_id_users_id_fk": {
1831
+ "name": "forum_moderators_user_id_users_id_fk",
1832
+ "tableFrom": "forum_moderators",
1833
+ "tableTo": "users",
1834
+ "columnsFrom": ["user_id"],
1835
+ "columnsTo": ["id"],
1836
+ "onDelete": "cascade",
1837
+ "onUpdate": "no action"
1838
+ },
1839
+ "forum_moderators_group_id_usergroups_id_fk": {
1840
+ "name": "forum_moderators_group_id_usergroups_id_fk",
1841
+ "tableFrom": "forum_moderators",
1842
+ "tableTo": "usergroups",
1843
+ "columnsFrom": ["group_id"],
1844
+ "columnsTo": ["id"],
1845
+ "onDelete": "cascade",
1846
+ "onUpdate": "no action"
1847
+ }
1848
+ },
1849
+ "compositePrimaryKeys": {},
1850
+ "uniqueConstraints": {},
1851
+ "policies": {},
1852
+ "checkConstraints": {},
1853
+ "isRLSEnabled": false
1854
+ },
1855
+ "public.forum_password_grants": {
1856
+ "name": "forum_password_grants",
1857
+ "schema": "",
1858
+ "columns": {
1859
+ "session_id": {
1860
+ "name": "session_id",
1861
+ "type": "integer",
1862
+ "primaryKey": false,
1863
+ "notNull": true
1864
+ },
1865
+ "forum_id": {
1866
+ "name": "forum_id",
1867
+ "type": "integer",
1868
+ "primaryKey": false,
1869
+ "notNull": true
1870
+ },
1871
+ "granted_at": {
1872
+ "name": "granted_at",
1873
+ "type": "timestamp with time zone",
1874
+ "primaryKey": false,
1875
+ "notNull": true,
1876
+ "default": "now()"
1877
+ }
1878
+ },
1879
+ "indexes": {
1880
+ "forum_password_grants_pkey": {
1881
+ "name": "forum_password_grants_pkey",
1882
+ "columns": [
1883
+ {
1884
+ "expression": "session_id",
1885
+ "isExpression": false,
1886
+ "asc": true,
1887
+ "nulls": "last"
1888
+ },
1889
+ {
1890
+ "expression": "forum_id",
1891
+ "isExpression": false,
1892
+ "asc": true,
1893
+ "nulls": "last"
1894
+ }
1895
+ ],
1896
+ "isUnique": true,
1897
+ "concurrently": false,
1898
+ "method": "btree",
1899
+ "with": {}
1900
+ }
1901
+ },
1902
+ "foreignKeys": {
1903
+ "forum_password_grants_forum_id_forums_id_fk": {
1904
+ "name": "forum_password_grants_forum_id_forums_id_fk",
1905
+ "tableFrom": "forum_password_grants",
1906
+ "tableTo": "forums",
1907
+ "columnsFrom": ["forum_id"],
1908
+ "columnsTo": ["id"],
1909
+ "onDelete": "cascade",
1910
+ "onUpdate": "no action"
1911
+ }
1912
+ },
1913
+ "compositePrimaryKeys": {},
1914
+ "uniqueConstraints": {},
1915
+ "policies": {},
1916
+ "checkConstraints": {},
1917
+ "isRLSEnabled": false
1918
+ },
1919
+ "public.forum_permissions": {
1920
+ "name": "forum_permissions",
1921
+ "schema": "",
1922
+ "columns": {
1923
+ "forum_id": {
1924
+ "name": "forum_id",
1925
+ "type": "integer",
1926
+ "primaryKey": false,
1927
+ "notNull": true
1928
+ },
1929
+ "group_id": {
1930
+ "name": "group_id",
1931
+ "type": "integer",
1932
+ "primaryKey": false,
1933
+ "notNull": true
1934
+ },
1935
+ "can_view": {
1936
+ "name": "can_view",
1937
+ "type": "boolean",
1938
+ "primaryKey": false,
1939
+ "notNull": false
1940
+ },
1941
+ "can_view_threads": {
1942
+ "name": "can_view_threads",
1943
+ "type": "boolean",
1944
+ "primaryKey": false,
1945
+ "notNull": false
1946
+ },
1947
+ "can_view_others_threads": {
1948
+ "name": "can_view_others_threads",
1949
+ "type": "boolean",
1950
+ "primaryKey": false,
1951
+ "notNull": false
1952
+ },
1953
+ "can_search": {
1954
+ "name": "can_search",
1955
+ "type": "boolean",
1956
+ "primaryKey": false,
1957
+ "notNull": false
1958
+ },
1959
+ "can_post_threads": {
1960
+ "name": "can_post_threads",
1961
+ "type": "boolean",
1962
+ "primaryKey": false,
1963
+ "notNull": false
1964
+ },
1965
+ "can_post_replies": {
1966
+ "name": "can_post_replies",
1967
+ "type": "boolean",
1968
+ "primaryKey": false,
1969
+ "notNull": false
1970
+ },
1971
+ "can_post_polls": {
1972
+ "name": "can_post_polls",
1973
+ "type": "boolean",
1974
+ "primaryKey": false,
1975
+ "notNull": false
1976
+ },
1977
+ "can_vote_polls": {
1978
+ "name": "can_vote_polls",
1979
+ "type": "boolean",
1980
+ "primaryKey": false,
1981
+ "notNull": false
1982
+ },
1983
+ "can_rate_threads": {
1984
+ "name": "can_rate_threads",
1985
+ "type": "boolean",
1986
+ "primaryKey": false,
1987
+ "notNull": false
1988
+ },
1989
+ "can_edit_own_posts": {
1990
+ "name": "can_edit_own_posts",
1991
+ "type": "boolean",
1992
+ "primaryKey": false,
1993
+ "notNull": false
1994
+ },
1995
+ "can_delete_own_posts": {
1996
+ "name": "can_delete_own_posts",
1997
+ "type": "boolean",
1998
+ "primaryKey": false,
1999
+ "notNull": false
2000
+ },
2001
+ "can_delete_own_threads": {
2002
+ "name": "can_delete_own_threads",
2003
+ "type": "boolean",
2004
+ "primaryKey": false,
2005
+ "notNull": false
2006
+ },
2007
+ "can_edit_others_posts": {
2008
+ "name": "can_edit_others_posts",
2009
+ "type": "boolean",
2010
+ "primaryKey": false,
2011
+ "notNull": false
2012
+ },
2013
+ "can_delete_others_posts": {
2014
+ "name": "can_delete_others_posts",
2015
+ "type": "boolean",
2016
+ "primaryKey": false,
2017
+ "notNull": false
2018
+ },
2019
+ "can_soft_delete_posts": {
2020
+ "name": "can_soft_delete_posts",
2021
+ "type": "boolean",
2022
+ "primaryKey": false,
2023
+ "notNull": false
2024
+ },
2025
+ "can_view_unapproved": {
2026
+ "name": "can_view_unapproved",
2027
+ "type": "boolean",
2028
+ "primaryKey": false,
2029
+ "notNull": false
2030
+ },
2031
+ "can_view_deleted": {
2032
+ "name": "can_view_deleted",
2033
+ "type": "boolean",
2034
+ "primaryKey": false,
2035
+ "notNull": false
2036
+ },
2037
+ "can_approve_content": {
2038
+ "name": "can_approve_content",
2039
+ "type": "boolean",
2040
+ "primaryKey": false,
2041
+ "notNull": false
2042
+ },
2043
+ "can_upload_attachments": {
2044
+ "name": "can_upload_attachments",
2045
+ "type": "boolean",
2046
+ "primaryKey": false,
2047
+ "notNull": false
2048
+ },
2049
+ "can_download_attachments": {
2050
+ "name": "can_download_attachments",
2051
+ "type": "boolean",
2052
+ "primaryKey": false,
2053
+ "notNull": false
2054
+ },
2055
+ "can_subscribe": {
2056
+ "name": "can_subscribe",
2057
+ "type": "boolean",
2058
+ "primaryKey": false,
2059
+ "notNull": false
2060
+ },
2061
+ "edit_time_limit_minutes": {
2062
+ "name": "edit_time_limit_minutes",
2063
+ "type": "integer",
2064
+ "primaryKey": false,
2065
+ "notNull": false
2066
+ },
2067
+ "max_attachments_per_post": {
2068
+ "name": "max_attachments_per_post",
2069
+ "type": "integer",
2070
+ "primaryKey": false,
2071
+ "notNull": false
2072
+ },
2073
+ "max_attachment_size_kb": {
2074
+ "name": "max_attachment_size_kb",
2075
+ "type": "integer",
2076
+ "primaryKey": false,
2077
+ "notNull": false
2078
+ },
2079
+ "requires_thread_approval": {
2080
+ "name": "requires_thread_approval",
2081
+ "type": "boolean",
2082
+ "primaryKey": false,
2083
+ "notNull": false
2084
+ },
2085
+ "requires_post_approval": {
2086
+ "name": "requires_post_approval",
2087
+ "type": "boolean",
2088
+ "primaryKey": false,
2089
+ "notNull": false
2090
+ },
2091
+ "requires_approval_on_edit": {
2092
+ "name": "requires_approval_on_edit",
2093
+ "type": "boolean",
2094
+ "primaryKey": false,
2095
+ "notNull": false
2096
+ },
2097
+ "updated_at": {
2098
+ "name": "updated_at",
2099
+ "type": "timestamp with time zone",
2100
+ "primaryKey": false,
2101
+ "notNull": true,
2102
+ "default": "now()"
2103
+ }
2104
+ },
2105
+ "indexes": {
2106
+ "forum_permissions_pkey": {
2107
+ "name": "forum_permissions_pkey",
2108
+ "columns": [
2109
+ {
2110
+ "expression": "forum_id",
2111
+ "isExpression": false,
2112
+ "asc": true,
2113
+ "nulls": "last"
2114
+ },
2115
+ {
2116
+ "expression": "group_id",
2117
+ "isExpression": false,
2118
+ "asc": true,
2119
+ "nulls": "last"
2120
+ }
2121
+ ],
2122
+ "isUnique": true,
2123
+ "concurrently": false,
2124
+ "method": "btree",
2125
+ "with": {}
2126
+ },
2127
+ "forum_permissions_group_idx": {
2128
+ "name": "forum_permissions_group_idx",
2129
+ "columns": [
2130
+ {
2131
+ "expression": "group_id",
2132
+ "isExpression": false,
2133
+ "asc": true,
2134
+ "nulls": "last"
2135
+ }
2136
+ ],
2137
+ "isUnique": false,
2138
+ "concurrently": false,
2139
+ "method": "btree",
2140
+ "with": {}
2141
+ }
2142
+ },
2143
+ "foreignKeys": {
2144
+ "forum_permissions_forum_id_forums_id_fk": {
2145
+ "name": "forum_permissions_forum_id_forums_id_fk",
2146
+ "tableFrom": "forum_permissions",
2147
+ "tableTo": "forums",
2148
+ "columnsFrom": ["forum_id"],
2149
+ "columnsTo": ["id"],
2150
+ "onDelete": "cascade",
2151
+ "onUpdate": "no action"
2152
+ },
2153
+ "forum_permissions_group_id_usergroups_id_fk": {
2154
+ "name": "forum_permissions_group_id_usergroups_id_fk",
2155
+ "tableFrom": "forum_permissions",
2156
+ "tableTo": "usergroups",
2157
+ "columnsFrom": ["group_id"],
2158
+ "columnsTo": ["id"],
2159
+ "onDelete": "cascade",
2160
+ "onUpdate": "no action"
2161
+ }
2162
+ },
2163
+ "compositePrimaryKeys": {},
2164
+ "uniqueConstraints": {},
2165
+ "policies": {},
2166
+ "checkConstraints": {},
2167
+ "isRLSEnabled": false
2168
+ },
2169
+ "public.forum_subscriptions": {
2170
+ "name": "forum_subscriptions",
2171
+ "schema": "",
2172
+ "columns": {
2173
+ "user_id": {
2174
+ "name": "user_id",
2175
+ "type": "integer",
2176
+ "primaryKey": false,
2177
+ "notNull": true
2178
+ },
2179
+ "forum_id": {
2180
+ "name": "forum_id",
2181
+ "type": "integer",
2182
+ "primaryKey": false,
2183
+ "notNull": true
2184
+ },
2185
+ "notify_via": {
2186
+ "name": "notify_via",
2187
+ "type": "text",
2188
+ "primaryKey": false,
2189
+ "notNull": true,
2190
+ "default": "'notification'"
2191
+ },
2192
+ "created_at": {
2193
+ "name": "created_at",
2194
+ "type": "timestamp with time zone",
2195
+ "primaryKey": false,
2196
+ "notNull": true,
2197
+ "default": "now()"
2198
+ }
2199
+ },
2200
+ "indexes": {
2201
+ "forum_subscriptions_pkey": {
2202
+ "name": "forum_subscriptions_pkey",
2203
+ "columns": [
2204
+ {
2205
+ "expression": "user_id",
2206
+ "isExpression": false,
2207
+ "asc": true,
2208
+ "nulls": "last"
2209
+ },
2210
+ {
2211
+ "expression": "forum_id",
2212
+ "isExpression": false,
2213
+ "asc": true,
2214
+ "nulls": "last"
2215
+ }
2216
+ ],
2217
+ "isUnique": true,
2218
+ "concurrently": false,
2219
+ "method": "btree",
2220
+ "with": {}
2221
+ },
2222
+ "forum_subscriptions_forum_idx": {
2223
+ "name": "forum_subscriptions_forum_idx",
2224
+ "columns": [
2225
+ {
2226
+ "expression": "forum_id",
2227
+ "isExpression": false,
2228
+ "asc": true,
2229
+ "nulls": "last"
2230
+ }
2231
+ ],
2232
+ "isUnique": false,
2233
+ "concurrently": false,
2234
+ "method": "btree",
2235
+ "with": {}
2236
+ }
2237
+ },
2238
+ "foreignKeys": {
2239
+ "forum_subscriptions_user_id_users_id_fk": {
2240
+ "name": "forum_subscriptions_user_id_users_id_fk",
2241
+ "tableFrom": "forum_subscriptions",
2242
+ "tableTo": "users",
2243
+ "columnsFrom": ["user_id"],
2244
+ "columnsTo": ["id"],
2245
+ "onDelete": "cascade",
2246
+ "onUpdate": "no action"
2247
+ },
2248
+ "forum_subscriptions_forum_id_forums_id_fk": {
2249
+ "name": "forum_subscriptions_forum_id_forums_id_fk",
2250
+ "tableFrom": "forum_subscriptions",
2251
+ "tableTo": "forums",
2252
+ "columnsFrom": ["forum_id"],
2253
+ "columnsTo": ["id"],
2254
+ "onDelete": "cascade",
2255
+ "onUpdate": "no action"
2256
+ }
2257
+ },
2258
+ "compositePrimaryKeys": {},
2259
+ "uniqueConstraints": {},
2260
+ "policies": {},
2261
+ "checkConstraints": {},
2262
+ "isRLSEnabled": false
2263
+ },
2264
+ "public.forums": {
2265
+ "name": "forums",
2266
+ "schema": "",
2267
+ "columns": {
2268
+ "id": {
2269
+ "name": "id",
2270
+ "type": "integer",
2271
+ "primaryKey": true,
2272
+ "notNull": true,
2273
+ "identity": {
2274
+ "type": "byDefault",
2275
+ "name": "forums_id_seq",
2276
+ "schema": "public",
2277
+ "increment": "1",
2278
+ "startWith": "1",
2279
+ "minValue": "1",
2280
+ "maxValue": "2147483647",
2281
+ "cache": "1",
2282
+ "cycle": false
2283
+ }
2284
+ },
2285
+ "type": {
2286
+ "name": "type",
2287
+ "type": "text",
2288
+ "primaryKey": false,
2289
+ "notNull": true,
2290
+ "default": "'forum'"
2291
+ },
2292
+ "title": {
2293
+ "name": "title",
2294
+ "type": "text",
2295
+ "primaryKey": false,
2296
+ "notNull": true
2297
+ },
2298
+ "description": {
2299
+ "name": "description",
2300
+ "type": "text",
2301
+ "primaryKey": false,
2302
+ "notNull": false
2303
+ },
2304
+ "slug": {
2305
+ "name": "slug",
2306
+ "type": "text",
2307
+ "primaryKey": false,
2308
+ "notNull": true
2309
+ },
2310
+ "parent_id": {
2311
+ "name": "parent_id",
2312
+ "type": "integer",
2313
+ "primaryKey": false,
2314
+ "notNull": false
2315
+ },
2316
+ "path": {
2317
+ "name": "path",
2318
+ "type": "text",
2319
+ "primaryKey": false,
2320
+ "notNull": true
2321
+ },
2322
+ "depth": {
2323
+ "name": "depth",
2324
+ "type": "integer",
2325
+ "primaryKey": false,
2326
+ "notNull": true,
2327
+ "default": 0
2328
+ },
2329
+ "display_order": {
2330
+ "name": "display_order",
2331
+ "type": "integer",
2332
+ "primaryKey": false,
2333
+ "notNull": true,
2334
+ "default": 0
2335
+ },
2336
+ "link_url": {
2337
+ "name": "link_url",
2338
+ "type": "text",
2339
+ "primaryKey": false,
2340
+ "notNull": false
2341
+ },
2342
+ "link_hits": {
2343
+ "name": "link_hits",
2344
+ "type": "integer",
2345
+ "primaryKey": false,
2346
+ "notNull": true,
2347
+ "default": 0
2348
+ },
2349
+ "is_open": {
2350
+ "name": "is_open",
2351
+ "type": "boolean",
2352
+ "primaryKey": false,
2353
+ "notNull": true,
2354
+ "default": true
2355
+ },
2356
+ "allow_threads": {
2357
+ "name": "allow_threads",
2358
+ "type": "boolean",
2359
+ "primaryKey": false,
2360
+ "notNull": true,
2361
+ "default": true
2362
+ },
2363
+ "allow_replies": {
2364
+ "name": "allow_replies",
2365
+ "type": "boolean",
2366
+ "primaryKey": false,
2367
+ "notNull": true,
2368
+ "default": true
2369
+ },
2370
+ "allow_polls": {
2371
+ "name": "allow_polls",
2372
+ "type": "boolean",
2373
+ "primaryKey": false,
2374
+ "notNull": true,
2375
+ "default": true
2376
+ },
2377
+ "allow_attachments": {
2378
+ "name": "allow_attachments",
2379
+ "type": "boolean",
2380
+ "primaryKey": false,
2381
+ "notNull": true,
2382
+ "default": true
2383
+ },
2384
+ "requires_prefix": {
2385
+ "name": "requires_prefix",
2386
+ "type": "boolean",
2387
+ "primaryKey": false,
2388
+ "notNull": true,
2389
+ "default": false
2390
+ },
2391
+ "moderate_new_threads": {
2392
+ "name": "moderate_new_threads",
2393
+ "type": "boolean",
2394
+ "primaryKey": false,
2395
+ "notNull": true,
2396
+ "default": false
2397
+ },
2398
+ "moderate_new_posts": {
2399
+ "name": "moderate_new_posts",
2400
+ "type": "boolean",
2401
+ "primaryKey": false,
2402
+ "notNull": true,
2403
+ "default": false
2404
+ },
2405
+ "password_hash": {
2406
+ "name": "password_hash",
2407
+ "type": "text",
2408
+ "primaryKey": false,
2409
+ "notNull": false
2410
+ },
2411
+ "thread_count": {
2412
+ "name": "thread_count",
2413
+ "type": "integer",
2414
+ "primaryKey": false,
2415
+ "notNull": true,
2416
+ "default": 0
2417
+ },
2418
+ "post_count": {
2419
+ "name": "post_count",
2420
+ "type": "integer",
2421
+ "primaryKey": false,
2422
+ "notNull": true,
2423
+ "default": 0
2424
+ },
2425
+ "last_post_id": {
2426
+ "name": "last_post_id",
2427
+ "type": "integer",
2428
+ "primaryKey": false,
2429
+ "notNull": false
2430
+ },
2431
+ "last_post_thread_id": {
2432
+ "name": "last_post_thread_id",
2433
+ "type": "integer",
2434
+ "primaryKey": false,
2435
+ "notNull": false
2436
+ },
2437
+ "last_post_thread_title": {
2438
+ "name": "last_post_thread_title",
2439
+ "type": "text",
2440
+ "primaryKey": false,
2441
+ "notNull": false
2442
+ },
2443
+ "last_post_user_id": {
2444
+ "name": "last_post_user_id",
2445
+ "type": "integer",
2446
+ "primaryKey": false,
2447
+ "notNull": false
2448
+ },
2449
+ "last_post_username": {
2450
+ "name": "last_post_username",
2451
+ "type": "text",
2452
+ "primaryKey": false,
2453
+ "notNull": false
2454
+ },
2455
+ "last_post_at": {
2456
+ "name": "last_post_at",
2457
+ "type": "timestamp with time zone",
2458
+ "primaryKey": false,
2459
+ "notNull": false
2460
+ },
2461
+ "legacy_mybb_fid": {
2462
+ "name": "legacy_mybb_fid",
2463
+ "type": "integer",
2464
+ "primaryKey": false,
2465
+ "notNull": false
2466
+ },
2467
+ "created_at": {
2468
+ "name": "created_at",
2469
+ "type": "timestamp with time zone",
2470
+ "primaryKey": false,
2471
+ "notNull": true,
2472
+ "default": "now()"
2473
+ },
2474
+ "updated_at": {
2475
+ "name": "updated_at",
2476
+ "type": "timestamp with time zone",
2477
+ "primaryKey": false,
2478
+ "notNull": true,
2479
+ "default": "now()"
2480
+ }
2481
+ },
2482
+ "indexes": {
2483
+ "forums_parent_slug_key": {
2484
+ "name": "forums_parent_slug_key",
2485
+ "columns": [
2486
+ {
2487
+ "expression": "parent_id",
2488
+ "isExpression": false,
2489
+ "asc": true,
2490
+ "nulls": "last"
2491
+ },
2492
+ {
2493
+ "expression": "slug",
2494
+ "isExpression": false,
2495
+ "asc": true,
2496
+ "nulls": "last"
2497
+ }
2498
+ ],
2499
+ "isUnique": true,
2500
+ "where": "\"forums\".\"parent_id\" is not null",
2501
+ "concurrently": false,
2502
+ "method": "btree",
2503
+ "with": {}
2504
+ },
2505
+ "forums_root_slug_key": {
2506
+ "name": "forums_root_slug_key",
2507
+ "columns": [
2508
+ {
2509
+ "expression": "slug",
2510
+ "isExpression": false,
2511
+ "asc": true,
2512
+ "nulls": "last"
2513
+ }
2514
+ ],
2515
+ "isUnique": true,
2516
+ "where": "\"forums\".\"parent_id\" is null",
2517
+ "concurrently": false,
2518
+ "method": "btree",
2519
+ "with": {}
2520
+ },
2521
+ "forums_parent_order_idx": {
2522
+ "name": "forums_parent_order_idx",
2523
+ "columns": [
2524
+ {
2525
+ "expression": "parent_id",
2526
+ "isExpression": false,
2527
+ "asc": true,
2528
+ "nulls": "last"
2529
+ },
2530
+ {
2531
+ "expression": "display_order",
2532
+ "isExpression": false,
2533
+ "asc": true,
2534
+ "nulls": "last"
2535
+ }
2536
+ ],
2537
+ "isUnique": false,
2538
+ "concurrently": false,
2539
+ "method": "btree",
2540
+ "with": {}
2541
+ },
2542
+ "forums_path_idx": {
2543
+ "name": "forums_path_idx",
2544
+ "columns": [
2545
+ {
2546
+ "expression": "path",
2547
+ "isExpression": false,
2548
+ "asc": true,
2549
+ "nulls": "last"
2550
+ }
2551
+ ],
2552
+ "isUnique": false,
2553
+ "concurrently": false,
2554
+ "method": "btree",
2555
+ "with": {}
2556
+ },
2557
+ "forums_legacy_mybb_fid_key": {
2558
+ "name": "forums_legacy_mybb_fid_key",
2559
+ "columns": [
2560
+ {
2561
+ "expression": "legacy_mybb_fid",
2562
+ "isExpression": false,
2563
+ "asc": true,
2564
+ "nulls": "last"
2565
+ }
2566
+ ],
2567
+ "isUnique": true,
2568
+ "where": "\"forums\".\"legacy_mybb_fid\" is not null",
2569
+ "concurrently": false,
2570
+ "method": "btree",
2571
+ "with": {}
2572
+ }
2573
+ },
2574
+ "foreignKeys": {},
2575
+ "compositePrimaryKeys": {},
2576
+ "uniqueConstraints": {},
2577
+ "policies": {},
2578
+ "checkConstraints": {},
2579
+ "isRLSEnabled": false
2580
+ },
2581
+ "public.forums_read": {
2582
+ "name": "forums_read",
2583
+ "schema": "",
2584
+ "columns": {
2585
+ "user_id": {
2586
+ "name": "user_id",
2587
+ "type": "integer",
2588
+ "primaryKey": false,
2589
+ "notNull": true
2590
+ },
2591
+ "forum_id": {
2592
+ "name": "forum_id",
2593
+ "type": "integer",
2594
+ "primaryKey": false,
2595
+ "notNull": true
2596
+ },
2597
+ "read_at": {
2598
+ "name": "read_at",
2599
+ "type": "timestamp with time zone",
2600
+ "primaryKey": false,
2601
+ "notNull": true,
2602
+ "default": "now()"
2603
+ }
2604
+ },
2605
+ "indexes": {
2606
+ "forums_read_pkey": {
2607
+ "name": "forums_read_pkey",
2608
+ "columns": [
2609
+ {
2610
+ "expression": "user_id",
2611
+ "isExpression": false,
2612
+ "asc": true,
2613
+ "nulls": "last"
2614
+ },
2615
+ {
2616
+ "expression": "forum_id",
2617
+ "isExpression": false,
2618
+ "asc": true,
2619
+ "nulls": "last"
2620
+ }
2621
+ ],
2622
+ "isUnique": true,
2623
+ "concurrently": false,
2624
+ "method": "btree",
2625
+ "with": {}
2626
+ }
2627
+ },
2628
+ "foreignKeys": {
2629
+ "forums_read_user_id_users_id_fk": {
2630
+ "name": "forums_read_user_id_users_id_fk",
2631
+ "tableFrom": "forums_read",
2632
+ "tableTo": "users",
2633
+ "columnsFrom": ["user_id"],
2634
+ "columnsTo": ["id"],
2635
+ "onDelete": "cascade",
2636
+ "onUpdate": "no action"
2637
+ },
2638
+ "forums_read_forum_id_forums_id_fk": {
2639
+ "name": "forums_read_forum_id_forums_id_fk",
2640
+ "tableFrom": "forums_read",
2641
+ "tableTo": "forums",
2642
+ "columnsFrom": ["forum_id"],
2643
+ "columnsTo": ["id"],
2644
+ "onDelete": "cascade",
2645
+ "onUpdate": "no action"
2646
+ }
2647
+ },
2648
+ "compositePrimaryKeys": {},
2649
+ "uniqueConstraints": {},
2650
+ "policies": {},
2651
+ "checkConstraints": {},
2652
+ "isRLSEnabled": false
2653
+ },
2654
+ "public.post_revisions": {
2655
+ "name": "post_revisions",
2656
+ "schema": "",
2657
+ "columns": {
2658
+ "id": {
2659
+ "name": "id",
2660
+ "type": "integer",
2661
+ "primaryKey": true,
2662
+ "notNull": true,
2663
+ "identity": {
2664
+ "type": "byDefault",
2665
+ "name": "post_revisions_id_seq",
2666
+ "schema": "public",
2667
+ "increment": "1",
2668
+ "startWith": "1",
2669
+ "minValue": "1",
2670
+ "maxValue": "2147483647",
2671
+ "cache": "1",
2672
+ "cycle": false
2673
+ }
2674
+ },
2675
+ "post_id": {
2676
+ "name": "post_id",
2677
+ "type": "integer",
2678
+ "primaryKey": false,
2679
+ "notNull": true
2680
+ },
2681
+ "revision": {
2682
+ "name": "revision",
2683
+ "type": "smallint",
2684
+ "primaryKey": false,
2685
+ "notNull": true
2686
+ },
2687
+ "message": {
2688
+ "name": "message",
2689
+ "type": "text",
2690
+ "primaryKey": false,
2691
+ "notNull": true
2692
+ },
2693
+ "subject": {
2694
+ "name": "subject",
2695
+ "type": "text",
2696
+ "primaryKey": false,
2697
+ "notNull": false
2698
+ },
2699
+ "edited_by_user_id": {
2700
+ "name": "edited_by_user_id",
2701
+ "type": "integer",
2702
+ "primaryKey": false,
2703
+ "notNull": false
2704
+ },
2705
+ "edit_reason": {
2706
+ "name": "edit_reason",
2707
+ "type": "text",
2708
+ "primaryKey": false,
2709
+ "notNull": false
2710
+ },
2711
+ "created_at": {
2712
+ "name": "created_at",
2713
+ "type": "timestamp with time zone",
2714
+ "primaryKey": false,
2715
+ "notNull": true,
2716
+ "default": "now()"
2717
+ }
2718
+ },
2719
+ "indexes": {
2720
+ "post_revisions_post_revision_key": {
2721
+ "name": "post_revisions_post_revision_key",
2722
+ "columns": [
2723
+ {
2724
+ "expression": "post_id",
2725
+ "isExpression": false,
2726
+ "asc": true,
2727
+ "nulls": "last"
2728
+ },
2729
+ {
2730
+ "expression": "revision",
2731
+ "isExpression": false,
2732
+ "asc": true,
2733
+ "nulls": "last"
2734
+ }
2735
+ ],
2736
+ "isUnique": true,
2737
+ "concurrently": false,
2738
+ "method": "btree",
2739
+ "with": {}
2740
+ }
2741
+ },
2742
+ "foreignKeys": {
2743
+ "post_revisions_post_id_posts_id_fk": {
2744
+ "name": "post_revisions_post_id_posts_id_fk",
2745
+ "tableFrom": "post_revisions",
2746
+ "tableTo": "posts",
2747
+ "columnsFrom": ["post_id"],
2748
+ "columnsTo": ["id"],
2749
+ "onDelete": "cascade",
2750
+ "onUpdate": "no action"
2751
+ },
2752
+ "post_revisions_edited_by_user_id_users_id_fk": {
2753
+ "name": "post_revisions_edited_by_user_id_users_id_fk",
2754
+ "tableFrom": "post_revisions",
2755
+ "tableTo": "users",
2756
+ "columnsFrom": ["edited_by_user_id"],
2757
+ "columnsTo": ["id"],
2758
+ "onDelete": "set null",
2759
+ "onUpdate": "no action"
2760
+ }
2761
+ },
2762
+ "compositePrimaryKeys": {},
2763
+ "uniqueConstraints": {},
2764
+ "policies": {},
2765
+ "checkConstraints": {},
2766
+ "isRLSEnabled": false
2767
+ },
2768
+ "public.posts": {
2769
+ "name": "posts",
2770
+ "schema": "",
2771
+ "columns": {
2772
+ "id": {
2773
+ "name": "id",
2774
+ "type": "integer",
2775
+ "primaryKey": true,
2776
+ "notNull": true,
2777
+ "identity": {
2778
+ "type": "byDefault",
2779
+ "name": "posts_id_seq",
2780
+ "schema": "public",
2781
+ "increment": "1",
2782
+ "startWith": "1",
2783
+ "minValue": "1",
2784
+ "maxValue": "2147483647",
2785
+ "cache": "1",
2786
+ "cycle": false
2787
+ }
2788
+ },
2789
+ "thread_id": {
2790
+ "name": "thread_id",
2791
+ "type": "integer",
2792
+ "primaryKey": false,
2793
+ "notNull": true
2794
+ },
2795
+ "forum_id": {
2796
+ "name": "forum_id",
2797
+ "type": "integer",
2798
+ "primaryKey": false,
2799
+ "notNull": true
2800
+ },
2801
+ "author_user_id": {
2802
+ "name": "author_user_id",
2803
+ "type": "integer",
2804
+ "primaryKey": false,
2805
+ "notNull": false
2806
+ },
2807
+ "author_username": {
2808
+ "name": "author_username",
2809
+ "type": "text",
2810
+ "primaryKey": false,
2811
+ "notNull": true
2812
+ },
2813
+ "subject": {
2814
+ "name": "subject",
2815
+ "type": "text",
2816
+ "primaryKey": false,
2817
+ "notNull": false
2818
+ },
2819
+ "message": {
2820
+ "name": "message",
2821
+ "type": "text",
2822
+ "primaryKey": false,
2823
+ "notNull": true
2824
+ },
2825
+ "visibility": {
2826
+ "name": "visibility",
2827
+ "type": "text",
2828
+ "primaryKey": false,
2829
+ "notNull": true,
2830
+ "default": "'visible'"
2831
+ },
2832
+ "is_first_post": {
2833
+ "name": "is_first_post",
2834
+ "type": "boolean",
2835
+ "primaryKey": false,
2836
+ "notNull": true,
2837
+ "default": false
2838
+ },
2839
+ "ip_prefix": {
2840
+ "name": "ip_prefix",
2841
+ "type": "text",
2842
+ "primaryKey": false,
2843
+ "notNull": false
2844
+ },
2845
+ "edited_at": {
2846
+ "name": "edited_at",
2847
+ "type": "timestamp with time zone",
2848
+ "primaryKey": false,
2849
+ "notNull": false
2850
+ },
2851
+ "edited_by_user_id": {
2852
+ "name": "edited_by_user_id",
2853
+ "type": "integer",
2854
+ "primaryKey": false,
2855
+ "notNull": false
2856
+ },
2857
+ "edit_reason": {
2858
+ "name": "edit_reason",
2859
+ "type": "text",
2860
+ "primaryKey": false,
2861
+ "notNull": false
2862
+ },
2863
+ "revision_count": {
2864
+ "name": "revision_count",
2865
+ "type": "smallint",
2866
+ "primaryKey": false,
2867
+ "notNull": true,
2868
+ "default": 0
2869
+ },
2870
+ "search_vector": {
2871
+ "name": "search_vector",
2872
+ "type": "tsvector",
2873
+ "primaryKey": false,
2874
+ "notNull": false
2875
+ },
2876
+ "legacy_mybb_pid": {
2877
+ "name": "legacy_mybb_pid",
2878
+ "type": "integer",
2879
+ "primaryKey": false,
2880
+ "notNull": false
2881
+ },
2882
+ "created_at": {
2883
+ "name": "created_at",
2884
+ "type": "timestamp with time zone",
2885
+ "primaryKey": false,
2886
+ "notNull": true,
2887
+ "default": "now()"
2888
+ }
2889
+ },
2890
+ "indexes": {
2891
+ "posts_thread_visible_idx": {
2892
+ "name": "posts_thread_visible_idx",
2893
+ "columns": [
2894
+ {
2895
+ "expression": "thread_id",
2896
+ "isExpression": false,
2897
+ "asc": true,
2898
+ "nulls": "last"
2899
+ },
2900
+ {
2901
+ "expression": "id",
2902
+ "isExpression": false,
2903
+ "asc": true,
2904
+ "nulls": "last"
2905
+ }
2906
+ ],
2907
+ "isUnique": false,
2908
+ "where": "\"posts\".\"visibility\" = 'visible'",
2909
+ "concurrently": false,
2910
+ "method": "btree",
2911
+ "with": {}
2912
+ },
2913
+ "posts_thread_all_idx": {
2914
+ "name": "posts_thread_all_idx",
2915
+ "columns": [
2916
+ {
2917
+ "expression": "thread_id",
2918
+ "isExpression": false,
2919
+ "asc": true,
2920
+ "nulls": "last"
2921
+ },
2922
+ {
2923
+ "expression": "id",
2924
+ "isExpression": false,
2925
+ "asc": true,
2926
+ "nulls": "last"
2927
+ }
2928
+ ],
2929
+ "isUnique": false,
2930
+ "concurrently": false,
2931
+ "method": "btree",
2932
+ "with": {}
2933
+ },
2934
+ "posts_author_idx": {
2935
+ "name": "posts_author_idx",
2936
+ "columns": [
2937
+ {
2938
+ "expression": "author_user_id",
2939
+ "isExpression": false,
2940
+ "asc": true,
2941
+ "nulls": "last"
2942
+ },
2943
+ {
2944
+ "expression": "created_at",
2945
+ "isExpression": false,
2946
+ "asc": false,
2947
+ "nulls": "last"
2948
+ }
2949
+ ],
2950
+ "isUnique": false,
2951
+ "concurrently": false,
2952
+ "method": "btree",
2953
+ "with": {}
2954
+ },
2955
+ "posts_forum_visibility_idx": {
2956
+ "name": "posts_forum_visibility_idx",
2957
+ "columns": [
2958
+ {
2959
+ "expression": "forum_id",
2960
+ "isExpression": false,
2961
+ "asc": true,
2962
+ "nulls": "last"
2963
+ },
2964
+ {
2965
+ "expression": "created_at",
2966
+ "isExpression": false,
2967
+ "asc": false,
2968
+ "nulls": "last"
2969
+ }
2970
+ ],
2971
+ "isUnique": false,
2972
+ "where": "\"posts\".\"visibility\" <> 'visible'",
2973
+ "concurrently": false,
2974
+ "method": "btree",
2975
+ "with": {}
2976
+ },
2977
+ "posts_legacy_mybb_pid_key": {
2978
+ "name": "posts_legacy_mybb_pid_key",
2979
+ "columns": [
2980
+ {
2981
+ "expression": "legacy_mybb_pid",
2982
+ "isExpression": false,
2983
+ "asc": true,
2984
+ "nulls": "last"
2985
+ }
2986
+ ],
2987
+ "isUnique": true,
2988
+ "where": "\"posts\".\"legacy_mybb_pid\" is not null",
2989
+ "concurrently": false,
2990
+ "method": "btree",
2991
+ "with": {}
2992
+ },
2993
+ "posts_search_vector_idx": {
2994
+ "name": "posts_search_vector_idx",
2995
+ "columns": [
2996
+ {
2997
+ "expression": "search_vector",
2998
+ "isExpression": false,
2999
+ "asc": true,
3000
+ "nulls": "last"
3001
+ }
3002
+ ],
3003
+ "isUnique": false,
3004
+ "concurrently": false,
3005
+ "method": "gin",
3006
+ "with": {}
3007
+ }
3008
+ },
3009
+ "foreignKeys": {
3010
+ "posts_thread_id_threads_id_fk": {
3011
+ "name": "posts_thread_id_threads_id_fk",
3012
+ "tableFrom": "posts",
3013
+ "tableTo": "threads",
3014
+ "columnsFrom": ["thread_id"],
3015
+ "columnsTo": ["id"],
3016
+ "onDelete": "cascade",
3017
+ "onUpdate": "no action"
3018
+ },
3019
+ "posts_forum_id_forums_id_fk": {
3020
+ "name": "posts_forum_id_forums_id_fk",
3021
+ "tableFrom": "posts",
3022
+ "tableTo": "forums",
3023
+ "columnsFrom": ["forum_id"],
3024
+ "columnsTo": ["id"],
3025
+ "onDelete": "cascade",
3026
+ "onUpdate": "no action"
3027
+ },
3028
+ "posts_author_user_id_users_id_fk": {
3029
+ "name": "posts_author_user_id_users_id_fk",
3030
+ "tableFrom": "posts",
3031
+ "tableTo": "users",
3032
+ "columnsFrom": ["author_user_id"],
3033
+ "columnsTo": ["id"],
3034
+ "onDelete": "set null",
3035
+ "onUpdate": "no action"
3036
+ },
3037
+ "posts_edited_by_user_id_users_id_fk": {
3038
+ "name": "posts_edited_by_user_id_users_id_fk",
3039
+ "tableFrom": "posts",
3040
+ "tableTo": "users",
3041
+ "columnsFrom": ["edited_by_user_id"],
3042
+ "columnsTo": ["id"],
3043
+ "onDelete": "set null",
3044
+ "onUpdate": "no action"
3045
+ }
3046
+ },
3047
+ "compositePrimaryKeys": {},
3048
+ "uniqueConstraints": {},
3049
+ "policies": {},
3050
+ "checkConstraints": {},
3051
+ "isRLSEnabled": false
3052
+ },
3053
+ "public.thread_prefixes": {
3054
+ "name": "thread_prefixes",
3055
+ "schema": "",
3056
+ "columns": {
3057
+ "id": {
3058
+ "name": "id",
3059
+ "type": "integer",
3060
+ "primaryKey": true,
3061
+ "notNull": true,
3062
+ "identity": {
3063
+ "type": "byDefault",
3064
+ "name": "thread_prefixes_id_seq",
3065
+ "schema": "public",
3066
+ "increment": "1",
3067
+ "startWith": "1",
3068
+ "minValue": "1",
3069
+ "maxValue": "2147483647",
3070
+ "cache": "1",
3071
+ "cycle": false
3072
+ }
3073
+ },
3074
+ "label": {
3075
+ "name": "label",
3076
+ "type": "text",
3077
+ "primaryKey": false,
3078
+ "notNull": true
3079
+ },
3080
+ "token": {
3081
+ "name": "token",
3082
+ "type": "text",
3083
+ "primaryKey": false,
3084
+ "notNull": false
3085
+ },
3086
+ "display_order": {
3087
+ "name": "display_order",
3088
+ "type": "integer",
3089
+ "primaryKey": false,
3090
+ "notNull": true,
3091
+ "default": 0
3092
+ },
3093
+ "forum_path_prefix": {
3094
+ "name": "forum_path_prefix",
3095
+ "type": "text",
3096
+ "primaryKey": false,
3097
+ "notNull": false
3098
+ },
3099
+ "created_at": {
3100
+ "name": "created_at",
3101
+ "type": "timestamp with time zone",
3102
+ "primaryKey": false,
3103
+ "notNull": true,
3104
+ "default": "now()"
3105
+ }
3106
+ },
3107
+ "indexes": {
3108
+ "thread_prefixes_order_idx": {
3109
+ "name": "thread_prefixes_order_idx",
3110
+ "columns": [
3111
+ {
3112
+ "expression": "display_order",
3113
+ "isExpression": false,
3114
+ "asc": true,
3115
+ "nulls": "last"
3116
+ }
3117
+ ],
3118
+ "isUnique": false,
3119
+ "concurrently": false,
3120
+ "method": "btree",
3121
+ "with": {}
3122
+ }
3123
+ },
3124
+ "foreignKeys": {},
3125
+ "compositePrimaryKeys": {},
3126
+ "uniqueConstraints": {},
3127
+ "policies": {},
3128
+ "checkConstraints": {},
3129
+ "isRLSEnabled": false
3130
+ },
3131
+ "public.thread_subscriptions": {
3132
+ "name": "thread_subscriptions",
3133
+ "schema": "",
3134
+ "columns": {
3135
+ "user_id": {
3136
+ "name": "user_id",
3137
+ "type": "integer",
3138
+ "primaryKey": false,
3139
+ "notNull": true
3140
+ },
3141
+ "thread_id": {
3142
+ "name": "thread_id",
3143
+ "type": "integer",
3144
+ "primaryKey": false,
3145
+ "notNull": true
3146
+ },
3147
+ "notify_via": {
3148
+ "name": "notify_via",
3149
+ "type": "text",
3150
+ "primaryKey": false,
3151
+ "notNull": true,
3152
+ "default": "'notification'"
3153
+ },
3154
+ "created_at": {
3155
+ "name": "created_at",
3156
+ "type": "timestamp with time zone",
3157
+ "primaryKey": false,
3158
+ "notNull": true,
3159
+ "default": "now()"
3160
+ }
3161
+ },
3162
+ "indexes": {
3163
+ "thread_subscriptions_pkey": {
3164
+ "name": "thread_subscriptions_pkey",
3165
+ "columns": [
3166
+ {
3167
+ "expression": "user_id",
3168
+ "isExpression": false,
3169
+ "asc": true,
3170
+ "nulls": "last"
3171
+ },
3172
+ {
3173
+ "expression": "thread_id",
3174
+ "isExpression": false,
3175
+ "asc": true,
3176
+ "nulls": "last"
3177
+ }
3178
+ ],
3179
+ "isUnique": true,
3180
+ "concurrently": false,
3181
+ "method": "btree",
3182
+ "with": {}
3183
+ },
3184
+ "thread_subscriptions_thread_idx": {
3185
+ "name": "thread_subscriptions_thread_idx",
3186
+ "columns": [
3187
+ {
3188
+ "expression": "thread_id",
3189
+ "isExpression": false,
3190
+ "asc": true,
3191
+ "nulls": "last"
3192
+ }
3193
+ ],
3194
+ "isUnique": false,
3195
+ "concurrently": false,
3196
+ "method": "btree",
3197
+ "with": {}
3198
+ }
3199
+ },
3200
+ "foreignKeys": {
3201
+ "thread_subscriptions_user_id_users_id_fk": {
3202
+ "name": "thread_subscriptions_user_id_users_id_fk",
3203
+ "tableFrom": "thread_subscriptions",
3204
+ "tableTo": "users",
3205
+ "columnsFrom": ["user_id"],
3206
+ "columnsTo": ["id"],
3207
+ "onDelete": "cascade",
3208
+ "onUpdate": "no action"
3209
+ },
3210
+ "thread_subscriptions_thread_id_threads_id_fk": {
3211
+ "name": "thread_subscriptions_thread_id_threads_id_fk",
3212
+ "tableFrom": "thread_subscriptions",
3213
+ "tableTo": "threads",
3214
+ "columnsFrom": ["thread_id"],
3215
+ "columnsTo": ["id"],
3216
+ "onDelete": "cascade",
3217
+ "onUpdate": "no action"
3218
+ }
3219
+ },
3220
+ "compositePrimaryKeys": {},
3221
+ "uniqueConstraints": {},
3222
+ "policies": {},
3223
+ "checkConstraints": {},
3224
+ "isRLSEnabled": false
3225
+ },
3226
+ "public.threads": {
3227
+ "name": "threads",
3228
+ "schema": "",
3229
+ "columns": {
3230
+ "id": {
3231
+ "name": "id",
3232
+ "type": "integer",
3233
+ "primaryKey": true,
3234
+ "notNull": true,
3235
+ "identity": {
3236
+ "type": "byDefault",
3237
+ "name": "threads_id_seq",
3238
+ "schema": "public",
3239
+ "increment": "1",
3240
+ "startWith": "1",
3241
+ "minValue": "1",
3242
+ "maxValue": "2147483647",
3243
+ "cache": "1",
3244
+ "cycle": false
3245
+ }
3246
+ },
3247
+ "forum_id": {
3248
+ "name": "forum_id",
3249
+ "type": "integer",
3250
+ "primaryKey": false,
3251
+ "notNull": true
3252
+ },
3253
+ "title": {
3254
+ "name": "title",
3255
+ "type": "text",
3256
+ "primaryKey": false,
3257
+ "notNull": true
3258
+ },
3259
+ "slug": {
3260
+ "name": "slug",
3261
+ "type": "text",
3262
+ "primaryKey": false,
3263
+ "notNull": true
3264
+ },
3265
+ "prefix_id": {
3266
+ "name": "prefix_id",
3267
+ "type": "integer",
3268
+ "primaryKey": false,
3269
+ "notNull": false
3270
+ },
3271
+ "author_user_id": {
3272
+ "name": "author_user_id",
3273
+ "type": "integer",
3274
+ "primaryKey": false,
3275
+ "notNull": false
3276
+ },
3277
+ "author_username": {
3278
+ "name": "author_username",
3279
+ "type": "text",
3280
+ "primaryKey": false,
3281
+ "notNull": true
3282
+ },
3283
+ "visibility": {
3284
+ "name": "visibility",
3285
+ "type": "text",
3286
+ "primaryKey": false,
3287
+ "notNull": true,
3288
+ "default": "'visible'"
3289
+ },
3290
+ "is_sticky": {
3291
+ "name": "is_sticky",
3292
+ "type": "boolean",
3293
+ "primaryKey": false,
3294
+ "notNull": true,
3295
+ "default": false
3296
+ },
3297
+ "is_locked": {
3298
+ "name": "is_locked",
3299
+ "type": "boolean",
3300
+ "primaryKey": false,
3301
+ "notNull": true,
3302
+ "default": false
3303
+ },
3304
+ "first_post_id": {
3305
+ "name": "first_post_id",
3306
+ "type": "integer",
3307
+ "primaryKey": false,
3308
+ "notNull": false
3309
+ },
3310
+ "reply_count": {
3311
+ "name": "reply_count",
3312
+ "type": "integer",
3313
+ "primaryKey": false,
3314
+ "notNull": true,
3315
+ "default": 0
3316
+ },
3317
+ "view_count": {
3318
+ "name": "view_count",
3319
+ "type": "integer",
3320
+ "primaryKey": false,
3321
+ "notNull": true,
3322
+ "default": 0
3323
+ },
3324
+ "last_post_id": {
3325
+ "name": "last_post_id",
3326
+ "type": "integer",
3327
+ "primaryKey": false,
3328
+ "notNull": false
3329
+ },
3330
+ "last_post_user_id": {
3331
+ "name": "last_post_user_id",
3332
+ "type": "integer",
3333
+ "primaryKey": false,
3334
+ "notNull": false
3335
+ },
3336
+ "last_post_username": {
3337
+ "name": "last_post_username",
3338
+ "type": "text",
3339
+ "primaryKey": false,
3340
+ "notNull": false
3341
+ },
3342
+ "last_post_at": {
3343
+ "name": "last_post_at",
3344
+ "type": "timestamp with time zone",
3345
+ "primaryKey": false,
3346
+ "notNull": true,
3347
+ "default": "now()"
3348
+ },
3349
+ "moved_to_thread_id": {
3350
+ "name": "moved_to_thread_id",
3351
+ "type": "integer",
3352
+ "primaryKey": false,
3353
+ "notNull": false
3354
+ },
3355
+ "legacy_mybb_tid": {
3356
+ "name": "legacy_mybb_tid",
3357
+ "type": "integer",
3358
+ "primaryKey": false,
3359
+ "notNull": false
3360
+ },
3361
+ "created_at": {
3362
+ "name": "created_at",
3363
+ "type": "timestamp with time zone",
3364
+ "primaryKey": false,
3365
+ "notNull": true,
3366
+ "default": "now()"
3367
+ },
3368
+ "updated_at": {
3369
+ "name": "updated_at",
3370
+ "type": "timestamp with time zone",
3371
+ "primaryKey": false,
3372
+ "notNull": true,
3373
+ "default": "now()"
3374
+ }
3375
+ },
3376
+ "indexes": {
3377
+ "threads_forum_listing_idx": {
3378
+ "name": "threads_forum_listing_idx",
3379
+ "columns": [
3380
+ {
3381
+ "expression": "forum_id",
3382
+ "isExpression": false,
3383
+ "asc": true,
3384
+ "nulls": "last"
3385
+ },
3386
+ {
3387
+ "expression": "is_sticky",
3388
+ "isExpression": false,
3389
+ "asc": false,
3390
+ "nulls": "last"
3391
+ },
3392
+ {
3393
+ "expression": "last_post_at",
3394
+ "isExpression": false,
3395
+ "asc": false,
3396
+ "nulls": "last"
3397
+ }
3398
+ ],
3399
+ "isUnique": false,
3400
+ "where": "\"threads\".\"visibility\" = 'visible'",
3401
+ "concurrently": false,
3402
+ "method": "btree",
3403
+ "with": {}
3404
+ },
3405
+ "threads_forum_listing_all_idx": {
3406
+ "name": "threads_forum_listing_all_idx",
3407
+ "columns": [
3408
+ {
3409
+ "expression": "forum_id",
3410
+ "isExpression": false,
3411
+ "asc": true,
3412
+ "nulls": "last"
3413
+ },
3414
+ {
3415
+ "expression": "is_sticky",
3416
+ "isExpression": false,
3417
+ "asc": false,
3418
+ "nulls": "last"
3419
+ },
3420
+ {
3421
+ "expression": "last_post_at",
3422
+ "isExpression": false,
3423
+ "asc": false,
3424
+ "nulls": "last"
3425
+ }
3426
+ ],
3427
+ "isUnique": false,
3428
+ "concurrently": false,
3429
+ "method": "btree",
3430
+ "with": {}
3431
+ },
3432
+ "threads_author_idx": {
3433
+ "name": "threads_author_idx",
3434
+ "columns": [
3435
+ {
3436
+ "expression": "author_user_id",
3437
+ "isExpression": false,
3438
+ "asc": true,
3439
+ "nulls": "last"
3440
+ },
3441
+ {
3442
+ "expression": "created_at",
3443
+ "isExpression": false,
3444
+ "asc": false,
3445
+ "nulls": "last"
3446
+ }
3447
+ ],
3448
+ "isUnique": false,
3449
+ "concurrently": false,
3450
+ "method": "btree",
3451
+ "with": {}
3452
+ },
3453
+ "threads_legacy_mybb_tid_key": {
3454
+ "name": "threads_legacy_mybb_tid_key",
3455
+ "columns": [
3456
+ {
3457
+ "expression": "legacy_mybb_tid",
3458
+ "isExpression": false,
3459
+ "asc": true,
3460
+ "nulls": "last"
3461
+ }
3462
+ ],
3463
+ "isUnique": true,
3464
+ "where": "\"threads\".\"legacy_mybb_tid\" is not null",
3465
+ "concurrently": false,
3466
+ "method": "btree",
3467
+ "with": {}
3468
+ }
3469
+ },
3470
+ "foreignKeys": {
3471
+ "threads_forum_id_forums_id_fk": {
3472
+ "name": "threads_forum_id_forums_id_fk",
3473
+ "tableFrom": "threads",
3474
+ "tableTo": "forums",
3475
+ "columnsFrom": ["forum_id"],
3476
+ "columnsTo": ["id"],
3477
+ "onDelete": "cascade",
3478
+ "onUpdate": "no action"
3479
+ },
3480
+ "threads_prefix_id_thread_prefixes_id_fk": {
3481
+ "name": "threads_prefix_id_thread_prefixes_id_fk",
3482
+ "tableFrom": "threads",
3483
+ "tableTo": "thread_prefixes",
3484
+ "columnsFrom": ["prefix_id"],
3485
+ "columnsTo": ["id"],
3486
+ "onDelete": "set null",
3487
+ "onUpdate": "no action"
3488
+ },
3489
+ "threads_author_user_id_users_id_fk": {
3490
+ "name": "threads_author_user_id_users_id_fk",
3491
+ "tableFrom": "threads",
3492
+ "tableTo": "users",
3493
+ "columnsFrom": ["author_user_id"],
3494
+ "columnsTo": ["id"],
3495
+ "onDelete": "set null",
3496
+ "onUpdate": "no action"
3497
+ }
3498
+ },
3499
+ "compositePrimaryKeys": {},
3500
+ "uniqueConstraints": {},
3501
+ "policies": {},
3502
+ "checkConstraints": {},
3503
+ "isRLSEnabled": false
3504
+ },
3505
+ "public.threads_read": {
3506
+ "name": "threads_read",
3507
+ "schema": "",
3508
+ "columns": {
3509
+ "user_id": {
3510
+ "name": "user_id",
3511
+ "type": "integer",
3512
+ "primaryKey": false,
3513
+ "notNull": true
3514
+ },
3515
+ "thread_id": {
3516
+ "name": "thread_id",
3517
+ "type": "integer",
3518
+ "primaryKey": false,
3519
+ "notNull": true
3520
+ },
3521
+ "last_read_post_id": {
3522
+ "name": "last_read_post_id",
3523
+ "type": "integer",
3524
+ "primaryKey": false,
3525
+ "notNull": false
3526
+ },
3527
+ "read_at": {
3528
+ "name": "read_at",
3529
+ "type": "timestamp with time zone",
3530
+ "primaryKey": false,
3531
+ "notNull": true,
3532
+ "default": "now()"
3533
+ }
3534
+ },
3535
+ "indexes": {
3536
+ "threads_read_pkey": {
3537
+ "name": "threads_read_pkey",
3538
+ "columns": [
3539
+ {
3540
+ "expression": "user_id",
3541
+ "isExpression": false,
3542
+ "asc": true,
3543
+ "nulls": "last"
3544
+ },
3545
+ {
3546
+ "expression": "thread_id",
3547
+ "isExpression": false,
3548
+ "asc": true,
3549
+ "nulls": "last"
3550
+ }
3551
+ ],
3552
+ "isUnique": true,
3553
+ "concurrently": false,
3554
+ "method": "btree",
3555
+ "with": {}
3556
+ },
3557
+ "threads_read_read_at_idx": {
3558
+ "name": "threads_read_read_at_idx",
3559
+ "columns": [
3560
+ {
3561
+ "expression": "read_at",
3562
+ "isExpression": false,
3563
+ "asc": true,
3564
+ "nulls": "last"
3565
+ }
3566
+ ],
3567
+ "isUnique": false,
3568
+ "concurrently": false,
3569
+ "method": "btree",
3570
+ "with": {}
3571
+ }
3572
+ },
3573
+ "foreignKeys": {
3574
+ "threads_read_user_id_users_id_fk": {
3575
+ "name": "threads_read_user_id_users_id_fk",
3576
+ "tableFrom": "threads_read",
3577
+ "tableTo": "users",
3578
+ "columnsFrom": ["user_id"],
3579
+ "columnsTo": ["id"],
3580
+ "onDelete": "cascade",
3581
+ "onUpdate": "no action"
3582
+ },
3583
+ "threads_read_thread_id_threads_id_fk": {
3584
+ "name": "threads_read_thread_id_threads_id_fk",
3585
+ "tableFrom": "threads_read",
3586
+ "tableTo": "threads",
3587
+ "columnsFrom": ["thread_id"],
3588
+ "columnsTo": ["id"],
3589
+ "onDelete": "cascade",
3590
+ "onUpdate": "no action"
3591
+ }
3592
+ },
3593
+ "compositePrimaryKeys": {},
3594
+ "uniqueConstraints": {},
3595
+ "policies": {},
3596
+ "checkConstraints": {},
3597
+ "isRLSEnabled": false
3598
+ },
3599
+ "public.admin_log": {
3600
+ "name": "admin_log",
3601
+ "schema": "",
3602
+ "columns": {
3603
+ "id": {
3604
+ "name": "id",
3605
+ "type": "integer",
3606
+ "primaryKey": true,
3607
+ "notNull": true,
3608
+ "identity": {
3609
+ "type": "byDefault",
3610
+ "name": "admin_log_id_seq",
3611
+ "schema": "public",
3612
+ "increment": "1",
3613
+ "startWith": "1",
3614
+ "minValue": "1",
3615
+ "maxValue": "2147483647",
3616
+ "cache": "1",
3617
+ "cycle": false
3618
+ }
3619
+ },
3620
+ "user_id": {
3621
+ "name": "user_id",
3622
+ "type": "integer",
3623
+ "primaryKey": false,
3624
+ "notNull": false
3625
+ },
3626
+ "action": {
3627
+ "name": "action",
3628
+ "type": "text",
3629
+ "primaryKey": false,
3630
+ "notNull": true
3631
+ },
3632
+ "detail": {
3633
+ "name": "detail",
3634
+ "type": "jsonb",
3635
+ "primaryKey": false,
3636
+ "notNull": true,
3637
+ "default": "'{}'::jsonb"
3638
+ },
3639
+ "ip_prefix": {
3640
+ "name": "ip_prefix",
3641
+ "type": "text",
3642
+ "primaryKey": false,
3643
+ "notNull": false
3644
+ },
3645
+ "correlation_id": {
3646
+ "name": "correlation_id",
3647
+ "type": "text",
3648
+ "primaryKey": false,
3649
+ "notNull": false
3650
+ },
3651
+ "created_at": {
3652
+ "name": "created_at",
3653
+ "type": "timestamp with time zone",
3654
+ "primaryKey": false,
3655
+ "notNull": true,
3656
+ "default": "now()"
3657
+ }
3658
+ },
3659
+ "indexes": {
3660
+ "admin_log_user_idx": {
3661
+ "name": "admin_log_user_idx",
3662
+ "columns": [
3663
+ {
3664
+ "expression": "user_id",
3665
+ "isExpression": false,
3666
+ "asc": true,
3667
+ "nulls": "last"
3668
+ },
3669
+ {
3670
+ "expression": "created_at",
3671
+ "isExpression": false,
3672
+ "asc": false,
3673
+ "nulls": "last"
3674
+ }
3675
+ ],
3676
+ "isUnique": false,
3677
+ "concurrently": false,
3678
+ "method": "btree",
3679
+ "with": {}
3680
+ },
3681
+ "admin_log_action_idx": {
3682
+ "name": "admin_log_action_idx",
3683
+ "columns": [
3684
+ {
3685
+ "expression": "action",
3686
+ "isExpression": false,
3687
+ "asc": true,
3688
+ "nulls": "last"
3689
+ },
3690
+ {
3691
+ "expression": "created_at",
3692
+ "isExpression": false,
3693
+ "asc": false,
3694
+ "nulls": "last"
3695
+ }
3696
+ ],
3697
+ "isUnique": false,
3698
+ "concurrently": false,
3699
+ "method": "btree",
3700
+ "with": {}
3701
+ }
3702
+ },
3703
+ "foreignKeys": {
3704
+ "admin_log_user_id_users_id_fk": {
3705
+ "name": "admin_log_user_id_users_id_fk",
3706
+ "tableFrom": "admin_log",
3707
+ "tableTo": "users",
3708
+ "columnsFrom": ["user_id"],
3709
+ "columnsTo": ["id"],
3710
+ "onDelete": "set null",
3711
+ "onUpdate": "no action"
3712
+ }
3713
+ },
3714
+ "compositePrimaryKeys": {},
3715
+ "uniqueConstraints": {},
3716
+ "policies": {},
3717
+ "checkConstraints": {},
3718
+ "isRLSEnabled": false
3719
+ },
3720
+ "public.cache_versions": {
3721
+ "name": "cache_versions",
3722
+ "schema": "",
3723
+ "columns": {
3724
+ "key": {
3725
+ "name": "key",
3726
+ "type": "text",
3727
+ "primaryKey": true,
3728
+ "notNull": true
3729
+ },
3730
+ "version": {
3731
+ "name": "version",
3732
+ "type": "integer",
3733
+ "primaryKey": false,
3734
+ "notNull": true,
3735
+ "default": 1
3736
+ },
3737
+ "bumped_at": {
3738
+ "name": "bumped_at",
3739
+ "type": "timestamp with time zone",
3740
+ "primaryKey": false,
3741
+ "notNull": true,
3742
+ "default": "now()"
3743
+ }
3744
+ },
3745
+ "indexes": {},
3746
+ "foreignKeys": {},
3747
+ "compositePrimaryKeys": {},
3748
+ "uniqueConstraints": {},
3749
+ "policies": {},
3750
+ "checkConstraints": {},
3751
+ "isRLSEnabled": false
3752
+ },
3753
+ "public.jobs": {
3754
+ "name": "jobs",
3755
+ "schema": "",
3756
+ "columns": {
3757
+ "id": {
3758
+ "name": "id",
3759
+ "type": "integer",
3760
+ "primaryKey": true,
3761
+ "notNull": true,
3762
+ "identity": {
3763
+ "type": "byDefault",
3764
+ "name": "jobs_id_seq",
3765
+ "schema": "public",
3766
+ "increment": "1",
3767
+ "startWith": "1",
3768
+ "minValue": "1",
3769
+ "maxValue": "2147483647",
3770
+ "cache": "1",
3771
+ "cycle": false
3772
+ }
3773
+ },
3774
+ "kind": {
3775
+ "name": "kind",
3776
+ "type": "text",
3777
+ "primaryKey": false,
3778
+ "notNull": true
3779
+ },
3780
+ "payload": {
3781
+ "name": "payload",
3782
+ "type": "jsonb",
3783
+ "primaryKey": false,
3784
+ "notNull": true,
3785
+ "default": "'{}'::jsonb"
3786
+ },
3787
+ "status": {
3788
+ "name": "status",
3789
+ "type": "text",
3790
+ "primaryKey": false,
3791
+ "notNull": true,
3792
+ "default": "'pending'"
3793
+ },
3794
+ "idempotency_key": {
3795
+ "name": "idempotency_key",
3796
+ "type": "text",
3797
+ "primaryKey": false,
3798
+ "notNull": false
3799
+ },
3800
+ "run_at": {
3801
+ "name": "run_at",
3802
+ "type": "timestamp with time zone",
3803
+ "primaryKey": false,
3804
+ "notNull": true,
3805
+ "default": "now()"
3806
+ },
3807
+ "attempts": {
3808
+ "name": "attempts",
3809
+ "type": "smallint",
3810
+ "primaryKey": false,
3811
+ "notNull": true,
3812
+ "default": 0
3813
+ },
3814
+ "max_attempts": {
3815
+ "name": "max_attempts",
3816
+ "type": "smallint",
3817
+ "primaryKey": false,
3818
+ "notNull": true,
3819
+ "default": 5
3820
+ },
3821
+ "locked_until": {
3822
+ "name": "locked_until",
3823
+ "type": "timestamp with time zone",
3824
+ "primaryKey": false,
3825
+ "notNull": false
3826
+ },
3827
+ "locked_by": {
3828
+ "name": "locked_by",
3829
+ "type": "text",
3830
+ "primaryKey": false,
3831
+ "notNull": false
3832
+ },
3833
+ "last_error": {
3834
+ "name": "last_error",
3835
+ "type": "text",
3836
+ "primaryKey": false,
3837
+ "notNull": false
3838
+ },
3839
+ "correlation_id": {
3840
+ "name": "correlation_id",
3841
+ "type": "text",
3842
+ "primaryKey": false,
3843
+ "notNull": false
3844
+ },
3845
+ "created_at": {
3846
+ "name": "created_at",
3847
+ "type": "timestamp with time zone",
3848
+ "primaryKey": false,
3849
+ "notNull": true,
3850
+ "default": "now()"
3851
+ },
3852
+ "completed_at": {
3853
+ "name": "completed_at",
3854
+ "type": "timestamp with time zone",
3855
+ "primaryKey": false,
3856
+ "notNull": false
3857
+ }
3858
+ },
3859
+ "indexes": {
3860
+ "jobs_pending_idx": {
3861
+ "name": "jobs_pending_idx",
3862
+ "columns": [
3863
+ {
3864
+ "expression": "status",
3865
+ "isExpression": false,
3866
+ "asc": true,
3867
+ "nulls": "last"
3868
+ },
3869
+ {
3870
+ "expression": "run_at",
3871
+ "isExpression": false,
3872
+ "asc": true,
3873
+ "nulls": "last"
3874
+ }
3875
+ ],
3876
+ "isUnique": false,
3877
+ "where": "\"jobs\".\"status\" = 'pending'",
3878
+ "concurrently": false,
3879
+ "method": "btree",
3880
+ "with": {}
3881
+ },
3882
+ "jobs_idempotency_key": {
3883
+ "name": "jobs_idempotency_key",
3884
+ "columns": [
3885
+ {
3886
+ "expression": "idempotency_key",
3887
+ "isExpression": false,
3888
+ "asc": true,
3889
+ "nulls": "last"
3890
+ }
3891
+ ],
3892
+ "isUnique": true,
3893
+ "where": "\"jobs\".\"idempotency_key\" is not null and \"jobs\".\"status\" = 'pending'",
3894
+ "concurrently": false,
3895
+ "method": "btree",
3896
+ "with": {}
3897
+ },
3898
+ "jobs_status_idx": {
3899
+ "name": "jobs_status_idx",
3900
+ "columns": [
3901
+ {
3902
+ "expression": "status",
3903
+ "isExpression": false,
3904
+ "asc": true,
3905
+ "nulls": "last"
3906
+ }
3907
+ ],
3908
+ "isUnique": false,
3909
+ "concurrently": false,
3910
+ "method": "btree",
3911
+ "with": {}
3912
+ }
3913
+ },
3914
+ "foreignKeys": {},
3915
+ "compositePrimaryKeys": {},
3916
+ "uniqueConstraints": {},
3917
+ "policies": {},
3918
+ "checkConstraints": {},
3919
+ "isRLSEnabled": false
3920
+ },
3921
+ "public.outbox": {
3922
+ "name": "outbox",
3923
+ "schema": "",
3924
+ "columns": {
3925
+ "id": {
3926
+ "name": "id",
3927
+ "type": "integer",
3928
+ "primaryKey": true,
3929
+ "notNull": true,
3930
+ "identity": {
3931
+ "type": "byDefault",
3932
+ "name": "outbox_id_seq",
3933
+ "schema": "public",
3934
+ "increment": "1",
3935
+ "startWith": "1",
3936
+ "minValue": "1",
3937
+ "maxValue": "2147483647",
3938
+ "cache": "1",
3939
+ "cycle": false
3940
+ }
3941
+ },
3942
+ "topic": {
3943
+ "name": "topic",
3944
+ "type": "text",
3945
+ "primaryKey": false,
3946
+ "notNull": true
3947
+ },
3948
+ "payload": {
3949
+ "name": "payload",
3950
+ "type": "jsonb",
3951
+ "primaryKey": false,
3952
+ "notNull": true
3953
+ },
3954
+ "correlation_id": {
3955
+ "name": "correlation_id",
3956
+ "type": "text",
3957
+ "primaryKey": false,
3958
+ "notNull": false
3959
+ },
3960
+ "dispatched_at": {
3961
+ "name": "dispatched_at",
3962
+ "type": "timestamp with time zone",
3963
+ "primaryKey": false,
3964
+ "notNull": false
3965
+ },
3966
+ "attempts": {
3967
+ "name": "attempts",
3968
+ "type": "smallint",
3969
+ "primaryKey": false,
3970
+ "notNull": true,
3971
+ "default": 0
3972
+ },
3973
+ "last_error": {
3974
+ "name": "last_error",
3975
+ "type": "text",
3976
+ "primaryKey": false,
3977
+ "notNull": false
3978
+ },
3979
+ "created_at": {
3980
+ "name": "created_at",
3981
+ "type": "timestamp with time zone",
3982
+ "primaryKey": false,
3983
+ "notNull": true,
3984
+ "default": "now()"
3985
+ }
3986
+ },
3987
+ "indexes": {
3988
+ "outbox_pending_idx": {
3989
+ "name": "outbox_pending_idx",
3990
+ "columns": [
3991
+ {
3992
+ "expression": "id",
3993
+ "isExpression": false,
3994
+ "asc": true,
3995
+ "nulls": "last"
3996
+ }
3997
+ ],
3998
+ "isUnique": false,
3999
+ "where": "\"outbox\".\"dispatched_at\" is null",
4000
+ "concurrently": false,
4001
+ "method": "btree",
4002
+ "with": {}
4003
+ }
4004
+ },
4005
+ "foreignKeys": {},
4006
+ "compositePrimaryKeys": {},
4007
+ "uniqueConstraints": {},
4008
+ "policies": {},
4009
+ "checkConstraints": {},
4010
+ "isRLSEnabled": false
4011
+ },
4012
+ "public.setting_groups": {
4013
+ "name": "setting_groups",
4014
+ "schema": "",
4015
+ "columns": {
4016
+ "id": {
4017
+ "name": "id",
4018
+ "type": "integer",
4019
+ "primaryKey": true,
4020
+ "notNull": true,
4021
+ "identity": {
4022
+ "type": "byDefault",
4023
+ "name": "setting_groups_id_seq",
4024
+ "schema": "public",
4025
+ "increment": "1",
4026
+ "startWith": "1",
4027
+ "minValue": "1",
4028
+ "maxValue": "2147483647",
4029
+ "cache": "1",
4030
+ "cycle": false
4031
+ }
4032
+ },
4033
+ "key": {
4034
+ "name": "key",
4035
+ "type": "text",
4036
+ "primaryKey": false,
4037
+ "notNull": true
4038
+ },
4039
+ "title": {
4040
+ "name": "title",
4041
+ "type": "text",
4042
+ "primaryKey": false,
4043
+ "notNull": true
4044
+ },
4045
+ "description": {
4046
+ "name": "description",
4047
+ "type": "text",
4048
+ "primaryKey": false,
4049
+ "notNull": false
4050
+ },
4051
+ "display_order": {
4052
+ "name": "display_order",
4053
+ "type": "integer",
4054
+ "primaryKey": false,
4055
+ "notNull": true,
4056
+ "default": 0
4057
+ }
4058
+ },
4059
+ "indexes": {
4060
+ "setting_groups_key_key": {
4061
+ "name": "setting_groups_key_key",
4062
+ "columns": [
4063
+ {
4064
+ "expression": "key",
4065
+ "isExpression": false,
4066
+ "asc": true,
4067
+ "nulls": "last"
4068
+ }
4069
+ ],
4070
+ "isUnique": true,
4071
+ "concurrently": false,
4072
+ "method": "btree",
4073
+ "with": {}
4074
+ }
4075
+ },
4076
+ "foreignKeys": {},
4077
+ "compositePrimaryKeys": {},
4078
+ "uniqueConstraints": {},
4079
+ "policies": {},
4080
+ "checkConstraints": {},
4081
+ "isRLSEnabled": false
4082
+ },
4083
+ "public.settings": {
4084
+ "name": "settings",
4085
+ "schema": "",
4086
+ "columns": {
4087
+ "key": {
4088
+ "name": "key",
4089
+ "type": "text",
4090
+ "primaryKey": true,
4091
+ "notNull": true
4092
+ },
4093
+ "value": {
4094
+ "name": "value",
4095
+ "type": "text",
4096
+ "primaryKey": false,
4097
+ "notNull": true
4098
+ },
4099
+ "group_key": {
4100
+ "name": "group_key",
4101
+ "type": "text",
4102
+ "primaryKey": false,
4103
+ "notNull": false
4104
+ },
4105
+ "updated_by_user_id": {
4106
+ "name": "updated_by_user_id",
4107
+ "type": "integer",
4108
+ "primaryKey": false,
4109
+ "notNull": false
4110
+ },
4111
+ "updated_at": {
4112
+ "name": "updated_at",
4113
+ "type": "timestamp with time zone",
4114
+ "primaryKey": false,
4115
+ "notNull": true,
4116
+ "default": "now()"
4117
+ }
4118
+ },
4119
+ "indexes": {
4120
+ "settings_group_idx": {
4121
+ "name": "settings_group_idx",
4122
+ "columns": [
4123
+ {
4124
+ "expression": "group_key",
4125
+ "isExpression": false,
4126
+ "asc": true,
4127
+ "nulls": "last"
4128
+ }
4129
+ ],
4130
+ "isUnique": false,
4131
+ "concurrently": false,
4132
+ "method": "btree",
4133
+ "with": {}
4134
+ }
4135
+ },
4136
+ "foreignKeys": {
4137
+ "settings_updated_by_user_id_users_id_fk": {
4138
+ "name": "settings_updated_by_user_id_users_id_fk",
4139
+ "tableFrom": "settings",
4140
+ "tableTo": "users",
4141
+ "columnsFrom": ["updated_by_user_id"],
4142
+ "columnsTo": ["id"],
4143
+ "onDelete": "set null",
4144
+ "onUpdate": "no action"
4145
+ }
4146
+ },
4147
+ "compositePrimaryKeys": {},
4148
+ "uniqueConstraints": {},
4149
+ "policies": {},
4150
+ "checkConstraints": {},
4151
+ "isRLSEnabled": false
4152
+ },
4153
+ "public.task_log": {
4154
+ "name": "task_log",
4155
+ "schema": "",
4156
+ "columns": {
4157
+ "id": {
4158
+ "name": "id",
4159
+ "type": "integer",
4160
+ "primaryKey": true,
4161
+ "notNull": true,
4162
+ "identity": {
4163
+ "type": "byDefault",
4164
+ "name": "task_log_id_seq",
4165
+ "schema": "public",
4166
+ "increment": "1",
4167
+ "startWith": "1",
4168
+ "minValue": "1",
4169
+ "maxValue": "2147483647",
4170
+ "cache": "1",
4171
+ "cycle": false
4172
+ }
4173
+ },
4174
+ "task_key": {
4175
+ "name": "task_key",
4176
+ "type": "text",
4177
+ "primaryKey": false,
4178
+ "notNull": true
4179
+ },
4180
+ "succeeded": {
4181
+ "name": "succeeded",
4182
+ "type": "boolean",
4183
+ "primaryKey": false,
4184
+ "notNull": true
4185
+ },
4186
+ "duration_ms": {
4187
+ "name": "duration_ms",
4188
+ "type": "integer",
4189
+ "primaryKey": false,
4190
+ "notNull": false
4191
+ },
4192
+ "detail": {
4193
+ "name": "detail",
4194
+ "type": "text",
4195
+ "primaryKey": false,
4196
+ "notNull": false
4197
+ },
4198
+ "error": {
4199
+ "name": "error",
4200
+ "type": "text",
4201
+ "primaryKey": false,
4202
+ "notNull": false
4203
+ },
4204
+ "ran_at": {
4205
+ "name": "ran_at",
4206
+ "type": "timestamp with time zone",
4207
+ "primaryKey": false,
4208
+ "notNull": true,
4209
+ "default": "now()"
4210
+ }
4211
+ },
4212
+ "indexes": {
4213
+ "task_log_key_ran_idx": {
4214
+ "name": "task_log_key_ran_idx",
4215
+ "columns": [
4216
+ {
4217
+ "expression": "task_key",
4218
+ "isExpression": false,
4219
+ "asc": true,
4220
+ "nulls": "last"
4221
+ },
4222
+ {
4223
+ "expression": "ran_at",
4224
+ "isExpression": false,
4225
+ "asc": false,
4226
+ "nulls": "last"
4227
+ }
4228
+ ],
4229
+ "isUnique": false,
4230
+ "concurrently": false,
4231
+ "method": "btree",
4232
+ "with": {}
4233
+ }
4234
+ },
4235
+ "foreignKeys": {},
4236
+ "compositePrimaryKeys": {},
4237
+ "uniqueConstraints": {},
4238
+ "policies": {},
4239
+ "checkConstraints": {},
4240
+ "isRLSEnabled": false
4241
+ },
4242
+ "public.tasks": {
4243
+ "name": "tasks",
4244
+ "schema": "",
4245
+ "columns": {
4246
+ "key": {
4247
+ "name": "key",
4248
+ "type": "text",
4249
+ "primaryKey": true,
4250
+ "notNull": true
4251
+ },
4252
+ "interval_seconds": {
4253
+ "name": "interval_seconds",
4254
+ "type": "integer",
4255
+ "primaryKey": false,
4256
+ "notNull": true
4257
+ },
4258
+ "enabled": {
4259
+ "name": "enabled",
4260
+ "type": "boolean",
4261
+ "primaryKey": false,
4262
+ "notNull": true,
4263
+ "default": true
4264
+ },
4265
+ "last_run_at": {
4266
+ "name": "last_run_at",
4267
+ "type": "timestamp with time zone",
4268
+ "primaryKey": false,
4269
+ "notNull": false
4270
+ },
4271
+ "next_run_at": {
4272
+ "name": "next_run_at",
4273
+ "type": "timestamp with time zone",
4274
+ "primaryKey": false,
4275
+ "notNull": true,
4276
+ "default": "now()"
4277
+ },
4278
+ "locked_until": {
4279
+ "name": "locked_until",
4280
+ "type": "timestamp with time zone",
4281
+ "primaryKey": false,
4282
+ "notNull": false
4283
+ },
4284
+ "consecutive_failures": {
4285
+ "name": "consecutive_failures",
4286
+ "type": "smallint",
4287
+ "primaryKey": false,
4288
+ "notNull": true,
4289
+ "default": 0
4290
+ }
4291
+ },
4292
+ "indexes": {
4293
+ "tasks_due_idx": {
4294
+ "name": "tasks_due_idx",
4295
+ "columns": [
4296
+ {
4297
+ "expression": "next_run_at",
4298
+ "isExpression": false,
4299
+ "asc": true,
4300
+ "nulls": "last"
4301
+ }
4302
+ ],
4303
+ "isUnique": false,
4304
+ "where": "\"tasks\".\"enabled\"",
4305
+ "concurrently": false,
4306
+ "method": "btree",
4307
+ "with": {}
4308
+ }
4309
+ },
4310
+ "foreignKeys": {},
4311
+ "compositePrimaryKeys": {},
4312
+ "uniqueConstraints": {},
4313
+ "policies": {},
4314
+ "checkConstraints": {},
4315
+ "isRLSEnabled": false
4316
+ },
4317
+ "public.themes": {
4318
+ "name": "themes",
4319
+ "schema": "",
4320
+ "columns": {
4321
+ "key": {
4322
+ "name": "key",
4323
+ "type": "text",
4324
+ "primaryKey": true,
4325
+ "notNull": true
4326
+ },
4327
+ "title": {
4328
+ "name": "title",
4329
+ "type": "text",
4330
+ "primaryKey": false,
4331
+ "notNull": true
4332
+ },
4333
+ "token_overrides": {
4334
+ "name": "token_overrides",
4335
+ "type": "jsonb",
4336
+ "primaryKey": false,
4337
+ "notNull": true,
4338
+ "default": "'{}'::jsonb"
4339
+ },
4340
+ "branding": {
4341
+ "name": "branding",
4342
+ "type": "jsonb",
4343
+ "primaryKey": false,
4344
+ "notNull": true,
4345
+ "default": "'{}'::jsonb"
4346
+ },
4347
+ "layout_options": {
4348
+ "name": "layout_options",
4349
+ "type": "jsonb",
4350
+ "primaryKey": false,
4351
+ "notNull": true,
4352
+ "default": "'{}'::jsonb"
4353
+ },
4354
+ "custom_css": {
4355
+ "name": "custom_css",
4356
+ "type": "text",
4357
+ "primaryKey": false,
4358
+ "notNull": false
4359
+ },
4360
+ "is_default": {
4361
+ "name": "is_default",
4362
+ "type": "boolean",
4363
+ "primaryKey": false,
4364
+ "notNull": true,
4365
+ "default": false
4366
+ },
4367
+ "updated_at": {
4368
+ "name": "updated_at",
4369
+ "type": "timestamp with time zone",
4370
+ "primaryKey": false,
4371
+ "notNull": true,
4372
+ "default": "now()"
4373
+ }
4374
+ },
4375
+ "indexes": {
4376
+ "themes_single_default_key": {
4377
+ "name": "themes_single_default_key",
4378
+ "columns": [
4379
+ {
4380
+ "expression": "is_default",
4381
+ "isExpression": false,
4382
+ "asc": true,
4383
+ "nulls": "last"
4384
+ }
4385
+ ],
4386
+ "isUnique": true,
4387
+ "where": "\"themes\".\"is_default\"",
4388
+ "concurrently": false,
4389
+ "method": "btree",
4390
+ "with": {}
4391
+ }
4392
+ },
4393
+ "foreignKeys": {},
4394
+ "compositePrimaryKeys": {},
4395
+ "uniqueConstraints": {},
4396
+ "policies": {},
4397
+ "checkConstraints": {},
4398
+ "isRLSEnabled": false
4399
+ }
4400
+ },
4401
+ "enums": {},
4402
+ "schemas": {},
4403
+ "sequences": {},
4404
+ "roles": {},
4405
+ "policies": {},
4406
+ "views": {},
4407
+ "_meta": {
4408
+ "columns": {},
4409
+ "schemas": {},
4410
+ "tables": {}
4411
+ }
4412
+ }