@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,722 @@
1
+ {
2
+ "version": "8",
3
+ "dialect": "postgres",
4
+ "id": "d8ac955f-1e74-4493-ade9-a25c40b01c20",
5
+ "prevIds": ["c40a9b41-e120-4f01-865b-68583fbb921c"],
6
+ "ddl": [
7
+ {
8
+ "isRlsEnabled": false,
9
+ "name": "accounts",
10
+ "entityType": "tables",
11
+ "schema": "public"
12
+ },
13
+ {
14
+ "isRlsEnabled": false,
15
+ "name": "instance_members",
16
+ "entityType": "tables",
17
+ "schema": "public"
18
+ },
19
+ {
20
+ "isRlsEnabled": false,
21
+ "name": "instances",
22
+ "entityType": "tables",
23
+ "schema": "public"
24
+ },
25
+ {
26
+ "isRlsEnabled": false,
27
+ "name": "local_instances",
28
+ "entityType": "tables",
29
+ "schema": "public"
30
+ },
31
+ {
32
+ "isRlsEnabled": false,
33
+ "name": "login_tokens",
34
+ "entityType": "tables",
35
+ "schema": "public"
36
+ },
37
+ {
38
+ "isRlsEnabled": false,
39
+ "name": "sessions",
40
+ "entityType": "tables",
41
+ "schema": "public"
42
+ },
43
+ {
44
+ "type": "uuid",
45
+ "typeSchema": null,
46
+ "notNull": true,
47
+ "dimensions": 0,
48
+ "default": null,
49
+ "generated": null,
50
+ "identity": null,
51
+ "name": "id",
52
+ "entityType": "columns",
53
+ "schema": "public",
54
+ "table": "accounts"
55
+ },
56
+ {
57
+ "type": "varchar(255)",
58
+ "typeSchema": null,
59
+ "notNull": true,
60
+ "dimensions": 0,
61
+ "default": null,
62
+ "generated": null,
63
+ "identity": null,
64
+ "name": "email",
65
+ "entityType": "columns",
66
+ "schema": "public",
67
+ "table": "accounts"
68
+ },
69
+ {
70
+ "type": "varchar(100)",
71
+ "typeSchema": null,
72
+ "notNull": true,
73
+ "dimensions": 0,
74
+ "default": null,
75
+ "generated": null,
76
+ "identity": null,
77
+ "name": "name",
78
+ "entityType": "columns",
79
+ "schema": "public",
80
+ "table": "accounts"
81
+ },
82
+ {
83
+ "type": "integer",
84
+ "typeSchema": null,
85
+ "notNull": true,
86
+ "dimensions": 0,
87
+ "default": "10",
88
+ "generated": null,
89
+ "identity": null,
90
+ "name": "max_instances",
91
+ "entityType": "columns",
92
+ "schema": "public",
93
+ "table": "accounts"
94
+ },
95
+ {
96
+ "type": "boolean",
97
+ "typeSchema": null,
98
+ "notNull": true,
99
+ "dimensions": 0,
100
+ "default": "false",
101
+ "generated": null,
102
+ "identity": null,
103
+ "name": "admin",
104
+ "entityType": "columns",
105
+ "schema": "public",
106
+ "table": "accounts"
107
+ },
108
+ {
109
+ "type": "timestamp with time zone",
110
+ "typeSchema": null,
111
+ "notNull": true,
112
+ "dimensions": 0,
113
+ "default": "CURRENT_TIMESTAMP",
114
+ "generated": null,
115
+ "identity": null,
116
+ "name": "created",
117
+ "entityType": "columns",
118
+ "schema": "public",
119
+ "table": "accounts"
120
+ },
121
+ {
122
+ "type": "uuid",
123
+ "typeSchema": null,
124
+ "notNull": true,
125
+ "dimensions": 0,
126
+ "default": null,
127
+ "generated": null,
128
+ "identity": null,
129
+ "name": "accountId",
130
+ "entityType": "columns",
131
+ "schema": "public",
132
+ "table": "instance_members"
133
+ },
134
+ {
135
+ "type": "uuid",
136
+ "typeSchema": null,
137
+ "notNull": true,
138
+ "dimensions": 0,
139
+ "default": null,
140
+ "generated": null,
141
+ "identity": null,
142
+ "name": "instanceId",
143
+ "entityType": "columns",
144
+ "schema": "public",
145
+ "table": "instance_members"
146
+ },
147
+ {
148
+ "type": "boolean",
149
+ "typeSchema": null,
150
+ "notNull": true,
151
+ "dimensions": 0,
152
+ "default": "false",
153
+ "generated": null,
154
+ "identity": null,
155
+ "name": "admin",
156
+ "entityType": "columns",
157
+ "schema": "public",
158
+ "table": "instance_members"
159
+ },
160
+ {
161
+ "type": "timestamp with time zone",
162
+ "typeSchema": null,
163
+ "notNull": false,
164
+ "dimensions": 0,
165
+ "default": null,
166
+ "generated": null,
167
+ "identity": null,
168
+ "name": "accepted",
169
+ "entityType": "columns",
170
+ "schema": "public",
171
+ "table": "instance_members"
172
+ },
173
+ {
174
+ "type": "timestamp with time zone",
175
+ "typeSchema": null,
176
+ "notNull": true,
177
+ "dimensions": 0,
178
+ "default": "CURRENT_TIMESTAMP",
179
+ "generated": null,
180
+ "identity": null,
181
+ "name": "created",
182
+ "entityType": "columns",
183
+ "schema": "public",
184
+ "table": "instance_members"
185
+ },
186
+ {
187
+ "type": "uuid",
188
+ "typeSchema": null,
189
+ "notNull": true,
190
+ "dimensions": 0,
191
+ "default": null,
192
+ "generated": null,
193
+ "identity": null,
194
+ "name": "id",
195
+ "entityType": "columns",
196
+ "schema": "public",
197
+ "table": "instances"
198
+ },
199
+ {
200
+ "type": "uuid",
201
+ "typeSchema": null,
202
+ "notNull": false,
203
+ "dimensions": 0,
204
+ "default": null,
205
+ "generated": null,
206
+ "identity": null,
207
+ "name": "localId",
208
+ "entityType": "columns",
209
+ "schema": "public",
210
+ "table": "instances"
211
+ },
212
+ {
213
+ "type": "timestamp with time zone",
214
+ "typeSchema": null,
215
+ "notNull": true,
216
+ "dimensions": 0,
217
+ "default": "CURRENT_TIMESTAMP",
218
+ "generated": null,
219
+ "identity": null,
220
+ "name": "created",
221
+ "entityType": "columns",
222
+ "schema": "public",
223
+ "table": "instances"
224
+ },
225
+ {
226
+ "type": "varchar(100)",
227
+ "typeSchema": null,
228
+ "notNull": true,
229
+ "dimensions": 0,
230
+ "default": null,
231
+ "generated": null,
232
+ "identity": null,
233
+ "name": "host",
234
+ "entityType": "columns",
235
+ "schema": "public",
236
+ "table": "instances"
237
+ },
238
+ {
239
+ "type": "text",
240
+ "typeSchema": null,
241
+ "notNull": false,
242
+ "dimensions": 0,
243
+ "default": null,
244
+ "generated": null,
245
+ "identity": null,
246
+ "name": "nodeInfoUrl",
247
+ "entityType": "columns",
248
+ "schema": "public",
249
+ "table": "instances"
250
+ },
251
+ {
252
+ "type": "text",
253
+ "typeSchema": null,
254
+ "notNull": false,
255
+ "dimensions": 0,
256
+ "default": null,
257
+ "generated": null,
258
+ "identity": null,
259
+ "name": "software",
260
+ "entityType": "columns",
261
+ "schema": "public",
262
+ "table": "instances"
263
+ },
264
+ {
265
+ "type": "text",
266
+ "typeSchema": null,
267
+ "notNull": false,
268
+ "dimensions": 0,
269
+ "default": null,
270
+ "generated": null,
271
+ "identity": null,
272
+ "name": "softwareVersion",
273
+ "entityType": "columns",
274
+ "schema": "public",
275
+ "table": "instances"
276
+ },
277
+ {
278
+ "type": "uuid",
279
+ "typeSchema": null,
280
+ "notNull": true,
281
+ "dimensions": 0,
282
+ "default": null,
283
+ "generated": null,
284
+ "identity": null,
285
+ "name": "id",
286
+ "entityType": "columns",
287
+ "schema": "public",
288
+ "table": "local_instances"
289
+ },
290
+ {
291
+ "type": "varchar(63)",
292
+ "typeSchema": null,
293
+ "notNull": true,
294
+ "dimensions": 0,
295
+ "default": null,
296
+ "generated": null,
297
+ "identity": null,
298
+ "name": "slug",
299
+ "entityType": "columns",
300
+ "schema": "public",
301
+ "table": "local_instances"
302
+ },
303
+ {
304
+ "type": "timestamp with time zone",
305
+ "typeSchema": null,
306
+ "notNull": true,
307
+ "dimensions": 0,
308
+ "default": null,
309
+ "generated": null,
310
+ "identity": null,
311
+ "name": "expires",
312
+ "entityType": "columns",
313
+ "schema": "public",
314
+ "table": "local_instances"
315
+ },
316
+ {
317
+ "type": "integer",
318
+ "typeSchema": null,
319
+ "notNull": true,
320
+ "dimensions": 0,
321
+ "default": "10",
322
+ "generated": null,
323
+ "identity": null,
324
+ "name": "maxActors",
325
+ "entityType": "columns",
326
+ "schema": "public",
327
+ "table": "local_instances"
328
+ },
329
+ {
330
+ "type": "uuid",
331
+ "typeSchema": null,
332
+ "notNull": true,
333
+ "dimensions": 0,
334
+ "default": null,
335
+ "generated": null,
336
+ "identity": null,
337
+ "name": "id",
338
+ "entityType": "columns",
339
+ "schema": "public",
340
+ "table": "login_tokens"
341
+ },
342
+ {
343
+ "type": "uuid",
344
+ "typeSchema": null,
345
+ "notNull": true,
346
+ "dimensions": 0,
347
+ "default": null,
348
+ "generated": null,
349
+ "identity": null,
350
+ "name": "accountId",
351
+ "entityType": "columns",
352
+ "schema": "public",
353
+ "table": "login_tokens"
354
+ },
355
+ {
356
+ "type": "varchar(64)",
357
+ "typeSchema": null,
358
+ "notNull": true,
359
+ "dimensions": 0,
360
+ "default": null,
361
+ "generated": null,
362
+ "identity": null,
363
+ "name": "tokenHash",
364
+ "entityType": "columns",
365
+ "schema": "public",
366
+ "table": "login_tokens"
367
+ },
368
+ {
369
+ "type": "varchar(64)",
370
+ "typeSchema": null,
371
+ "notNull": true,
372
+ "dimensions": 0,
373
+ "default": null,
374
+ "generated": null,
375
+ "identity": null,
376
+ "name": "codeHash",
377
+ "entityType": "columns",
378
+ "schema": "public",
379
+ "table": "login_tokens"
380
+ },
381
+ {
382
+ "type": "timestamp with time zone",
383
+ "typeSchema": null,
384
+ "notNull": true,
385
+ "dimensions": 0,
386
+ "default": "CURRENT_TIMESTAMP",
387
+ "generated": null,
388
+ "identity": null,
389
+ "name": "created",
390
+ "entityType": "columns",
391
+ "schema": "public",
392
+ "table": "login_tokens"
393
+ },
394
+ {
395
+ "type": "timestamp with time zone",
396
+ "typeSchema": null,
397
+ "notNull": true,
398
+ "dimensions": 0,
399
+ "default": "CURRENT_TIMESTAMP + INTERVAL '15 minutes'",
400
+ "generated": null,
401
+ "identity": null,
402
+ "name": "expires",
403
+ "entityType": "columns",
404
+ "schema": "public",
405
+ "table": "login_tokens"
406
+ },
407
+ {
408
+ "type": "timestamp with time zone",
409
+ "typeSchema": null,
410
+ "notNull": false,
411
+ "dimensions": 0,
412
+ "default": null,
413
+ "generated": null,
414
+ "identity": null,
415
+ "name": "consumed",
416
+ "entityType": "columns",
417
+ "schema": "public",
418
+ "table": "login_tokens"
419
+ },
420
+ {
421
+ "type": "uuid",
422
+ "typeSchema": null,
423
+ "notNull": true,
424
+ "dimensions": 0,
425
+ "default": null,
426
+ "generated": null,
427
+ "identity": null,
428
+ "name": "id",
429
+ "entityType": "columns",
430
+ "schema": "public",
431
+ "table": "sessions"
432
+ },
433
+ {
434
+ "type": "uuid",
435
+ "typeSchema": null,
436
+ "notNull": true,
437
+ "dimensions": 0,
438
+ "default": null,
439
+ "generated": null,
440
+ "identity": null,
441
+ "name": "accountId",
442
+ "entityType": "columns",
443
+ "schema": "public",
444
+ "table": "sessions"
445
+ },
446
+ {
447
+ "type": "varchar(64)",
448
+ "typeSchema": null,
449
+ "notNull": true,
450
+ "dimensions": 0,
451
+ "default": null,
452
+ "generated": null,
453
+ "identity": null,
454
+ "name": "tokenHash",
455
+ "entityType": "columns",
456
+ "schema": "public",
457
+ "table": "sessions"
458
+ },
459
+ {
460
+ "type": "timestamp with time zone",
461
+ "typeSchema": null,
462
+ "notNull": true,
463
+ "dimensions": 0,
464
+ "default": "CURRENT_TIMESTAMP",
465
+ "generated": null,
466
+ "identity": null,
467
+ "name": "created",
468
+ "entityType": "columns",
469
+ "schema": "public",
470
+ "table": "sessions"
471
+ },
472
+ {
473
+ "type": "timestamp with time zone",
474
+ "typeSchema": null,
475
+ "notNull": true,
476
+ "dimensions": 0,
477
+ "default": "CURRENT_TIMESTAMP + INTERVAL '1 month'",
478
+ "generated": null,
479
+ "identity": null,
480
+ "name": "expires",
481
+ "entityType": "columns",
482
+ "schema": "public",
483
+ "table": "sessions"
484
+ },
485
+ {
486
+ "nameExplicit": false,
487
+ "columns": [
488
+ {
489
+ "value": "accountId",
490
+ "isExpression": false,
491
+ "asc": true,
492
+ "nullsFirst": false,
493
+ "opclass": null
494
+ }
495
+ ],
496
+ "isUnique": false,
497
+ "where": "\"accepted\" IS NOT NULL",
498
+ "with": "",
499
+ "method": "btree",
500
+ "concurrently": false,
501
+ "name": "instance_members_accountId_index",
502
+ "entityType": "indexes",
503
+ "schema": "public",
504
+ "table": "instance_members"
505
+ },
506
+ {
507
+ "nameExplicit": false,
508
+ "columns": [
509
+ {
510
+ "value": "instanceId",
511
+ "isExpression": false,
512
+ "asc": true,
513
+ "nullsFirst": false,
514
+ "opclass": null
515
+ }
516
+ ],
517
+ "isUnique": false,
518
+ "where": "\"accepted\" IS NOT NULL",
519
+ "with": "",
520
+ "method": "btree",
521
+ "concurrently": false,
522
+ "name": "instance_members_instanceId_index",
523
+ "entityType": "indexes",
524
+ "schema": "public",
525
+ "table": "instance_members"
526
+ },
527
+ {
528
+ "nameExplicit": false,
529
+ "columns": ["accountId"],
530
+ "schemaTo": "public",
531
+ "tableTo": "accounts",
532
+ "columnsTo": ["id"],
533
+ "onUpdate": "NO ACTION",
534
+ "onDelete": "NO ACTION",
535
+ "name": "instance_members_accountId_accounts_id_fkey",
536
+ "entityType": "fks",
537
+ "schema": "public",
538
+ "table": "instance_members"
539
+ },
540
+ {
541
+ "nameExplicit": false,
542
+ "columns": ["instanceId"],
543
+ "schemaTo": "public",
544
+ "tableTo": "instances",
545
+ "columnsTo": ["id"],
546
+ "onUpdate": "NO ACTION",
547
+ "onDelete": "NO ACTION",
548
+ "name": "instance_members_instanceId_instances_id_fkey",
549
+ "entityType": "fks",
550
+ "schema": "public",
551
+ "table": "instance_members"
552
+ },
553
+ {
554
+ "nameExplicit": false,
555
+ "columns": ["localId"],
556
+ "schemaTo": "public",
557
+ "tableTo": "local_instances",
558
+ "columnsTo": ["id"],
559
+ "onUpdate": "NO ACTION",
560
+ "onDelete": "CASCADE",
561
+ "name": "instances_localId_local_instances_id_fkey",
562
+ "entityType": "fks",
563
+ "schema": "public",
564
+ "table": "instances"
565
+ },
566
+ {
567
+ "nameExplicit": false,
568
+ "columns": ["accountId"],
569
+ "schemaTo": "public",
570
+ "tableTo": "accounts",
571
+ "columnsTo": ["id"],
572
+ "onUpdate": "NO ACTION",
573
+ "onDelete": "CASCADE",
574
+ "name": "login_tokens_accountId_accounts_id_fkey",
575
+ "entityType": "fks",
576
+ "schema": "public",
577
+ "table": "login_tokens"
578
+ },
579
+ {
580
+ "nameExplicit": false,
581
+ "columns": ["accountId"],
582
+ "schemaTo": "public",
583
+ "tableTo": "accounts",
584
+ "columnsTo": ["id"],
585
+ "onUpdate": "NO ACTION",
586
+ "onDelete": "CASCADE",
587
+ "name": "sessions_accountId_accounts_id_fkey",
588
+ "entityType": "fks",
589
+ "schema": "public",
590
+ "table": "sessions"
591
+ },
592
+ {
593
+ "columns": ["instanceId", "accountId"],
594
+ "nameExplicit": false,
595
+ "name": "instance_members_pkey",
596
+ "entityType": "pks",
597
+ "schema": "public",
598
+ "table": "instance_members"
599
+ },
600
+ {
601
+ "columns": ["id"],
602
+ "nameExplicit": false,
603
+ "name": "accounts_pkey",
604
+ "schema": "public",
605
+ "table": "accounts",
606
+ "entityType": "pks"
607
+ },
608
+ {
609
+ "columns": ["id"],
610
+ "nameExplicit": false,
611
+ "name": "instances_pkey",
612
+ "schema": "public",
613
+ "table": "instances",
614
+ "entityType": "pks"
615
+ },
616
+ {
617
+ "columns": ["id"],
618
+ "nameExplicit": false,
619
+ "name": "local_instances_pkey",
620
+ "schema": "public",
621
+ "table": "local_instances",
622
+ "entityType": "pks"
623
+ },
624
+ {
625
+ "columns": ["id"],
626
+ "nameExplicit": false,
627
+ "name": "login_tokens_pkey",
628
+ "schema": "public",
629
+ "table": "login_tokens",
630
+ "entityType": "pks"
631
+ },
632
+ {
633
+ "columns": ["id"],
634
+ "nameExplicit": false,
635
+ "name": "sessions_pkey",
636
+ "schema": "public",
637
+ "table": "sessions",
638
+ "entityType": "pks"
639
+ },
640
+ {
641
+ "nameExplicit": false,
642
+ "columns": ["email"],
643
+ "nullsNotDistinct": false,
644
+ "name": "accounts_email_key",
645
+ "schema": "public",
646
+ "table": "accounts",
647
+ "entityType": "uniques"
648
+ },
649
+ {
650
+ "nameExplicit": false,
651
+ "columns": ["host"],
652
+ "nullsNotDistinct": false,
653
+ "name": "instances_host_key",
654
+ "schema": "public",
655
+ "table": "instances",
656
+ "entityType": "uniques"
657
+ },
658
+ {
659
+ "nameExplicit": false,
660
+ "columns": ["slug"],
661
+ "nullsNotDistinct": false,
662
+ "name": "local_instances_slug_key",
663
+ "schema": "public",
664
+ "table": "local_instances",
665
+ "entityType": "uniques"
666
+ },
667
+ {
668
+ "nameExplicit": false,
669
+ "columns": ["tokenHash"],
670
+ "nullsNotDistinct": false,
671
+ "name": "login_tokens_tokenHash_key",
672
+ "schema": "public",
673
+ "table": "login_tokens",
674
+ "entityType": "uniques"
675
+ },
676
+ {
677
+ "nameExplicit": false,
678
+ "columns": ["tokenHash"],
679
+ "nullsNotDistinct": false,
680
+ "name": "sessions_tokenHash_key",
681
+ "schema": "public",
682
+ "table": "sessions",
683
+ "entityType": "uniques"
684
+ },
685
+ {
686
+ "value": "\"email\" ~ '^[^@]+@[^@]+\\.[^@]+$'",
687
+ "name": "accounts_email_check",
688
+ "entityType": "checks",
689
+ "schema": "public",
690
+ "table": "accounts"
691
+ },
692
+ {
693
+ "value": "\"max_instances\" >= 0",
694
+ "name": "accounts_max_instances_check",
695
+ "entityType": "checks",
696
+ "schema": "public",
697
+ "table": "accounts"
698
+ },
699
+ {
700
+ "value": "trim(both from \"name\") <> ''",
701
+ "name": "accounts_name_check",
702
+ "entityType": "checks",
703
+ "schema": "public",
704
+ "table": "accounts"
705
+ },
706
+ {
707
+ "value": "\"slug\" ~ '^[a-z0-9-]{4,63}$'",
708
+ "name": "instances_slug_check",
709
+ "entityType": "checks",
710
+ "schema": "public",
711
+ "table": "local_instances"
712
+ },
713
+ {
714
+ "value": "\"maxActors\" > 0",
715
+ "name": "instances_max_actors_check",
716
+ "entityType": "checks",
717
+ "schema": "public",
718
+ "table": "local_instances"
719
+ }
720
+ ],
721
+ "renames": []
722
+ }