@drfed/models 0.0.0-stage → 0.1.0-dev.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 (132) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +230 -2
  3. package/dist/activity-delivery.d.mts +111 -0
  4. package/dist/activity-delivery.d.mts.map +1 -0
  5. package/dist/activity-delivery.mjs +240 -0
  6. package/dist/activity-delivery.mjs.map +1 -0
  7. package/dist/db-DtcLuISw.d.mts +3098 -0
  8. package/dist/db-DtcLuISw.d.mts.map +1 -0
  9. package/dist/db.d.mts +2 -0
  10. package/dist/db.mjs +3 -0
  11. package/dist/email.d.mts +39 -0
  12. package/dist/email.d.mts.map +1 -0
  13. package/dist/email.mjs +12 -0
  14. package/dist/email.mjs.map +1 -0
  15. package/dist/index.d.mts +14 -0
  16. package/dist/index.mjs +18 -0
  17. package/dist/instance.d.mts +11 -0
  18. package/dist/instance.d.mts.map +1 -0
  19. package/dist/instance.mjs +21 -0
  20. package/dist/instance.mjs.map +1 -0
  21. package/dist/key.d.mts +2 -0
  22. package/dist/key.mjs +86 -0
  23. package/dist/key.mjs.map +1 -0
  24. package/dist/login.d.mts +49 -0
  25. package/dist/login.d.mts.map +1 -0
  26. package/dist/login.mjs +71 -0
  27. package/dist/login.mjs.map +1 -0
  28. package/dist/migrate.d.mts +46 -0
  29. package/dist/migrate.d.mts.map +1 -0
  30. package/dist/migrate.mjs +58 -0
  31. package/dist/migrate.mjs.map +1 -0
  32. package/dist/migration-manifest.d.mts +39 -0
  33. package/dist/migration-manifest.d.mts.map +1 -0
  34. package/dist/migration-manifest.mjs +77 -0
  35. package/dist/migration-manifest.mjs.map +1 -0
  36. package/dist/migration-session-B4xHeU_a.d.mts +56 -0
  37. package/dist/migration-session-B4xHeU_a.d.mts.map +1 -0
  38. package/dist/migration-session.d.mts +2 -0
  39. package/dist/migration-session.mjs +204 -0
  40. package/dist/migration-session.mjs.map +1 -0
  41. package/dist/migration-snapshot-OM5jQN1-.mjs +69 -0
  42. package/dist/migration-snapshot-OM5jQN1-.mjs.map +1 -0
  43. package/dist/migration-state.d.mts +41 -0
  44. package/dist/migration-state.d.mts.map +1 -0
  45. package/dist/migration-state.mjs +155 -0
  46. package/dist/migration-state.mjs.map +1 -0
  47. package/dist/migrations-manifest.json +109 -0
  48. package/dist/pglite-preparation.d.mts +23 -0
  49. package/dist/pglite-preparation.d.mts.map +1 -0
  50. package/dist/pglite-preparation.mjs +77 -0
  51. package/dist/pglite-preparation.mjs.map +1 -0
  52. package/dist/pglite-store.d.mts +29 -0
  53. package/dist/pglite-store.d.mts.map +1 -0
  54. package/dist/pglite-store.mjs +117 -0
  55. package/dist/pglite-store.mjs.map +1 -0
  56. package/dist/relations.d.mts +2 -0
  57. package/dist/relations.mjs +307 -0
  58. package/dist/relations.mjs.map +1 -0
  59. package/dist/resource.d.mts +50 -0
  60. package/dist/resource.d.mts.map +1 -0
  61. package/dist/resource.mjs +123 -0
  62. package/dist/resource.mjs.map +1 -0
  63. package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
  64. package/dist/schema.d.mts +2 -0
  65. package/dist/schema.mjs +495 -0
  66. package/dist/schema.mjs.map +1 -0
  67. package/dist/slug.d.mts +28 -0
  68. package/dist/slug.d.mts.map +1 -0
  69. package/dist/slug.mjs +55 -0
  70. package/dist/slug.mjs.map +1 -0
  71. package/dist/text.d.mts +10 -0
  72. package/dist/text.d.mts.map +1 -0
  73. package/dist/text.mjs +11 -0
  74. package/dist/text.mjs.map +1 -0
  75. package/dist/uuid-CKMzlIND.d.mts +26 -0
  76. package/dist/uuid-CKMzlIND.d.mts.map +1 -0
  77. package/dist/uuid.d.mts +2 -0
  78. package/dist/uuid.mjs +28 -0
  79. package/dist/uuid.mjs.map +1 -0
  80. package/drizzle/20260622021748_init/migration.sql +25 -0
  81. package/drizzle/20260622021748_init/snapshot.json +246 -0
  82. package/drizzle/20260623162238_dear_felicia_hardy/migration.sql +5 -0
  83. package/drizzle/20260623162238_dear_felicia_hardy/snapshot.json +321 -0
  84. package/drizzle/20260624094817_lethal_sinister_six/migration.sql +2 -0
  85. package/drizzle/20260624094817_lethal_sinister_six/snapshot.json +347 -0
  86. package/drizzle/20260716000333_email_auth/migration.sql +20 -0
  87. package/drizzle/20260716000333_email_auth/snapshot.json +575 -0
  88. package/drizzle/20260723065002_chief_colleen_wing/migration.sql +2 -0
  89. package/drizzle/20260723065002_chief_colleen_wing/snapshot.json +595 -0
  90. package/drizzle/20260802205417_separate-instance-local-remote/migration.sql +26 -0
  91. package/drizzle/20260802205417_separate-instance-local-remote/snapshot.json +768 -0
  92. package/drizzle/20260804061119_instances-local-remote-constraint/migration.sql +7 -0
  93. package/drizzle/20260804061119_instances-local-remote-constraint/snapshot.json +843 -0
  94. package/drizzle/20260818080259_dark_night_thrasher/migration.sql +15 -0
  95. package/drizzle/20260818080259_dark_night_thrasher/snapshot.json +722 -0
  96. package/drizzle/20260821072150_merge_remote_actors/migration.sql +54 -0
  97. package/drizzle/20260821072150_merge_remote_actors/snapshot.json +1312 -0
  98. package/drizzle/20260906052949_rename_followees_to_following/migration.sql +2 -0
  99. package/drizzle/20260906052949_rename_followees_to_following/snapshot.json +1315 -0
  100. package/drizzle/20260908062446_rename_login_tokens_to_login_challenges/migration.sql +1 -0
  101. package/drizzle/20260908062446_rename_login_tokens_to_login_challenges/snapshot.json +1312 -0
  102. package/drizzle/20260908065945_simplify_login_challenges/migration.sql +7 -0
  103. package/drizzle/20260908065945_simplify_login_challenges/snapshot.json +1290 -0
  104. package/drizzle/20260915061356_tighten_slug_constraint/migration.sql +12 -0
  105. package/drizzle/20260915061356_tighten_slug_constraint/snapshot.json +1290 -0
  106. package/drizzle/20260915063339_widen_instance_host/migration.sql +1 -0
  107. package/drizzle/20260915063339_widen_instance_host/snapshot.json +1290 -0
  108. package/drizzle/20260916085902_add_objects_activities_and_resources/migration.sql +110 -0
  109. package/drizzle/20260916085902_add_objects_activities_and_resources/snapshot.json +2263 -0
  110. package/drizzle/20260917163517_order_local_outbox_items/migration.sql +22 -0
  111. package/drizzle/20260917163517_order_local_outbox_items/snapshot.json +2263 -0
  112. package/drizzle/20260918071839_add_activity_object_index/migration.sql +1 -0
  113. package/drizzle/20260918071839_add_activity_object_index/snapshot.json +2298 -0
  114. package/drizzle/20261006061745_add_activity_deliveries_and_keys/migration.sql +106 -0
  115. package/drizzle/20261006061745_add_activity_deliveries_and_keys/snapshot.json +3538 -0
  116. package/drizzle/20261006085045_snake_case_columns/migration.sql +42 -0
  117. package/drizzle/20261006085045_snake_case_columns/snapshot.json +3570 -0
  118. package/drizzle/20261006122653_local_actor_keys/migration.sql +11 -0
  119. package/drizzle/20261006122653_local_actor_keys/snapshot.json +3627 -0
  120. package/drizzle/20261010044954_link_activity_deliveries_to_activities/migration.sql +8 -0
  121. package/drizzle/20261010044954_link_activity_deliveries_to_activities/snapshot.json +3714 -0
  122. package/drizzle/20261010073134_check_inbound_activity_link/migration.sql +1 -0
  123. package/drizzle/20261010073134_check_inbound_activity_link/snapshot.json +3721 -0
  124. package/drizzle/20261010104304_record_object_activity/migration.sql +3 -0
  125. package/drizzle/20261010104304_record_object_activity/snapshot.json +3756 -0
  126. package/drizzle/20261010111648_record_delivery_snapshot/migration.sql +29 -0
  127. package/drizzle/20261010111648_record_delivery_snapshot/snapshot.json +3769 -0
  128. package/drizzle/20261011144453_record_object_snapshot/migration.sql +10 -0
  129. package/drizzle/20261011144453_record_object_snapshot/snapshot.json +3808 -0
  130. package/drizzle/20261011192718_record_actor_followers/migration.sql +1 -0
  131. package/drizzle/20261011192718_record_actor_followers/snapshot.json +3821 -0
  132. package/package.json +181 -3
@@ -0,0 +1,1290 @@
1
+ {
2
+ "version": "8",
3
+ "dialect": "postgres",
4
+ "id": "3d7bb672-489b-4d1e-8efb-e602d21f6e98",
5
+ "prevIds": ["3fa6e5ee-351d-4f75-aa0c-4ce9767f269e"],
6
+ "ddl": [
7
+ {
8
+ "values": ["Application", "Group", "Organization", "Person", "Service"],
9
+ "name": "actor_type",
10
+ "entityType": "enums",
11
+ "schema": "public"
12
+ },
13
+ {
14
+ "isRlsEnabled": false,
15
+ "name": "accounts",
16
+ "entityType": "tables",
17
+ "schema": "public"
18
+ },
19
+ {
20
+ "isRlsEnabled": false,
21
+ "name": "actors",
22
+ "entityType": "tables",
23
+ "schema": "public"
24
+ },
25
+ {
26
+ "isRlsEnabled": false,
27
+ "name": "instance_members",
28
+ "entityType": "tables",
29
+ "schema": "public"
30
+ },
31
+ {
32
+ "isRlsEnabled": false,
33
+ "name": "instances",
34
+ "entityType": "tables",
35
+ "schema": "public"
36
+ },
37
+ {
38
+ "isRlsEnabled": false,
39
+ "name": "local_actors",
40
+ "entityType": "tables",
41
+ "schema": "public"
42
+ },
43
+ {
44
+ "isRlsEnabled": false,
45
+ "name": "local_instances",
46
+ "entityType": "tables",
47
+ "schema": "public"
48
+ },
49
+ {
50
+ "isRlsEnabled": false,
51
+ "name": "login_challenges",
52
+ "entityType": "tables",
53
+ "schema": "public"
54
+ },
55
+ {
56
+ "isRlsEnabled": false,
57
+ "name": "sessions",
58
+ "entityType": "tables",
59
+ "schema": "public"
60
+ },
61
+ {
62
+ "type": "uuid",
63
+ "typeSchema": null,
64
+ "notNull": true,
65
+ "dimensions": 0,
66
+ "default": null,
67
+ "generated": null,
68
+ "identity": null,
69
+ "name": "id",
70
+ "entityType": "columns",
71
+ "schema": "public",
72
+ "table": "accounts"
73
+ },
74
+ {
75
+ "type": "varchar(255)",
76
+ "typeSchema": null,
77
+ "notNull": true,
78
+ "dimensions": 0,
79
+ "default": null,
80
+ "generated": null,
81
+ "identity": null,
82
+ "name": "email",
83
+ "entityType": "columns",
84
+ "schema": "public",
85
+ "table": "accounts"
86
+ },
87
+ {
88
+ "type": "varchar(100)",
89
+ "typeSchema": null,
90
+ "notNull": true,
91
+ "dimensions": 0,
92
+ "default": null,
93
+ "generated": null,
94
+ "identity": null,
95
+ "name": "name",
96
+ "entityType": "columns",
97
+ "schema": "public",
98
+ "table": "accounts"
99
+ },
100
+ {
101
+ "type": "integer",
102
+ "typeSchema": null,
103
+ "notNull": true,
104
+ "dimensions": 0,
105
+ "default": "10",
106
+ "generated": null,
107
+ "identity": null,
108
+ "name": "max_instances",
109
+ "entityType": "columns",
110
+ "schema": "public",
111
+ "table": "accounts"
112
+ },
113
+ {
114
+ "type": "boolean",
115
+ "typeSchema": null,
116
+ "notNull": true,
117
+ "dimensions": 0,
118
+ "default": "false",
119
+ "generated": null,
120
+ "identity": null,
121
+ "name": "admin",
122
+ "entityType": "columns",
123
+ "schema": "public",
124
+ "table": "accounts"
125
+ },
126
+ {
127
+ "type": "timestamp with time zone",
128
+ "typeSchema": null,
129
+ "notNull": true,
130
+ "dimensions": 0,
131
+ "default": "CURRENT_TIMESTAMP",
132
+ "generated": null,
133
+ "identity": null,
134
+ "name": "created",
135
+ "entityType": "columns",
136
+ "schema": "public",
137
+ "table": "accounts"
138
+ },
139
+ {
140
+ "type": "uuid",
141
+ "typeSchema": null,
142
+ "notNull": true,
143
+ "dimensions": 0,
144
+ "default": null,
145
+ "generated": null,
146
+ "identity": null,
147
+ "name": "id",
148
+ "entityType": "columns",
149
+ "schema": "public",
150
+ "table": "actors"
151
+ },
152
+ {
153
+ "type": "uuid",
154
+ "typeSchema": null,
155
+ "notNull": false,
156
+ "dimensions": 0,
157
+ "default": null,
158
+ "generated": null,
159
+ "identity": null,
160
+ "name": "localId",
161
+ "entityType": "columns",
162
+ "schema": "public",
163
+ "table": "actors"
164
+ },
165
+ {
166
+ "type": "actor_type",
167
+ "typeSchema": "public",
168
+ "notNull": true,
169
+ "dimensions": 0,
170
+ "default": null,
171
+ "generated": null,
172
+ "identity": null,
173
+ "name": "type",
174
+ "entityType": "columns",
175
+ "schema": "public",
176
+ "table": "actors"
177
+ },
178
+ {
179
+ "type": "text",
180
+ "typeSchema": null,
181
+ "notNull": true,
182
+ "dimensions": 0,
183
+ "default": null,
184
+ "generated": null,
185
+ "identity": null,
186
+ "name": "username",
187
+ "entityType": "columns",
188
+ "schema": "public",
189
+ "table": "actors"
190
+ },
191
+ {
192
+ "type": "uuid",
193
+ "typeSchema": null,
194
+ "notNull": true,
195
+ "dimensions": 0,
196
+ "default": null,
197
+ "generated": null,
198
+ "identity": null,
199
+ "name": "instanceId",
200
+ "entityType": "columns",
201
+ "schema": "public",
202
+ "table": "actors"
203
+ },
204
+ {
205
+ "type": "text",
206
+ "typeSchema": null,
207
+ "notNull": true,
208
+ "dimensions": 0,
209
+ "default": null,
210
+ "generated": null,
211
+ "identity": null,
212
+ "name": "iri",
213
+ "entityType": "columns",
214
+ "schema": "public",
215
+ "table": "actors"
216
+ },
217
+ {
218
+ "type": "text",
219
+ "typeSchema": null,
220
+ "notNull": true,
221
+ "dimensions": 0,
222
+ "default": null,
223
+ "generated": null,
224
+ "identity": null,
225
+ "name": "inboxUrl",
226
+ "entityType": "columns",
227
+ "schema": "public",
228
+ "table": "actors"
229
+ },
230
+ {
231
+ "type": "text",
232
+ "typeSchema": null,
233
+ "notNull": true,
234
+ "dimensions": 0,
235
+ "default": null,
236
+ "generated": null,
237
+ "identity": null,
238
+ "name": "outboxUrl",
239
+ "entityType": "columns",
240
+ "schema": "public",
241
+ "table": "actors"
242
+ },
243
+ {
244
+ "type": "text",
245
+ "typeSchema": null,
246
+ "notNull": false,
247
+ "dimensions": 0,
248
+ "default": null,
249
+ "generated": null,
250
+ "identity": null,
251
+ "name": "followersUrl",
252
+ "entityType": "columns",
253
+ "schema": "public",
254
+ "table": "actors"
255
+ },
256
+ {
257
+ "type": "text",
258
+ "typeSchema": null,
259
+ "notNull": false,
260
+ "dimensions": 0,
261
+ "default": null,
262
+ "generated": null,
263
+ "identity": null,
264
+ "name": "followingUrl",
265
+ "entityType": "columns",
266
+ "schema": "public",
267
+ "table": "actors"
268
+ },
269
+ {
270
+ "type": "text",
271
+ "typeSchema": null,
272
+ "notNull": false,
273
+ "dimensions": 0,
274
+ "default": null,
275
+ "generated": null,
276
+ "identity": null,
277
+ "name": "featuredUrl",
278
+ "entityType": "columns",
279
+ "schema": "public",
280
+ "table": "actors"
281
+ },
282
+ {
283
+ "type": "text",
284
+ "typeSchema": null,
285
+ "notNull": false,
286
+ "dimensions": 0,
287
+ "default": null,
288
+ "generated": null,
289
+ "identity": null,
290
+ "name": "profileUrl",
291
+ "entityType": "columns",
292
+ "schema": "public",
293
+ "table": "actors"
294
+ },
295
+ {
296
+ "type": "text",
297
+ "typeSchema": null,
298
+ "notNull": false,
299
+ "dimensions": 0,
300
+ "default": null,
301
+ "generated": null,
302
+ "identity": null,
303
+ "name": "avatarUrl",
304
+ "entityType": "columns",
305
+ "schema": "public",
306
+ "table": "actors"
307
+ },
308
+ {
309
+ "type": "text",
310
+ "typeSchema": null,
311
+ "notNull": false,
312
+ "dimensions": 0,
313
+ "default": null,
314
+ "generated": null,
315
+ "identity": null,
316
+ "name": "headerUrl",
317
+ "entityType": "columns",
318
+ "schema": "public",
319
+ "table": "actors"
320
+ },
321
+ {
322
+ "type": "text",
323
+ "typeSchema": null,
324
+ "notNull": false,
325
+ "dimensions": 0,
326
+ "default": null,
327
+ "generated": null,
328
+ "identity": null,
329
+ "name": "name",
330
+ "entityType": "columns",
331
+ "schema": "public",
332
+ "table": "actors"
333
+ },
334
+ {
335
+ "type": "text",
336
+ "typeSchema": null,
337
+ "notNull": false,
338
+ "dimensions": 0,
339
+ "default": null,
340
+ "generated": null,
341
+ "identity": null,
342
+ "name": "bioHtml",
343
+ "entityType": "columns",
344
+ "schema": "public",
345
+ "table": "actors"
346
+ },
347
+ {
348
+ "type": "boolean",
349
+ "typeSchema": null,
350
+ "notNull": true,
351
+ "dimensions": 0,
352
+ "default": "false",
353
+ "generated": null,
354
+ "identity": null,
355
+ "name": "automaticallyApprovesFollowers",
356
+ "entityType": "columns",
357
+ "schema": "public",
358
+ "table": "actors"
359
+ },
360
+ {
361
+ "type": "jsonb",
362
+ "typeSchema": null,
363
+ "notNull": true,
364
+ "dimensions": 0,
365
+ "default": "'{}'",
366
+ "generated": null,
367
+ "identity": null,
368
+ "name": "fieldHtmls",
369
+ "entityType": "columns",
370
+ "schema": "public",
371
+ "table": "actors"
372
+ },
373
+ {
374
+ "type": "jsonb",
375
+ "typeSchema": null,
376
+ "notNull": true,
377
+ "dimensions": 0,
378
+ "default": "'{}'",
379
+ "generated": null,
380
+ "identity": null,
381
+ "name": "emojis",
382
+ "entityType": "columns",
383
+ "schema": "public",
384
+ "table": "actors"
385
+ },
386
+ {
387
+ "type": "jsonb",
388
+ "typeSchema": null,
389
+ "notNull": true,
390
+ "dimensions": 0,
391
+ "default": "'{}'",
392
+ "generated": null,
393
+ "identity": null,
394
+ "name": "tags",
395
+ "entityType": "columns",
396
+ "schema": "public",
397
+ "table": "actors"
398
+ },
399
+ {
400
+ "type": "boolean",
401
+ "typeSchema": null,
402
+ "notNull": true,
403
+ "dimensions": 0,
404
+ "default": "false",
405
+ "generated": null,
406
+ "identity": null,
407
+ "name": "sensitive",
408
+ "entityType": "columns",
409
+ "schema": "public",
410
+ "table": "actors"
411
+ },
412
+ {
413
+ "type": "timestamp with time zone",
414
+ "typeSchema": null,
415
+ "notNull": false,
416
+ "dimensions": 0,
417
+ "default": null,
418
+ "generated": null,
419
+ "identity": null,
420
+ "name": "suspended",
421
+ "entityType": "columns",
422
+ "schema": "public",
423
+ "table": "actors"
424
+ },
425
+ {
426
+ "type": "timestamp with time zone",
427
+ "typeSchema": null,
428
+ "notNull": false,
429
+ "dimensions": 0,
430
+ "default": null,
431
+ "generated": null,
432
+ "identity": null,
433
+ "name": "suspendedUntil",
434
+ "entityType": "columns",
435
+ "schema": "public",
436
+ "table": "actors"
437
+ },
438
+ {
439
+ "type": "uuid",
440
+ "typeSchema": null,
441
+ "notNull": false,
442
+ "dimensions": 0,
443
+ "default": null,
444
+ "generated": null,
445
+ "identity": null,
446
+ "name": "successorId",
447
+ "entityType": "columns",
448
+ "schema": "public",
449
+ "table": "actors"
450
+ },
451
+ {
452
+ "type": "text",
453
+ "typeSchema": null,
454
+ "notNull": true,
455
+ "dimensions": 1,
456
+ "default": "(ARRAY[]::text[])",
457
+ "generated": null,
458
+ "identity": null,
459
+ "name": "aliases",
460
+ "entityType": "columns",
461
+ "schema": "public",
462
+ "table": "actors"
463
+ },
464
+ {
465
+ "type": "integer",
466
+ "typeSchema": null,
467
+ "notNull": true,
468
+ "dimensions": 0,
469
+ "default": "0",
470
+ "generated": null,
471
+ "identity": null,
472
+ "name": "followingCount",
473
+ "entityType": "columns",
474
+ "schema": "public",
475
+ "table": "actors"
476
+ },
477
+ {
478
+ "type": "integer",
479
+ "typeSchema": null,
480
+ "notNull": true,
481
+ "dimensions": 0,
482
+ "default": "0",
483
+ "generated": null,
484
+ "identity": null,
485
+ "name": "followersCount",
486
+ "entityType": "columns",
487
+ "schema": "public",
488
+ "table": "actors"
489
+ },
490
+ {
491
+ "type": "integer",
492
+ "typeSchema": null,
493
+ "notNull": true,
494
+ "dimensions": 0,
495
+ "default": "0",
496
+ "generated": null,
497
+ "identity": null,
498
+ "name": "postsCount",
499
+ "entityType": "columns",
500
+ "schema": "public",
501
+ "table": "actors"
502
+ },
503
+ {
504
+ "type": "timestamp with time zone",
505
+ "typeSchema": null,
506
+ "notNull": true,
507
+ "dimensions": 0,
508
+ "default": "CURRENT_TIMESTAMP",
509
+ "generated": null,
510
+ "identity": null,
511
+ "name": "updated",
512
+ "entityType": "columns",
513
+ "schema": "public",
514
+ "table": "actors"
515
+ },
516
+ {
517
+ "type": "timestamp with time zone",
518
+ "typeSchema": null,
519
+ "notNull": false,
520
+ "dimensions": 0,
521
+ "default": null,
522
+ "generated": null,
523
+ "identity": null,
524
+ "name": "published",
525
+ "entityType": "columns",
526
+ "schema": "public",
527
+ "table": "actors"
528
+ },
529
+ {
530
+ "type": "timestamp with time zone",
531
+ "typeSchema": null,
532
+ "notNull": true,
533
+ "dimensions": 0,
534
+ "default": "CURRENT_TIMESTAMP",
535
+ "generated": null,
536
+ "identity": null,
537
+ "name": "created",
538
+ "entityType": "columns",
539
+ "schema": "public",
540
+ "table": "actors"
541
+ },
542
+ {
543
+ "type": "timestamp with time zone",
544
+ "typeSchema": null,
545
+ "notNull": false,
546
+ "dimensions": 0,
547
+ "default": null,
548
+ "generated": null,
549
+ "identity": null,
550
+ "name": "deleted",
551
+ "entityType": "columns",
552
+ "schema": "public",
553
+ "table": "actors"
554
+ },
555
+ {
556
+ "type": "uuid",
557
+ "typeSchema": null,
558
+ "notNull": true,
559
+ "dimensions": 0,
560
+ "default": null,
561
+ "generated": null,
562
+ "identity": null,
563
+ "name": "accountId",
564
+ "entityType": "columns",
565
+ "schema": "public",
566
+ "table": "instance_members"
567
+ },
568
+ {
569
+ "type": "uuid",
570
+ "typeSchema": null,
571
+ "notNull": true,
572
+ "dimensions": 0,
573
+ "default": null,
574
+ "generated": null,
575
+ "identity": null,
576
+ "name": "instanceId",
577
+ "entityType": "columns",
578
+ "schema": "public",
579
+ "table": "instance_members"
580
+ },
581
+ {
582
+ "type": "boolean",
583
+ "typeSchema": null,
584
+ "notNull": true,
585
+ "dimensions": 0,
586
+ "default": "false",
587
+ "generated": null,
588
+ "identity": null,
589
+ "name": "admin",
590
+ "entityType": "columns",
591
+ "schema": "public",
592
+ "table": "instance_members"
593
+ },
594
+ {
595
+ "type": "timestamp with time zone",
596
+ "typeSchema": null,
597
+ "notNull": false,
598
+ "dimensions": 0,
599
+ "default": null,
600
+ "generated": null,
601
+ "identity": null,
602
+ "name": "accepted",
603
+ "entityType": "columns",
604
+ "schema": "public",
605
+ "table": "instance_members"
606
+ },
607
+ {
608
+ "type": "timestamp with time zone",
609
+ "typeSchema": null,
610
+ "notNull": true,
611
+ "dimensions": 0,
612
+ "default": "CURRENT_TIMESTAMP",
613
+ "generated": null,
614
+ "identity": null,
615
+ "name": "created",
616
+ "entityType": "columns",
617
+ "schema": "public",
618
+ "table": "instance_members"
619
+ },
620
+ {
621
+ "type": "uuid",
622
+ "typeSchema": null,
623
+ "notNull": true,
624
+ "dimensions": 0,
625
+ "default": null,
626
+ "generated": null,
627
+ "identity": null,
628
+ "name": "id",
629
+ "entityType": "columns",
630
+ "schema": "public",
631
+ "table": "instances"
632
+ },
633
+ {
634
+ "type": "uuid",
635
+ "typeSchema": null,
636
+ "notNull": false,
637
+ "dimensions": 0,
638
+ "default": null,
639
+ "generated": null,
640
+ "identity": null,
641
+ "name": "localId",
642
+ "entityType": "columns",
643
+ "schema": "public",
644
+ "table": "instances"
645
+ },
646
+ {
647
+ "type": "timestamp with time zone",
648
+ "typeSchema": null,
649
+ "notNull": true,
650
+ "dimensions": 0,
651
+ "default": "CURRENT_TIMESTAMP",
652
+ "generated": null,
653
+ "identity": null,
654
+ "name": "created",
655
+ "entityType": "columns",
656
+ "schema": "public",
657
+ "table": "instances"
658
+ },
659
+ {
660
+ "type": "varchar(100)",
661
+ "typeSchema": null,
662
+ "notNull": true,
663
+ "dimensions": 0,
664
+ "default": null,
665
+ "generated": null,
666
+ "identity": null,
667
+ "name": "host",
668
+ "entityType": "columns",
669
+ "schema": "public",
670
+ "table": "instances"
671
+ },
672
+ {
673
+ "type": "text",
674
+ "typeSchema": null,
675
+ "notNull": false,
676
+ "dimensions": 0,
677
+ "default": null,
678
+ "generated": null,
679
+ "identity": null,
680
+ "name": "nodeInfoUrl",
681
+ "entityType": "columns",
682
+ "schema": "public",
683
+ "table": "instances"
684
+ },
685
+ {
686
+ "type": "text",
687
+ "typeSchema": null,
688
+ "notNull": false,
689
+ "dimensions": 0,
690
+ "default": null,
691
+ "generated": null,
692
+ "identity": null,
693
+ "name": "software",
694
+ "entityType": "columns",
695
+ "schema": "public",
696
+ "table": "instances"
697
+ },
698
+ {
699
+ "type": "text",
700
+ "typeSchema": null,
701
+ "notNull": false,
702
+ "dimensions": 0,
703
+ "default": null,
704
+ "generated": null,
705
+ "identity": null,
706
+ "name": "softwareVersion",
707
+ "entityType": "columns",
708
+ "schema": "public",
709
+ "table": "instances"
710
+ },
711
+ {
712
+ "type": "uuid",
713
+ "typeSchema": null,
714
+ "notNull": true,
715
+ "dimensions": 0,
716
+ "default": null,
717
+ "generated": null,
718
+ "identity": null,
719
+ "name": "id",
720
+ "entityType": "columns",
721
+ "schema": "public",
722
+ "table": "local_actors"
723
+ },
724
+ {
725
+ "type": "text",
726
+ "typeSchema": null,
727
+ "notNull": false,
728
+ "dimensions": 0,
729
+ "default": null,
730
+ "generated": null,
731
+ "identity": null,
732
+ "name": "avatar",
733
+ "entityType": "columns",
734
+ "schema": "public",
735
+ "table": "local_actors"
736
+ },
737
+ {
738
+ "type": "text",
739
+ "typeSchema": null,
740
+ "notNull": false,
741
+ "dimensions": 0,
742
+ "default": null,
743
+ "generated": null,
744
+ "identity": null,
745
+ "name": "header",
746
+ "entityType": "columns",
747
+ "schema": "public",
748
+ "table": "local_actors"
749
+ },
750
+ {
751
+ "type": "uuid",
752
+ "typeSchema": null,
753
+ "notNull": true,
754
+ "dimensions": 0,
755
+ "default": null,
756
+ "generated": null,
757
+ "identity": null,
758
+ "name": "id",
759
+ "entityType": "columns",
760
+ "schema": "public",
761
+ "table": "local_instances"
762
+ },
763
+ {
764
+ "type": "varchar(63)",
765
+ "typeSchema": null,
766
+ "notNull": true,
767
+ "dimensions": 0,
768
+ "default": null,
769
+ "generated": null,
770
+ "identity": null,
771
+ "name": "slug",
772
+ "entityType": "columns",
773
+ "schema": "public",
774
+ "table": "local_instances"
775
+ },
776
+ {
777
+ "type": "timestamp with time zone",
778
+ "typeSchema": null,
779
+ "notNull": true,
780
+ "dimensions": 0,
781
+ "default": null,
782
+ "generated": null,
783
+ "identity": null,
784
+ "name": "expires",
785
+ "entityType": "columns",
786
+ "schema": "public",
787
+ "table": "local_instances"
788
+ },
789
+ {
790
+ "type": "integer",
791
+ "typeSchema": null,
792
+ "notNull": true,
793
+ "dimensions": 0,
794
+ "default": "10",
795
+ "generated": null,
796
+ "identity": null,
797
+ "name": "maxActors",
798
+ "entityType": "columns",
799
+ "schema": "public",
800
+ "table": "local_instances"
801
+ },
802
+ {
803
+ "type": "uuid",
804
+ "typeSchema": null,
805
+ "notNull": true,
806
+ "dimensions": 0,
807
+ "default": null,
808
+ "generated": null,
809
+ "identity": null,
810
+ "name": "id",
811
+ "entityType": "columns",
812
+ "schema": "public",
813
+ "table": "login_challenges"
814
+ },
815
+ {
816
+ "type": "uuid",
817
+ "typeSchema": null,
818
+ "notNull": true,
819
+ "dimensions": 0,
820
+ "default": null,
821
+ "generated": null,
822
+ "identity": null,
823
+ "name": "accountId",
824
+ "entityType": "columns",
825
+ "schema": "public",
826
+ "table": "login_challenges"
827
+ },
828
+ {
829
+ "type": "char(6)",
830
+ "typeSchema": null,
831
+ "notNull": true,
832
+ "dimensions": 0,
833
+ "default": null,
834
+ "generated": null,
835
+ "identity": null,
836
+ "name": "code",
837
+ "entityType": "columns",
838
+ "schema": "public",
839
+ "table": "login_challenges"
840
+ },
841
+ {
842
+ "type": "timestamp with time zone",
843
+ "typeSchema": null,
844
+ "notNull": true,
845
+ "dimensions": 0,
846
+ "default": "CURRENT_TIMESTAMP",
847
+ "generated": null,
848
+ "identity": null,
849
+ "name": "created",
850
+ "entityType": "columns",
851
+ "schema": "public",
852
+ "table": "login_challenges"
853
+ },
854
+ {
855
+ "type": "timestamp with time zone",
856
+ "typeSchema": null,
857
+ "notNull": true,
858
+ "dimensions": 0,
859
+ "default": "CURRENT_TIMESTAMP + INTERVAL '15 minutes'",
860
+ "generated": null,
861
+ "identity": null,
862
+ "name": "expires",
863
+ "entityType": "columns",
864
+ "schema": "public",
865
+ "table": "login_challenges"
866
+ },
867
+ {
868
+ "type": "timestamp with time zone",
869
+ "typeSchema": null,
870
+ "notNull": false,
871
+ "dimensions": 0,
872
+ "default": null,
873
+ "generated": null,
874
+ "identity": null,
875
+ "name": "consumed",
876
+ "entityType": "columns",
877
+ "schema": "public",
878
+ "table": "login_challenges"
879
+ },
880
+ {
881
+ "type": "uuid",
882
+ "typeSchema": null,
883
+ "notNull": true,
884
+ "dimensions": 0,
885
+ "default": null,
886
+ "generated": null,
887
+ "identity": null,
888
+ "name": "id",
889
+ "entityType": "columns",
890
+ "schema": "public",
891
+ "table": "sessions"
892
+ },
893
+ {
894
+ "type": "uuid",
895
+ "typeSchema": null,
896
+ "notNull": true,
897
+ "dimensions": 0,
898
+ "default": null,
899
+ "generated": null,
900
+ "identity": null,
901
+ "name": "accountId",
902
+ "entityType": "columns",
903
+ "schema": "public",
904
+ "table": "sessions"
905
+ },
906
+ {
907
+ "type": "varchar(64)",
908
+ "typeSchema": null,
909
+ "notNull": true,
910
+ "dimensions": 0,
911
+ "default": null,
912
+ "generated": null,
913
+ "identity": null,
914
+ "name": "tokenHash",
915
+ "entityType": "columns",
916
+ "schema": "public",
917
+ "table": "sessions"
918
+ },
919
+ {
920
+ "type": "timestamp with time zone",
921
+ "typeSchema": null,
922
+ "notNull": true,
923
+ "dimensions": 0,
924
+ "default": "CURRENT_TIMESTAMP",
925
+ "generated": null,
926
+ "identity": null,
927
+ "name": "created",
928
+ "entityType": "columns",
929
+ "schema": "public",
930
+ "table": "sessions"
931
+ },
932
+ {
933
+ "type": "timestamp with time zone",
934
+ "typeSchema": null,
935
+ "notNull": true,
936
+ "dimensions": 0,
937
+ "default": "CURRENT_TIMESTAMP + INTERVAL '1 month'",
938
+ "generated": null,
939
+ "identity": null,
940
+ "name": "expires",
941
+ "entityType": "columns",
942
+ "schema": "public",
943
+ "table": "sessions"
944
+ },
945
+ {
946
+ "nameExplicit": true,
947
+ "columns": [
948
+ {
949
+ "value": "instanceId",
950
+ "isExpression": false,
951
+ "asc": true,
952
+ "nullsFirst": false,
953
+ "opclass": null
954
+ }
955
+ ],
956
+ "isUnique": false,
957
+ "where": null,
958
+ "with": "",
959
+ "method": "btree",
960
+ "concurrently": false,
961
+ "name": "actor_instance_index",
962
+ "entityType": "indexes",
963
+ "schema": "public",
964
+ "table": "actors"
965
+ },
966
+ {
967
+ "nameExplicit": false,
968
+ "columns": [
969
+ {
970
+ "value": "accountId",
971
+ "isExpression": false,
972
+ "asc": true,
973
+ "nullsFirst": false,
974
+ "opclass": null
975
+ }
976
+ ],
977
+ "isUnique": false,
978
+ "where": "\"accepted\" IS NOT NULL",
979
+ "with": "",
980
+ "method": "btree",
981
+ "concurrently": false,
982
+ "name": "instance_members_accountId_index",
983
+ "entityType": "indexes",
984
+ "schema": "public",
985
+ "table": "instance_members"
986
+ },
987
+ {
988
+ "nameExplicit": false,
989
+ "columns": [
990
+ {
991
+ "value": "instanceId",
992
+ "isExpression": false,
993
+ "asc": true,
994
+ "nullsFirst": false,
995
+ "opclass": null
996
+ }
997
+ ],
998
+ "isUnique": false,
999
+ "where": "\"accepted\" IS NOT NULL",
1000
+ "with": "",
1001
+ "method": "btree",
1002
+ "concurrently": false,
1003
+ "name": "instance_members_instanceId_index",
1004
+ "entityType": "indexes",
1005
+ "schema": "public",
1006
+ "table": "instance_members"
1007
+ },
1008
+ {
1009
+ "nameExplicit": false,
1010
+ "columns": ["localId"],
1011
+ "schemaTo": "public",
1012
+ "tableTo": "local_actors",
1013
+ "columnsTo": ["id"],
1014
+ "onUpdate": "NO ACTION",
1015
+ "onDelete": "CASCADE",
1016
+ "name": "actors_localId_local_actors_id_fkey",
1017
+ "entityType": "fks",
1018
+ "schema": "public",
1019
+ "table": "actors"
1020
+ },
1021
+ {
1022
+ "nameExplicit": false,
1023
+ "columns": ["instanceId"],
1024
+ "schemaTo": "public",
1025
+ "tableTo": "instances",
1026
+ "columnsTo": ["id"],
1027
+ "onUpdate": "NO ACTION",
1028
+ "onDelete": "CASCADE",
1029
+ "name": "actors_instanceId_instances_id_fkey",
1030
+ "entityType": "fks",
1031
+ "schema": "public",
1032
+ "table": "actors"
1033
+ },
1034
+ {
1035
+ "nameExplicit": false,
1036
+ "columns": ["successorId"],
1037
+ "schemaTo": "public",
1038
+ "tableTo": "actors",
1039
+ "columnsTo": ["id"],
1040
+ "onUpdate": "NO ACTION",
1041
+ "onDelete": "SET NULL",
1042
+ "name": "actors_successorId_actors_id_fkey",
1043
+ "entityType": "fks",
1044
+ "schema": "public",
1045
+ "table": "actors"
1046
+ },
1047
+ {
1048
+ "nameExplicit": false,
1049
+ "columns": ["accountId"],
1050
+ "schemaTo": "public",
1051
+ "tableTo": "accounts",
1052
+ "columnsTo": ["id"],
1053
+ "onUpdate": "NO ACTION",
1054
+ "onDelete": "NO ACTION",
1055
+ "name": "instance_members_accountId_accounts_id_fkey",
1056
+ "entityType": "fks",
1057
+ "schema": "public",
1058
+ "table": "instance_members"
1059
+ },
1060
+ {
1061
+ "nameExplicit": false,
1062
+ "columns": ["instanceId"],
1063
+ "schemaTo": "public",
1064
+ "tableTo": "instances",
1065
+ "columnsTo": ["id"],
1066
+ "onUpdate": "NO ACTION",
1067
+ "onDelete": "NO ACTION",
1068
+ "name": "instance_members_instanceId_instances_id_fkey",
1069
+ "entityType": "fks",
1070
+ "schema": "public",
1071
+ "table": "instance_members"
1072
+ },
1073
+ {
1074
+ "nameExplicit": false,
1075
+ "columns": ["localId"],
1076
+ "schemaTo": "public",
1077
+ "tableTo": "local_instances",
1078
+ "columnsTo": ["id"],
1079
+ "onUpdate": "NO ACTION",
1080
+ "onDelete": "CASCADE",
1081
+ "name": "instances_localId_local_instances_id_fkey",
1082
+ "entityType": "fks",
1083
+ "schema": "public",
1084
+ "table": "instances"
1085
+ },
1086
+ {
1087
+ "nameExplicit": false,
1088
+ "columns": ["accountId"],
1089
+ "schemaTo": "public",
1090
+ "tableTo": "accounts",
1091
+ "columnsTo": ["id"],
1092
+ "onUpdate": "NO ACTION",
1093
+ "onDelete": "CASCADE",
1094
+ "name": "login_tokens_accountId_accounts_id_fkey",
1095
+ "entityType": "fks",
1096
+ "schema": "public",
1097
+ "table": "login_challenges"
1098
+ },
1099
+ {
1100
+ "nameExplicit": false,
1101
+ "columns": ["accountId"],
1102
+ "schemaTo": "public",
1103
+ "tableTo": "accounts",
1104
+ "columnsTo": ["id"],
1105
+ "onUpdate": "NO ACTION",
1106
+ "onDelete": "CASCADE",
1107
+ "name": "sessions_accountId_accounts_id_fkey",
1108
+ "entityType": "fks",
1109
+ "schema": "public",
1110
+ "table": "sessions"
1111
+ },
1112
+ {
1113
+ "columns": ["instanceId", "accountId"],
1114
+ "nameExplicit": false,
1115
+ "name": "instance_members_pkey",
1116
+ "entityType": "pks",
1117
+ "schema": "public",
1118
+ "table": "instance_members"
1119
+ },
1120
+ {
1121
+ "columns": ["id"],
1122
+ "nameExplicit": false,
1123
+ "name": "accounts_pkey",
1124
+ "schema": "public",
1125
+ "table": "accounts",
1126
+ "entityType": "pks"
1127
+ },
1128
+ {
1129
+ "columns": ["id"],
1130
+ "nameExplicit": false,
1131
+ "name": "actors_pkey",
1132
+ "schema": "public",
1133
+ "table": "actors",
1134
+ "entityType": "pks"
1135
+ },
1136
+ {
1137
+ "columns": ["id"],
1138
+ "nameExplicit": false,
1139
+ "name": "instances_pkey",
1140
+ "schema": "public",
1141
+ "table": "instances",
1142
+ "entityType": "pks"
1143
+ },
1144
+ {
1145
+ "columns": ["id"],
1146
+ "nameExplicit": false,
1147
+ "name": "local_actors_pkey",
1148
+ "schema": "public",
1149
+ "table": "local_actors",
1150
+ "entityType": "pks"
1151
+ },
1152
+ {
1153
+ "columns": ["id"],
1154
+ "nameExplicit": false,
1155
+ "name": "local_instances_pkey",
1156
+ "schema": "public",
1157
+ "table": "local_instances",
1158
+ "entityType": "pks"
1159
+ },
1160
+ {
1161
+ "columns": ["id"],
1162
+ "nameExplicit": false,
1163
+ "name": "login_tokens_pkey",
1164
+ "schema": "public",
1165
+ "table": "login_challenges",
1166
+ "entityType": "pks"
1167
+ },
1168
+ {
1169
+ "columns": ["id"],
1170
+ "nameExplicit": false,
1171
+ "name": "sessions_pkey",
1172
+ "schema": "public",
1173
+ "table": "sessions",
1174
+ "entityType": "pks"
1175
+ },
1176
+ {
1177
+ "nameExplicit": true,
1178
+ "columns": ["username", "instanceId"],
1179
+ "nullsNotDistinct": false,
1180
+ "name": "username_key",
1181
+ "entityType": "uniques",
1182
+ "schema": "public",
1183
+ "table": "actors"
1184
+ },
1185
+ {
1186
+ "nameExplicit": false,
1187
+ "columns": ["email"],
1188
+ "nullsNotDistinct": false,
1189
+ "name": "accounts_email_key",
1190
+ "schema": "public",
1191
+ "table": "accounts",
1192
+ "entityType": "uniques"
1193
+ },
1194
+ {
1195
+ "nameExplicit": false,
1196
+ "columns": ["localId"],
1197
+ "nullsNotDistinct": false,
1198
+ "name": "actors_localId_key",
1199
+ "schema": "public",
1200
+ "table": "actors",
1201
+ "entityType": "uniques"
1202
+ },
1203
+ {
1204
+ "nameExplicit": false,
1205
+ "columns": ["iri"],
1206
+ "nullsNotDistinct": false,
1207
+ "name": "actors_iri_key",
1208
+ "schema": "public",
1209
+ "table": "actors",
1210
+ "entityType": "uniques"
1211
+ },
1212
+ {
1213
+ "nameExplicit": false,
1214
+ "columns": ["host"],
1215
+ "nullsNotDistinct": false,
1216
+ "name": "instances_host_key",
1217
+ "schema": "public",
1218
+ "table": "instances",
1219
+ "entityType": "uniques"
1220
+ },
1221
+ {
1222
+ "nameExplicit": false,
1223
+ "columns": ["slug"],
1224
+ "nullsNotDistinct": false,
1225
+ "name": "local_instances_slug_key",
1226
+ "schema": "public",
1227
+ "table": "local_instances",
1228
+ "entityType": "uniques"
1229
+ },
1230
+ {
1231
+ "nameExplicit": false,
1232
+ "columns": ["tokenHash"],
1233
+ "nullsNotDistinct": false,
1234
+ "name": "sessions_tokenHash_key",
1235
+ "schema": "public",
1236
+ "table": "sessions",
1237
+ "entityType": "uniques"
1238
+ },
1239
+ {
1240
+ "value": "\"email\" ~ '^[^@]+@[^@]+\\.[^@]+$'",
1241
+ "name": "accounts_email_check",
1242
+ "entityType": "checks",
1243
+ "schema": "public",
1244
+ "table": "accounts"
1245
+ },
1246
+ {
1247
+ "value": "\"max_instances\" >= 0",
1248
+ "name": "accounts_max_instances_check",
1249
+ "entityType": "checks",
1250
+ "schema": "public",
1251
+ "table": "accounts"
1252
+ },
1253
+ {
1254
+ "value": "trim(both from \"name\") <> ''",
1255
+ "name": "accounts_name_check",
1256
+ "entityType": "checks",
1257
+ "schema": "public",
1258
+ "table": "accounts"
1259
+ },
1260
+ {
1261
+ "value": "\"username\" NOT LIKE '%@%'",
1262
+ "name": "actors_username_check",
1263
+ "entityType": "checks",
1264
+ "schema": "public",
1265
+ "table": "actors"
1266
+ },
1267
+ {
1268
+ "value": "\n \"suspendedUntil\" IS NULL OR (\n \"suspended\" IS NOT NULL AND\n \"suspendedUntil\" > \"suspended\"\n )\n ",
1269
+ "name": "actors_suspended_check",
1270
+ "entityType": "checks",
1271
+ "schema": "public",
1272
+ "table": "actors"
1273
+ },
1274
+ {
1275
+ "value": "\"slug\" ~ '^[a-z0-9-]{4,63}$'",
1276
+ "name": "instances_slug_check",
1277
+ "entityType": "checks",
1278
+ "schema": "public",
1279
+ "table": "local_instances"
1280
+ },
1281
+ {
1282
+ "value": "\"maxActors\" > 0",
1283
+ "name": "instances_max_actors_check",
1284
+ "entityType": "checks",
1285
+ "schema": "public",
1286
+ "table": "local_instances"
1287
+ }
1288
+ ],
1289
+ "renames": []
1290
+ }