@morlay/session-rdb 0.1.10-alpha.0 → 0.1.10-alpha.2

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 (142) hide show
  1. package/README.md +18 -3
  2. package/dist/artifact.d.mts +118 -2
  3. package/dist/artifact.mjs +5 -3
  4. package/dist/{log-TYgd8Xkr.d.mts → backend-BKtJ5sO5.d.mts} +183 -284
  5. package/dist/backend-rdb-BDCntVDy.mjs +1341 -0
  6. package/dist/branch-CG1PUlO6.mjs +833 -0
  7. package/dist/deletion-SSX7IqU8.mjs +35 -0
  8. package/dist/deletion.d.mts +1 -1
  9. package/dist/deletion.mjs +2 -2
  10. package/dist/export-CfJQjQfr.mjs +123 -0
  11. package/dist/export.d.mts +1 -1
  12. package/dist/export.mjs +31 -55
  13. package/dist/import.d.mts +1 -1
  14. package/dist/import.mjs +31 -76
  15. package/dist/index-CUD2ZpTA.d.mts +71 -0
  16. package/dist/index.d.mts +20 -2
  17. package/dist/index.mjs +1561 -4
  18. package/dist/open-YoyD_kah.mjs +561 -0
  19. package/dist/organize.d.mts +9 -0
  20. package/dist/organize.mjs +30 -0
  21. package/dist/route-DpfY0zq-.mjs +114 -0
  22. package/dist/storage.d.mts +41 -48
  23. package/dist/storage.mjs +3 -1
  24. package/dist/testing.d.mts +9 -1
  25. package/dist/testing.mjs +25 -4
  26. package/dist/usage-row-BQQM-_t6.mjs +36 -0
  27. package/dist/usage.d.mts +1 -1
  28. package/dist/usage.mjs +7 -40
  29. package/dist/write-guard-CYrY58GM.mjs +174 -0
  30. package/package.json +10 -14
  31. package/src/artifact.ts +4 -1
  32. package/src/backend-rdb.ts +331 -0
  33. package/src/backend.ts +32 -15
  34. package/src/{branch.ts → branch/index.ts} +109 -110
  35. package/src/branch/port.ts +62 -0
  36. package/src/branch/semantics.ts +69 -0
  37. package/src/db/open.ts +180 -0
  38. package/src/db/stats.ts +449 -0
  39. package/src/deletion-error.ts +17 -0
  40. package/src/deletion.ts +19 -72
  41. package/src/entities/index.ts +16 -1
  42. package/src/entities/v3/event-usage.ts +3 -3
  43. package/src/entities/v3/events.ts +3 -3
  44. package/src/entities/v3/index.ts +4 -16
  45. package/src/entities/v3/persistence-state.ts +3 -3
  46. package/src/entities/v3/schema-meta.ts +3 -3
  47. package/src/entities/v3/session-counts.ts +3 -3
  48. package/src/entities/v3/session-events.ts +3 -3
  49. package/src/entities/v3/session-projcache-rows.ts +3 -3
  50. package/src/entities/v3/session-usage.ts +3 -3
  51. package/src/entities/v3/sessions.ts +3 -3
  52. package/src/entities/v3/storage-records.ts +17 -0
  53. package/src/entities/v3/storage-units.ts +3 -3
  54. package/src/{schema.ts → event-shape.ts} +0 -46
  55. package/src/export.ts +32 -78
  56. package/src/handles.ts +349 -0
  57. package/src/http/route.ts +178 -0
  58. package/src/import-storages.ts +5 -2
  59. package/src/import.ts +63 -125
  60. package/src/index.ts +15 -1666
  61. package/src/legacy.ts +3 -1
  62. package/src/live-routing.ts +205 -0
  63. package/src/log/export.ts +84 -0
  64. package/src/{log.ts → log/repair.ts} +1 -268
  65. package/src/log/rows.ts +107 -0
  66. package/src/log/usage-row.ts +64 -0
  67. package/src/migrations.ts +196 -0
  68. package/src/organize.ts +38 -0
  69. package/src/read-path.ts +190 -0
  70. package/src/routes.ts +2 -1
  71. package/src/rows.ts +25 -77
  72. package/src/session-ops.ts +444 -0
  73. package/src/session-store.ts +675 -0
  74. package/src/stats-fold.ts +44 -0
  75. package/src/storage-takeover/index.ts +2 -5
  76. package/src/storage-takeover/legacy-domain-migration.ts +118 -0
  77. package/src/storage-takeover/projection-cache.ts +122 -71
  78. package/src/storage-takeover/read-model.ts +189 -0
  79. package/src/storage-takeover/repository.ts +236 -442
  80. package/src/storage-takeover/storage-backend.ts +44 -159
  81. package/src/storage-takeover/types.ts +45 -19
  82. package/src/storage-takeover/workspace-documents.ts +65 -0
  83. package/src/storage.ts +4 -2
  84. package/src/testing.ts +21 -1
  85. package/src/usage.ts +11 -65
  86. package/src/version.ts +13 -0
  87. package/src/write-path.ts +286 -0
  88. package/dist/branch-CoPCRKer.mjs +0 -401
  89. package/dist/deletion-CWl89TIR.mjs +0 -2249
  90. package/dist/gc.d.mts +0 -4
  91. package/dist/gc.mjs +0 -48
  92. package/dist/log-CcWy46VE.mjs +0 -558
  93. package/dist/routes-hZjTcX_R.mjs +0 -9
  94. package/dist/sqlite-BNRd1aqR.mjs +0 -1778
  95. package/drizzle/postgres/20260908072805_v2_initial/migration.sql +0 -58
  96. package/drizzle/postgres/20260908072805_v2_initial/snapshot.json +0 -686
  97. package/drizzle/postgres/20260908072806_v3_drop_original_seq/migration.sql +0 -1
  98. package/drizzle/postgres/20260908072806_v3_drop_original_seq/snapshot.json +0 -673
  99. package/drizzle/postgres/20260910120001_v3_storage_tables/migration.sql +0 -65
  100. package/drizzle/postgres/20260910120001_v3_storage_tables/snapshot.json +0 -1183
  101. package/drizzle/postgres/20260910130001_v3_session_title_backfill/migration.sql +0 -10
  102. package/drizzle/postgres/20260910130001_v3_session_title_backfill/snapshot.json +0 -1183
  103. package/drizzle/postgres/20260918120000_v3_event_usage/migration.sql +0 -14
  104. package/drizzle/postgres/20260918120000_v3_event_usage/snapshot.json +0 -1309
  105. package/drizzle/postgres/20260921075900_v3_agent_preset/migration.sql +0 -1
  106. package/drizzle/postgres/20260922090001_v3_pinned_seq/migration.sql +0 -2
  107. package/drizzle/postgres/20260922093001_v3_last_event_at/migration.sql +0 -10
  108. package/drizzle/postgres/20260923120000_v3_usage_materialized/migration.sql +0 -48
  109. package/drizzle/postgres/20261008103001_v3_schedule_tasks/migration.sql +0 -11
  110. package/drizzle/sqlite/20260908072751_v2_initial/migration.sql +0 -53
  111. package/drizzle/sqlite/20260908072751_v2_initial/snapshot.json +0 -492
  112. package/drizzle/sqlite/20260908072752_v3_drop_original_seq/migration.sql +0 -6
  113. package/drizzle/sqlite/20260908072752_v3_drop_original_seq/snapshot.json +0 -513
  114. package/drizzle/sqlite/20260910120000_v3_storage_tables/migration.sql +0 -66
  115. package/drizzle/sqlite/20260910120000_v3_storage_tables/snapshot.json +0 -905
  116. package/drizzle/sqlite/20260910130000_v3_session_title_backfill/migration.sql +0 -13
  117. package/drizzle/sqlite/20260910130000_v3_session_title_backfill/snapshot.json +0 -905
  118. package/drizzle/sqlite/20260918120000_v3_event_usage/migration.sql +0 -14
  119. package/drizzle/sqlite/20260918120000_v3_event_usage/snapshot.json +0 -1031
  120. package/drizzle/sqlite/20260921075855_v3_agent_preset/migration.sql +0 -7
  121. package/drizzle/sqlite/20260921075855_v3_agent_preset/snapshot.json +0 -1041
  122. package/drizzle/sqlite/20260922090000_v3_pinned_seq/migration.sql +0 -4
  123. package/drizzle/sqlite/20260922093000_v3_last_event_at/migration.sql +0 -13
  124. package/drizzle/sqlite/20260923120000_v3_usage_materialized/migration.sql +0 -48
  125. package/drizzle/sqlite/20261008103000_v3_schedule_tasks/migration.sql +0 -14
  126. package/src/adapters/index.ts +0 -12
  127. package/src/adapters/to-postgres.ts +0 -93
  128. package/src/adapters/to-sqlite.ts +0 -83
  129. package/src/adapters/types.ts +0 -44
  130. package/src/drizzle/postgres-v2.ts +0 -10
  131. package/src/drizzle/postgres-v3.ts +0 -18
  132. package/src/drizzle/sqlite-v2.ts +0 -9
  133. package/src/drizzle/sqlite-v3.ts +0 -18
  134. package/src/entities/v2/index.ts +0 -20
  135. package/src/entities/v2/session-events.ts +0 -10
  136. package/src/entities/v3/schedule-tasks.ts +0 -16
  137. package/src/entities/v3/workspace-sessions.ts +0 -19
  138. package/src/entities/v3/workspace-state.ts +0 -12
  139. package/src/entities/v3/workspaces.ts +0 -14
  140. package/src/gc.ts +0 -77
  141. package/src/postgres.ts +0 -1015
  142. package/src/sqlite.ts +0 -1096
@@ -1,1183 +0,0 @@
1
- {
2
- "version": "8",
3
- "dialect": "postgres",
4
- "id": "8a51a71d-ed27-4028-be4d-2f9a0434b6a4",
5
- "prevIds": ["d4f668b2-5d9b-4755-8dba-5ab2c30cf372"],
6
- "ddl": [
7
- {
8
- "isRlsEnabled": false,
9
- "name": "t_events",
10
- "entityType": "tables",
11
- "schema": "public"
12
- },
13
- {
14
- "isRlsEnabled": false,
15
- "name": "t_persistence_state",
16
- "entityType": "tables",
17
- "schema": "public"
18
- },
19
- {
20
- "isRlsEnabled": false,
21
- "name": "t_schema_meta",
22
- "entityType": "tables",
23
- "schema": "public"
24
- },
25
- {
26
- "isRlsEnabled": false,
27
- "name": "t_session_events",
28
- "entityType": "tables",
29
- "schema": "public"
30
- },
31
- {
32
- "isRlsEnabled": false,
33
- "name": "t_sessions",
34
- "entityType": "tables",
35
- "schema": "public"
36
- },
37
- {
38
- "type": "serial",
39
- "typeSchema": null,
40
- "notNull": true,
41
- "dimensions": 0,
42
- "default": null,
43
- "generated": null,
44
- "identity": null,
45
- "name": "f_id",
46
- "entityType": "columns",
47
- "schema": "public",
48
- "table": "t_events"
49
- },
50
- {
51
- "type": "text",
52
- "typeSchema": null,
53
- "notNull": true,
54
- "dimensions": 0,
55
- "default": null,
56
- "generated": null,
57
- "identity": null,
58
- "name": "f_event_id",
59
- "entityType": "columns",
60
- "schema": "public",
61
- "table": "t_events"
62
- },
63
- {
64
- "type": "text",
65
- "typeSchema": null,
66
- "notNull": true,
67
- "dimensions": 0,
68
- "default": "''",
69
- "generated": null,
70
- "identity": null,
71
- "name": "f_parent_id",
72
- "entityType": "columns",
73
- "schema": "public",
74
- "table": "t_events"
75
- },
76
- {
77
- "type": "text",
78
- "typeSchema": null,
79
- "notNull": true,
80
- "dimensions": 0,
81
- "default": "''",
82
- "generated": null,
83
- "identity": null,
84
- "name": "f_type",
85
- "entityType": "columns",
86
- "schema": "public",
87
- "table": "t_events"
88
- },
89
- {
90
- "type": "text",
91
- "typeSchema": null,
92
- "notNull": true,
93
- "dimensions": 0,
94
- "default": "''",
95
- "generated": null,
96
- "identity": null,
97
- "name": "f_kind",
98
- "entityType": "columns",
99
- "schema": "public",
100
- "table": "t_events"
101
- },
102
- {
103
- "type": "text",
104
- "typeSchema": null,
105
- "notNull": true,
106
- "dimensions": 0,
107
- "default": "''",
108
- "generated": null,
109
- "identity": null,
110
- "name": "f_role",
111
- "entityType": "columns",
112
- "schema": "public",
113
- "table": "t_events"
114
- },
115
- {
116
- "type": "text",
117
- "typeSchema": null,
118
- "notNull": true,
119
- "dimensions": 0,
120
- "default": "''",
121
- "generated": null,
122
- "identity": null,
123
- "name": "f_name",
124
- "entityType": "columns",
125
- "schema": "public",
126
- "table": "t_events"
127
- },
128
- {
129
- "type": "text",
130
- "typeSchema": null,
131
- "notNull": true,
132
- "dimensions": 0,
133
- "default": "''",
134
- "generated": null,
135
- "identity": null,
136
- "name": "f_action_id",
137
- "entityType": "columns",
138
- "schema": "public",
139
- "table": "t_events"
140
- },
141
- {
142
- "type": "text",
143
- "typeSchema": null,
144
- "notNull": true,
145
- "dimensions": 0,
146
- "default": "''",
147
- "generated": null,
148
- "identity": null,
149
- "name": "f_encoding",
150
- "entityType": "columns",
151
- "schema": "public",
152
- "table": "t_events"
153
- },
154
- {
155
- "type": "text",
156
- "typeSchema": null,
157
- "notNull": true,
158
- "dimensions": 0,
159
- "default": null,
160
- "generated": null,
161
- "identity": null,
162
- "name": "f_data",
163
- "entityType": "columns",
164
- "schema": "public",
165
- "table": "t_events"
166
- },
167
- {
168
- "type": "bigint",
169
- "typeSchema": null,
170
- "notNull": true,
171
- "dimensions": 0,
172
- "default": "0",
173
- "generated": null,
174
- "identity": null,
175
- "name": "f_created_at",
176
- "entityType": "columns",
177
- "schema": "public",
178
- "table": "t_events"
179
- },
180
- {
181
- "type": "integer",
182
- "typeSchema": null,
183
- "notNull": true,
184
- "dimensions": 0,
185
- "default": null,
186
- "generated": null,
187
- "identity": null,
188
- "name": "f_singleton",
189
- "entityType": "columns",
190
- "schema": "public",
191
- "table": "t_persistence_state"
192
- },
193
- {
194
- "type": "text",
195
- "typeSchema": null,
196
- "notNull": true,
197
- "dimensions": 0,
198
- "default": null,
199
- "generated": null,
200
- "identity": null,
201
- "name": "f_store_id",
202
- "entityType": "columns",
203
- "schema": "public",
204
- "table": "t_persistence_state"
205
- },
206
- {
207
- "type": "text",
208
- "typeSchema": null,
209
- "notNull": true,
210
- "dimensions": 0,
211
- "default": null,
212
- "generated": null,
213
- "identity": null,
214
- "name": "f_key",
215
- "entityType": "columns",
216
- "schema": "public",
217
- "table": "t_schema_meta"
218
- },
219
- {
220
- "type": "text",
221
- "typeSchema": null,
222
- "notNull": true,
223
- "dimensions": 0,
224
- "default": null,
225
- "generated": null,
226
- "identity": null,
227
- "name": "f_value",
228
- "entityType": "columns",
229
- "schema": "public",
230
- "table": "t_schema_meta"
231
- },
232
- {
233
- "type": "serial",
234
- "typeSchema": null,
235
- "notNull": true,
236
- "dimensions": 0,
237
- "default": null,
238
- "generated": null,
239
- "identity": null,
240
- "name": "f_id",
241
- "entityType": "columns",
242
- "schema": "public",
243
- "table": "t_session_events"
244
- },
245
- {
246
- "type": "text",
247
- "typeSchema": null,
248
- "notNull": true,
249
- "dimensions": 0,
250
- "default": null,
251
- "generated": null,
252
- "identity": null,
253
- "name": "f_session_id",
254
- "entityType": "columns",
255
- "schema": "public",
256
- "table": "t_session_events"
257
- },
258
- {
259
- "type": "text",
260
- "typeSchema": null,
261
- "notNull": true,
262
- "dimensions": 0,
263
- "default": null,
264
- "generated": null,
265
- "identity": null,
266
- "name": "f_event_id",
267
- "entityType": "columns",
268
- "schema": "public",
269
- "table": "t_session_events"
270
- },
271
- {
272
- "type": "integer",
273
- "typeSchema": null,
274
- "notNull": true,
275
- "dimensions": 0,
276
- "default": null,
277
- "generated": null,
278
- "identity": null,
279
- "name": "f_sequence",
280
- "entityType": "columns",
281
- "schema": "public",
282
- "table": "t_session_events"
283
- },
284
- {
285
- "type": "text",
286
- "typeSchema": null,
287
- "notNull": false,
288
- "dimensions": 0,
289
- "default": null,
290
- "generated": null,
291
- "identity": null,
292
- "name": "f_surface_op",
293
- "entityType": "columns",
294
- "schema": "public",
295
- "table": "t_session_events"
296
- },
297
- {
298
- "type": "serial",
299
- "typeSchema": null,
300
- "notNull": true,
301
- "dimensions": 0,
302
- "default": null,
303
- "generated": null,
304
- "identity": null,
305
- "name": "f_id",
306
- "entityType": "columns",
307
- "schema": "public",
308
- "table": "t_sessions"
309
- },
310
- {
311
- "type": "text",
312
- "typeSchema": null,
313
- "notNull": true,
314
- "dimensions": 0,
315
- "default": null,
316
- "generated": null,
317
- "identity": null,
318
- "name": "f_session_id",
319
- "entityType": "columns",
320
- "schema": "public",
321
- "table": "t_sessions"
322
- },
323
- {
324
- "type": "text",
325
- "typeSchema": null,
326
- "notNull": true,
327
- "dimensions": 0,
328
- "default": "''",
329
- "generated": null,
330
- "identity": null,
331
- "name": "f_head_event_id",
332
- "entityType": "columns",
333
- "schema": "public",
334
- "table": "t_sessions"
335
- },
336
- {
337
- "type": "integer",
338
- "typeSchema": null,
339
- "notNull": true,
340
- "dimensions": 0,
341
- "default": "-1",
342
- "generated": null,
343
- "identity": null,
344
- "name": "f_head_sequence",
345
- "entityType": "columns",
346
- "schema": "public",
347
- "table": "t_sessions"
348
- },
349
- {
350
- "type": "integer",
351
- "typeSchema": null,
352
- "notNull": true,
353
- "dimensions": 0,
354
- "default": null,
355
- "generated": null,
356
- "identity": null,
357
- "name": "f_version",
358
- "entityType": "columns",
359
- "schema": "public",
360
- "table": "t_sessions"
361
- },
362
- {
363
- "type": "bigint",
364
- "typeSchema": null,
365
- "notNull": true,
366
- "dimensions": 0,
367
- "default": null,
368
- "generated": null,
369
- "identity": null,
370
- "name": "f_created_at",
371
- "entityType": "columns",
372
- "schema": "public",
373
- "table": "t_sessions"
374
- },
375
- {
376
- "type": "text",
377
- "typeSchema": null,
378
- "notNull": false,
379
- "dimensions": 0,
380
- "default": null,
381
- "generated": null,
382
- "identity": null,
383
- "name": "f_cwd",
384
- "entityType": "columns",
385
- "schema": "public",
386
- "table": "t_sessions"
387
- },
388
- {
389
- "type": "text",
390
- "typeSchema": null,
391
- "notNull": false,
392
- "dimensions": 0,
393
- "default": null,
394
- "generated": null,
395
- "identity": null,
396
- "name": "f_parent_session",
397
- "entityType": "columns",
398
- "schema": "public",
399
- "table": "t_sessions"
400
- },
401
- {
402
- "type": "integer",
403
- "typeSchema": null,
404
- "notNull": false,
405
- "dimensions": 0,
406
- "default": null,
407
- "generated": null,
408
- "identity": null,
409
- "name": "f_seed_length",
410
- "entityType": "columns",
411
- "schema": "public",
412
- "table": "t_sessions"
413
- },
414
- {
415
- "type": "text",
416
- "typeSchema": null,
417
- "notNull": false,
418
- "dimensions": 0,
419
- "default": null,
420
- "generated": null,
421
- "identity": null,
422
- "name": "f_origin",
423
- "entityType": "columns",
424
- "schema": "public",
425
- "table": "t_sessions"
426
- },
427
- {
428
- "type": "integer",
429
- "typeSchema": null,
430
- "notNull": false,
431
- "dimensions": 0,
432
- "default": null,
433
- "generated": null,
434
- "identity": null,
435
- "name": "f_delegation_depth",
436
- "entityType": "columns",
437
- "schema": "public",
438
- "table": "t_sessions"
439
- },
440
- {
441
- "type": "text",
442
- "typeSchema": null,
443
- "notNull": true,
444
- "dimensions": 0,
445
- "default": null,
446
- "generated": null,
447
- "identity": null,
448
- "name": "f_incarnation",
449
- "entityType": "columns",
450
- "schema": "public",
451
- "table": "t_sessions"
452
- },
453
- {
454
- "type": "integer",
455
- "typeSchema": null,
456
- "notNull": true,
457
- "dimensions": 0,
458
- "default": null,
459
- "generated": null,
460
- "identity": null,
461
- "name": "f_revision",
462
- "entityType": "columns",
463
- "schema": "public",
464
- "table": "t_sessions"
465
- },
466
- {
467
- "nameExplicit": true,
468
- "columns": [
469
- {
470
- "value": "f_kind",
471
- "isExpression": false,
472
- "asc": true,
473
- "nullsFirst": false,
474
- "opclass": null
475
- }
476
- ],
477
- "isUnique": false,
478
- "where": null,
479
- "with": "",
480
- "method": "btree",
481
- "concurrently": false,
482
- "name": "idx_events_kind",
483
- "entityType": "indexes",
484
- "schema": "public",
485
- "table": "t_events"
486
- },
487
- {
488
- "nameExplicit": true,
489
- "columns": [
490
- {
491
- "value": "f_role",
492
- "isExpression": false,
493
- "asc": true,
494
- "nullsFirst": false,
495
- "opclass": null
496
- }
497
- ],
498
- "isUnique": false,
499
- "where": null,
500
- "with": "",
501
- "method": "btree",
502
- "concurrently": false,
503
- "name": "idx_events_role",
504
- "entityType": "indexes",
505
- "schema": "public",
506
- "table": "t_events"
507
- },
508
- {
509
- "nameExplicit": true,
510
- "columns": [
511
- {
512
- "value": "f_name",
513
- "isExpression": false,
514
- "asc": true,
515
- "nullsFirst": false,
516
- "opclass": null
517
- }
518
- ],
519
- "isUnique": false,
520
- "where": null,
521
- "with": "",
522
- "method": "btree",
523
- "concurrently": false,
524
- "name": "idx_events_name",
525
- "entityType": "indexes",
526
- "schema": "public",
527
- "table": "t_events"
528
- },
529
- {
530
- "nameExplicit": true,
531
- "columns": [
532
- {
533
- "value": "f_action_id",
534
- "isExpression": false,
535
- "asc": true,
536
- "nullsFirst": false,
537
- "opclass": null
538
- }
539
- ],
540
- "isUnique": false,
541
- "where": null,
542
- "with": "",
543
- "method": "btree",
544
- "concurrently": false,
545
- "name": "idx_events_action_id",
546
- "entityType": "indexes",
547
- "schema": "public",
548
- "table": "t_events"
549
- },
550
- {
551
- "nameExplicit": true,
552
- "columns": [
553
- {
554
- "value": "f_event_id",
555
- "isExpression": false,
556
- "asc": true,
557
- "nullsFirst": false,
558
- "opclass": null
559
- }
560
- ],
561
- "isUnique": false,
562
- "where": null,
563
- "with": "",
564
- "method": "btree",
565
- "concurrently": false,
566
- "name": "idx_session_events_event_id",
567
- "entityType": "indexes",
568
- "schema": "public",
569
- "table": "t_session_events"
570
- },
571
- {
572
- "nameExplicit": false,
573
- "columns": ["f_session_id"],
574
- "schemaTo": "public",
575
- "tableTo": "t_sessions",
576
- "columnsTo": ["f_session_id"],
577
- "onUpdate": "NO ACTION",
578
- "onDelete": "CASCADE",
579
- "name": "t_session_events_f_session_id_t_sessions_f_session_id_fkey",
580
- "entityType": "fks",
581
- "schema": "public",
582
- "table": "t_session_events"
583
- },
584
- {
585
- "nameExplicit": false,
586
- "columns": ["f_event_id"],
587
- "schemaTo": "public",
588
- "tableTo": "t_events",
589
- "columnsTo": ["f_event_id"],
590
- "onUpdate": "NO ACTION",
591
- "onDelete": "CASCADE",
592
- "name": "t_session_events_f_event_id_t_events_f_event_id_fkey",
593
- "entityType": "fks",
594
- "schema": "public",
595
- "table": "t_session_events"
596
- },
597
- {
598
- "columns": ["f_id"],
599
- "nameExplicit": false,
600
- "name": "t_events_pkey",
601
- "schema": "public",
602
- "table": "t_events",
603
- "entityType": "pks"
604
- },
605
- {
606
- "columns": ["f_singleton"],
607
- "nameExplicit": false,
608
- "name": "t_persistence_state_pkey",
609
- "schema": "public",
610
- "table": "t_persistence_state",
611
- "entityType": "pks"
612
- },
613
- {
614
- "columns": ["f_key"],
615
- "nameExplicit": false,
616
- "name": "t_schema_meta_pkey",
617
- "schema": "public",
618
- "table": "t_schema_meta",
619
- "entityType": "pks"
620
- },
621
- {
622
- "columns": ["f_id"],
623
- "nameExplicit": false,
624
- "name": "t_session_events_pkey",
625
- "schema": "public",
626
- "table": "t_session_events",
627
- "entityType": "pks"
628
- },
629
- {
630
- "columns": ["f_id"],
631
- "nameExplicit": false,
632
- "name": "t_sessions_pkey",
633
- "schema": "public",
634
- "table": "t_sessions",
635
- "entityType": "pks"
636
- },
637
- {
638
- "nameExplicit": true,
639
- "columns": ["f_session_id", "f_sequence"],
640
- "nullsNotDistinct": false,
641
- "name": "uq_session_events_session_sequence",
642
- "entityType": "uniques",
643
- "schema": "public",
644
- "table": "t_session_events"
645
- },
646
- {
647
- "nameExplicit": false,
648
- "columns": ["f_event_id"],
649
- "nullsNotDistinct": false,
650
- "name": "t_events_f_event_id_key",
651
- "schema": "public",
652
- "table": "t_events",
653
- "entityType": "uniques"
654
- },
655
- {
656
- "nameExplicit": false,
657
- "columns": ["f_session_id"],
658
- "nullsNotDistinct": false,
659
- "name": "t_sessions_f_session_id_key",
660
- "schema": "public",
661
- "table": "t_sessions",
662
- "entityType": "uniques"
663
- },
664
- {
665
- "value": "f_singleton = 1",
666
- "name": "ck_persistence_state_singleton",
667
- "entityType": "checks",
668
- "schema": "public",
669
- "table": "t_persistence_state"
670
- },
671
- {
672
- "isRlsEnabled": false,
673
- "name": "t_session_projcache_row",
674
- "entityType": "tables",
675
- "schema": "public"
676
- },
677
- {
678
- "isRlsEnabled": false,
679
- "name": "t_storage_units",
680
- "entityType": "tables",
681
- "schema": "public"
682
- },
683
- {
684
- "isRlsEnabled": false,
685
- "name": "t_workspace_state",
686
- "entityType": "tables",
687
- "schema": "public"
688
- },
689
- {
690
- "isRlsEnabled": false,
691
- "name": "t_workspaces",
692
- "entityType": "tables",
693
- "schema": "public"
694
- },
695
- {
696
- "isRlsEnabled": false,
697
- "name": "t_workspace_sessions",
698
- "entityType": "tables",
699
- "schema": "public"
700
- },
701
- {
702
- "type": "bigint",
703
- "typeSchema": null,
704
- "notNull": false,
705
- "dimensions": 0,
706
- "default": null,
707
- "generated": null,
708
- "identity": null,
709
- "name": "f_archived_at",
710
- "entityType": "columns",
711
- "schema": "public",
712
- "table": "t_sessions"
713
- },
714
- {
715
- "type": "text",
716
- "typeSchema": null,
717
- "notNull": false,
718
- "dimensions": 0,
719
- "default": null,
720
- "generated": null,
721
- "identity": null,
722
- "name": "f_title",
723
- "entityType": "columns",
724
- "schema": "public",
725
- "table": "t_sessions"
726
- },
727
- {
728
- "type": "integer",
729
- "typeSchema": null,
730
- "notNull": false,
731
- "dimensions": 0,
732
- "default": null,
733
- "generated": null,
734
- "identity": null,
735
- "name": "f_title_seq",
736
- "entityType": "columns",
737
- "schema": "public",
738
- "table": "t_sessions"
739
- },
740
- {
741
- "type": "serial",
742
- "typeSchema": null,
743
- "notNull": true,
744
- "dimensions": 0,
745
- "default": null,
746
- "generated": null,
747
- "identity": null,
748
- "name": "f_id",
749
- "entityType": "columns",
750
- "schema": "public",
751
- "table": "t_session_projcache_row"
752
- },
753
- {
754
- "type": "text",
755
- "typeSchema": null,
756
- "notNull": true,
757
- "dimensions": 0,
758
- "default": null,
759
- "generated": null,
760
- "identity": null,
761
- "name": "f_session_id",
762
- "entityType": "columns",
763
- "schema": "public",
764
- "table": "t_session_projcache_row"
765
- },
766
- {
767
- "type": "text",
768
- "typeSchema": null,
769
- "notNull": true,
770
- "dimensions": 0,
771
- "default": null,
772
- "generated": null,
773
- "identity": null,
774
- "name": "f_key",
775
- "entityType": "columns",
776
- "schema": "public",
777
- "table": "t_session_projcache_row"
778
- },
779
- {
780
- "type": "integer",
781
- "typeSchema": null,
782
- "notNull": true,
783
- "dimensions": 0,
784
- "default": null,
785
- "generated": null,
786
- "identity": null,
787
- "name": "f_ver",
788
- "entityType": "columns",
789
- "schema": "public",
790
- "table": "t_session_projcache_row"
791
- },
792
- {
793
- "type": "integer",
794
- "typeSchema": null,
795
- "notNull": true,
796
- "dimensions": 0,
797
- "default": null,
798
- "generated": null,
799
- "identity": null,
800
- "name": "f_seq",
801
- "entityType": "columns",
802
- "schema": "public",
803
- "table": "t_session_projcache_row"
804
- },
805
- {
806
- "type": "text",
807
- "typeSchema": null,
808
- "notNull": true,
809
- "dimensions": 0,
810
- "default": null,
811
- "generated": null,
812
- "identity": null,
813
- "name": "f_val",
814
- "entityType": "columns",
815
- "schema": "public",
816
- "table": "t_session_projcache_row"
817
- },
818
- {
819
- "type": "text",
820
- "typeSchema": null,
821
- "notNull": true,
822
- "dimensions": 0,
823
- "default": null,
824
- "generated": null,
825
- "identity": null,
826
- "name": "f_name",
827
- "entityType": "columns",
828
- "schema": "public",
829
- "table": "t_storage_units"
830
- },
831
- {
832
- "type": "integer",
833
- "typeSchema": null,
834
- "notNull": true,
835
- "dimensions": 0,
836
- "default": null,
837
- "generated": null,
838
- "identity": null,
839
- "name": "f_version",
840
- "entityType": "columns",
841
- "schema": "public",
842
- "table": "t_storage_units"
843
- },
844
- {
845
- "type": "integer",
846
- "typeSchema": null,
847
- "notNull": true,
848
- "dimensions": 0,
849
- "default": null,
850
- "generated": null,
851
- "identity": null,
852
- "name": "f_singleton",
853
- "entityType": "columns",
854
- "schema": "public",
855
- "table": "t_workspace_state"
856
- },
857
- {
858
- "type": "integer",
859
- "typeSchema": null,
860
- "notNull": true,
861
- "dimensions": 0,
862
- "default": null,
863
- "generated": null,
864
- "identity": null,
865
- "name": "f_initialized",
866
- "entityType": "columns",
867
- "schema": "public",
868
- "table": "t_workspace_state"
869
- },
870
- {
871
- "type": "text",
872
- "typeSchema": null,
873
- "notNull": false,
874
- "dimensions": 0,
875
- "default": null,
876
- "generated": null,
877
- "identity": null,
878
- "name": "f_pending_operation",
879
- "entityType": "columns",
880
- "schema": "public",
881
- "table": "t_workspace_state"
882
- },
883
- {
884
- "type": "text",
885
- "typeSchema": null,
886
- "notNull": false,
887
- "dimensions": 0,
888
- "default": null,
889
- "generated": null,
890
- "identity": null,
891
- "name": "f_pending_workspace_id",
892
- "entityType": "columns",
893
- "schema": "public",
894
- "table": "t_workspace_state"
895
- },
896
- {
897
- "type": "serial",
898
- "typeSchema": null,
899
- "notNull": true,
900
- "dimensions": 0,
901
- "default": null,
902
- "generated": null,
903
- "identity": null,
904
- "name": "f_id",
905
- "entityType": "columns",
906
- "schema": "public",
907
- "table": "t_workspaces"
908
- },
909
- {
910
- "type": "text",
911
- "typeSchema": null,
912
- "notNull": true,
913
- "dimensions": 0,
914
- "default": null,
915
- "generated": null,
916
- "identity": null,
917
- "name": "f_workspace_id",
918
- "entityType": "columns",
919
- "schema": "public",
920
- "table": "t_workspaces"
921
- },
922
- {
923
- "type": "text",
924
- "typeSchema": null,
925
- "notNull": true,
926
- "dimensions": 0,
927
- "default": null,
928
- "generated": null,
929
- "identity": null,
930
- "name": "f_path",
931
- "entityType": "columns",
932
- "schema": "public",
933
- "table": "t_workspaces"
934
- },
935
- {
936
- "type": "text",
937
- "typeSchema": null,
938
- "notNull": true,
939
- "dimensions": 0,
940
- "default": null,
941
- "generated": null,
942
- "identity": null,
943
- "name": "f_title",
944
- "entityType": "columns",
945
- "schema": "public",
946
- "table": "t_workspaces"
947
- },
948
- {
949
- "type": "text",
950
- "typeSchema": null,
951
- "notNull": true,
952
- "dimensions": 0,
953
- "default": null,
954
- "generated": null,
955
- "identity": null,
956
- "name": "f_created_at",
957
- "entityType": "columns",
958
- "schema": "public",
959
- "table": "t_workspaces"
960
- },
961
- {
962
- "type": "text",
963
- "typeSchema": null,
964
- "notNull": true,
965
- "dimensions": 0,
966
- "default": null,
967
- "generated": null,
968
- "identity": null,
969
- "name": "f_updated_at",
970
- "entityType": "columns",
971
- "schema": "public",
972
- "table": "t_workspaces"
973
- },
974
- {
975
- "type": "integer",
976
- "typeSchema": null,
977
- "notNull": true,
978
- "dimensions": 0,
979
- "default": "-1",
980
- "generated": null,
981
- "identity": null,
982
- "name": "f_position",
983
- "entityType": "columns",
984
- "schema": "public",
985
- "table": "t_workspaces"
986
- },
987
- {
988
- "type": "serial",
989
- "typeSchema": null,
990
- "notNull": true,
991
- "dimensions": 0,
992
- "default": null,
993
- "generated": null,
994
- "identity": null,
995
- "name": "f_id",
996
- "entityType": "columns",
997
- "schema": "public",
998
- "table": "t_workspace_sessions"
999
- },
1000
- {
1001
- "type": "text",
1002
- "typeSchema": null,
1003
- "notNull": true,
1004
- "dimensions": 0,
1005
- "default": null,
1006
- "generated": null,
1007
- "identity": null,
1008
- "name": "f_workspace_id",
1009
- "entityType": "columns",
1010
- "schema": "public",
1011
- "table": "t_workspace_sessions"
1012
- },
1013
- {
1014
- "type": "text",
1015
- "typeSchema": null,
1016
- "notNull": true,
1017
- "dimensions": 0,
1018
- "default": null,
1019
- "generated": null,
1020
- "identity": null,
1021
- "name": "f_session_id",
1022
- "entityType": "columns",
1023
- "schema": "public",
1024
- "table": "t_workspace_sessions"
1025
- },
1026
- {
1027
- "type": "integer",
1028
- "typeSchema": null,
1029
- "notNull": true,
1030
- "dimensions": 0,
1031
- "default": null,
1032
- "generated": null,
1033
- "identity": null,
1034
- "name": "f_position",
1035
- "entityType": "columns",
1036
- "schema": "public",
1037
- "table": "t_workspace_sessions"
1038
- },
1039
- {
1040
- "columns": ["f_id"],
1041
- "nameExplicit": false,
1042
- "name": "t_session_projcache_row_pkey",
1043
- "schema": "public",
1044
- "table": "t_session_projcache_row",
1045
- "entityType": "pks"
1046
- },
1047
- {
1048
- "columns": ["f_name"],
1049
- "nameExplicit": false,
1050
- "name": "t_storage_units_pkey",
1051
- "schema": "public",
1052
- "table": "t_storage_units",
1053
- "entityType": "pks"
1054
- },
1055
- {
1056
- "columns": ["f_singleton"],
1057
- "nameExplicit": false,
1058
- "name": "t_workspace_state_pkey",
1059
- "schema": "public",
1060
- "table": "t_workspace_state",
1061
- "entityType": "pks"
1062
- },
1063
- {
1064
- "columns": ["f_id"],
1065
- "nameExplicit": false,
1066
- "name": "t_workspaces_pkey",
1067
- "schema": "public",
1068
- "table": "t_workspaces",
1069
- "entityType": "pks"
1070
- },
1071
- {
1072
- "columns": ["f_id"],
1073
- "nameExplicit": false,
1074
- "name": "t_workspace_sessions_pkey",
1075
- "schema": "public",
1076
- "table": "t_workspace_sessions",
1077
- "entityType": "pks"
1078
- },
1079
- {
1080
- "columns": ["f_session_id", "f_key"],
1081
- "nameExplicit": true,
1082
- "name": "uq_session_projcache_row_session_key",
1083
- "entityType": "uniques",
1084
- "table": "t_session_projcache_row",
1085
- "nullsNotDistinct": false,
1086
- "schema": "public"
1087
- },
1088
- {
1089
- "columns": ["f_workspace_id"],
1090
- "nameExplicit": false,
1091
- "name": "t_workspaces_f_workspace_id_unique",
1092
- "entityType": "uniques",
1093
- "table": "t_workspaces",
1094
- "nullsNotDistinct": false,
1095
- "schema": "public"
1096
- },
1097
- {
1098
- "columns": ["f_workspace_id", "f_session_id"],
1099
- "nameExplicit": true,
1100
- "name": "uq_workspace_sessions_workspace_session",
1101
- "entityType": "uniques",
1102
- "table": "t_workspace_sessions",
1103
- "nullsNotDistinct": false,
1104
- "schema": "public"
1105
- },
1106
- {
1107
- "nameExplicit": true,
1108
- "columns": [
1109
- {
1110
- "value": "f_key",
1111
- "isExpression": false,
1112
- "asc": true,
1113
- "nullsFirst": false,
1114
- "opclass": null
1115
- }
1116
- ],
1117
- "isUnique": false,
1118
- "where": null,
1119
- "with": "",
1120
- "method": "btree",
1121
- "concurrently": false,
1122
- "name": "idx_session_projcache_row_key",
1123
- "entityType": "indexes",
1124
- "schema": "public",
1125
- "table": "t_session_projcache_row"
1126
- },
1127
- {
1128
- "nameExplicit": true,
1129
- "columns": [
1130
- {
1131
- "value": "f_session_id",
1132
- "isExpression": false,
1133
- "asc": true,
1134
- "nullsFirst": false,
1135
- "opclass": null
1136
- }
1137
- ],
1138
- "isUnique": false,
1139
- "where": null,
1140
- "with": "",
1141
- "method": "btree",
1142
- "concurrently": false,
1143
- "name": "idx_workspace_sessions_session_id",
1144
- "entityType": "indexes",
1145
- "schema": "public",
1146
- "table": "t_workspace_sessions"
1147
- },
1148
- {
1149
- "value": "f_singleton = 1",
1150
- "name": "ck_workspace_state_singleton",
1151
- "entityType": "checks",
1152
- "table": "t_workspace_state",
1153
- "schema": "public"
1154
- },
1155
- {
1156
- "columns": ["f_session_id"],
1157
- "tableTo": "t_sessions",
1158
- "columnsTo": ["f_session_id"],
1159
- "onUpdate": "NO ACTION",
1160
- "onDelete": "CASCADE",
1161
- "nameExplicit": false,
1162
- "name": "fk_t_session_projcache_row_f_session_id_t_sessions_f_session_id_fk",
1163
- "entityType": "fks",
1164
- "table": "t_session_projcache_row",
1165
- "schemaTo": "public",
1166
- "schema": "public"
1167
- },
1168
- {
1169
- "columns": ["f_workspace_id"],
1170
- "tableTo": "t_workspaces",
1171
- "columnsTo": ["f_workspace_id"],
1172
- "onUpdate": "NO ACTION",
1173
- "onDelete": "CASCADE",
1174
- "nameExplicit": false,
1175
- "name": "fk_t_workspace_sessions_f_workspace_id_t_workspaces_f_workspace_id_fk",
1176
- "entityType": "fks",
1177
- "table": "t_workspace_sessions",
1178
- "schemaTo": "public",
1179
- "schema": "public"
1180
- }
1181
- ],
1182
- "renames": []
1183
- }