@elizaos/plugin-sql 1.0.0-alpha.52 → 1.0.0-alpha.53

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.
@@ -0,0 +1,1418 @@
1
+ {
2
+ "id": "e868cf2d-10a2-406f-a31e-9342a0f29c35",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.agents": {
8
+ "name": "agents",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "createdAt": {
19
+ "name": "createdAt",
20
+ "type": "timestamptz",
21
+ "primaryKey": false,
22
+ "notNull": true,
23
+ "default": "now()"
24
+ },
25
+ "updatedAt": {
26
+ "name": "updatedAt",
27
+ "type": "timestamptz",
28
+ "primaryKey": false,
29
+ "notNull": true,
30
+ "default": "now()"
31
+ },
32
+ "name": {
33
+ "name": "name",
34
+ "type": "text",
35
+ "primaryKey": false,
36
+ "notNull": false
37
+ },
38
+ "username": {
39
+ "name": "username",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": false
43
+ },
44
+ "system": {
45
+ "name": "system",
46
+ "type": "text",
47
+ "primaryKey": false,
48
+ "notNull": false
49
+ },
50
+ "bio": {
51
+ "name": "bio",
52
+ "type": "jsonb",
53
+ "primaryKey": false,
54
+ "notNull": true
55
+ },
56
+ "message_examples": {
57
+ "name": "message_examples",
58
+ "type": "jsonb",
59
+ "primaryKey": false,
60
+ "notNull": false,
61
+ "default": "'[]'::jsonb"
62
+ },
63
+ "post_examples": {
64
+ "name": "post_examples",
65
+ "type": "jsonb",
66
+ "primaryKey": false,
67
+ "notNull": false,
68
+ "default": "'[]'::jsonb"
69
+ },
70
+ "topics": {
71
+ "name": "topics",
72
+ "type": "jsonb",
73
+ "primaryKey": false,
74
+ "notNull": false,
75
+ "default": "'[]'::jsonb"
76
+ },
77
+ "adjectives": {
78
+ "name": "adjectives",
79
+ "type": "jsonb",
80
+ "primaryKey": false,
81
+ "notNull": false,
82
+ "default": "'[]'::jsonb"
83
+ },
84
+ "knowledge": {
85
+ "name": "knowledge",
86
+ "type": "jsonb",
87
+ "primaryKey": false,
88
+ "notNull": false,
89
+ "default": "'[]'::jsonb"
90
+ },
91
+ "plugins": {
92
+ "name": "plugins",
93
+ "type": "jsonb",
94
+ "primaryKey": false,
95
+ "notNull": false,
96
+ "default": "'[]'::jsonb"
97
+ },
98
+ "settings": {
99
+ "name": "settings",
100
+ "type": "jsonb",
101
+ "primaryKey": false,
102
+ "notNull": false,
103
+ "default": "'{}'::jsonb"
104
+ },
105
+ "style": {
106
+ "name": "style",
107
+ "type": "jsonb",
108
+ "primaryKey": false,
109
+ "notNull": false,
110
+ "default": "'{}'::jsonb"
111
+ }
112
+ },
113
+ "indexes": {},
114
+ "foreignKeys": {},
115
+ "compositePrimaryKeys": {},
116
+ "uniqueConstraints": {
117
+ "name_unique": {
118
+ "name": "name_unique",
119
+ "nullsNotDistinct": false,
120
+ "columns": [
121
+ "name"
122
+ ]
123
+ }
124
+ },
125
+ "policies": {},
126
+ "checkConstraints": {},
127
+ "isRLSEnabled": false
128
+ },
129
+ "public.cache": {
130
+ "name": "cache",
131
+ "schema": "",
132
+ "columns": {
133
+ "id": {
134
+ "name": "id",
135
+ "type": "uuid",
136
+ "primaryKey": true,
137
+ "notNull": true,
138
+ "default": "gen_random_uuid()"
139
+ },
140
+ "key": {
141
+ "name": "key",
142
+ "type": "text",
143
+ "primaryKey": false,
144
+ "notNull": true
145
+ },
146
+ "agentId": {
147
+ "name": "agentId",
148
+ "type": "uuid",
149
+ "primaryKey": false,
150
+ "notNull": true
151
+ },
152
+ "value": {
153
+ "name": "value",
154
+ "type": "jsonb",
155
+ "primaryKey": false,
156
+ "notNull": true
157
+ },
158
+ "createdAt": {
159
+ "name": "createdAt",
160
+ "type": "timestamptz",
161
+ "primaryKey": false,
162
+ "notNull": true,
163
+ "default": "now()"
164
+ },
165
+ "expiresAt": {
166
+ "name": "expiresAt",
167
+ "type": "timestamptz",
168
+ "primaryKey": false,
169
+ "notNull": false
170
+ }
171
+ },
172
+ "indexes": {},
173
+ "foreignKeys": {
174
+ "cache_agentId_agents_id_fk": {
175
+ "name": "cache_agentId_agents_id_fk",
176
+ "tableFrom": "cache",
177
+ "tableTo": "agents",
178
+ "columnsFrom": [
179
+ "agentId"
180
+ ],
181
+ "columnsTo": [
182
+ "id"
183
+ ],
184
+ "onDelete": "cascade",
185
+ "onUpdate": "no action"
186
+ }
187
+ },
188
+ "compositePrimaryKeys": {},
189
+ "uniqueConstraints": {
190
+ "cache_key_agent_unique": {
191
+ "name": "cache_key_agent_unique",
192
+ "nullsNotDistinct": false,
193
+ "columns": [
194
+ "key",
195
+ "agentId"
196
+ ]
197
+ }
198
+ },
199
+ "policies": {},
200
+ "checkConstraints": {},
201
+ "isRLSEnabled": false
202
+ },
203
+ "public.components": {
204
+ "name": "components",
205
+ "schema": "",
206
+ "columns": {
207
+ "id": {
208
+ "name": "id",
209
+ "type": "uuid",
210
+ "primaryKey": true,
211
+ "notNull": true,
212
+ "default": "gen_random_uuid()"
213
+ },
214
+ "entityId": {
215
+ "name": "entityId",
216
+ "type": "uuid",
217
+ "primaryKey": false,
218
+ "notNull": true
219
+ },
220
+ "agentId": {
221
+ "name": "agentId",
222
+ "type": "uuid",
223
+ "primaryKey": false,
224
+ "notNull": true
225
+ },
226
+ "roomId": {
227
+ "name": "roomId",
228
+ "type": "uuid",
229
+ "primaryKey": false,
230
+ "notNull": true
231
+ },
232
+ "worldId": {
233
+ "name": "worldId",
234
+ "type": "uuid",
235
+ "primaryKey": false,
236
+ "notNull": false
237
+ },
238
+ "sourceEntityId": {
239
+ "name": "sourceEntityId",
240
+ "type": "uuid",
241
+ "primaryKey": false,
242
+ "notNull": false
243
+ },
244
+ "type": {
245
+ "name": "type",
246
+ "type": "text",
247
+ "primaryKey": false,
248
+ "notNull": true
249
+ },
250
+ "data": {
251
+ "name": "data",
252
+ "type": "jsonb",
253
+ "primaryKey": false,
254
+ "notNull": false,
255
+ "default": "'{}'::jsonb"
256
+ },
257
+ "createdAt": {
258
+ "name": "createdAt",
259
+ "type": "timestamptz",
260
+ "primaryKey": false,
261
+ "notNull": true,
262
+ "default": "now()"
263
+ }
264
+ },
265
+ "indexes": {},
266
+ "foreignKeys": {
267
+ "components_entityId_entities_id_fk": {
268
+ "name": "components_entityId_entities_id_fk",
269
+ "tableFrom": "components",
270
+ "tableTo": "entities",
271
+ "columnsFrom": [
272
+ "entityId"
273
+ ],
274
+ "columnsTo": [
275
+ "id"
276
+ ],
277
+ "onDelete": "cascade",
278
+ "onUpdate": "no action"
279
+ },
280
+ "components_agentId_agents_id_fk": {
281
+ "name": "components_agentId_agents_id_fk",
282
+ "tableFrom": "components",
283
+ "tableTo": "agents",
284
+ "columnsFrom": [
285
+ "agentId"
286
+ ],
287
+ "columnsTo": [
288
+ "id"
289
+ ],
290
+ "onDelete": "cascade",
291
+ "onUpdate": "no action"
292
+ },
293
+ "components_roomId_rooms_id_fk": {
294
+ "name": "components_roomId_rooms_id_fk",
295
+ "tableFrom": "components",
296
+ "tableTo": "rooms",
297
+ "columnsFrom": [
298
+ "roomId"
299
+ ],
300
+ "columnsTo": [
301
+ "id"
302
+ ],
303
+ "onDelete": "cascade",
304
+ "onUpdate": "no action"
305
+ },
306
+ "components_worldId_worlds_id_fk": {
307
+ "name": "components_worldId_worlds_id_fk",
308
+ "tableFrom": "components",
309
+ "tableTo": "worlds",
310
+ "columnsFrom": [
311
+ "worldId"
312
+ ],
313
+ "columnsTo": [
314
+ "id"
315
+ ],
316
+ "onDelete": "cascade",
317
+ "onUpdate": "no action"
318
+ },
319
+ "components_sourceEntityId_entities_id_fk": {
320
+ "name": "components_sourceEntityId_entities_id_fk",
321
+ "tableFrom": "components",
322
+ "tableTo": "entities",
323
+ "columnsFrom": [
324
+ "sourceEntityId"
325
+ ],
326
+ "columnsTo": [
327
+ "id"
328
+ ],
329
+ "onDelete": "cascade",
330
+ "onUpdate": "no action"
331
+ }
332
+ },
333
+ "compositePrimaryKeys": {},
334
+ "uniqueConstraints": {},
335
+ "policies": {},
336
+ "checkConstraints": {},
337
+ "isRLSEnabled": false
338
+ },
339
+ "public.embeddings": {
340
+ "name": "embeddings",
341
+ "schema": "",
342
+ "columns": {
343
+ "id": {
344
+ "name": "id",
345
+ "type": "uuid",
346
+ "primaryKey": true,
347
+ "notNull": true,
348
+ "default": "gen_random_uuid()"
349
+ },
350
+ "memory_id": {
351
+ "name": "memory_id",
352
+ "type": "uuid",
353
+ "primaryKey": false,
354
+ "notNull": false
355
+ },
356
+ "created_at": {
357
+ "name": "created_at",
358
+ "type": "timestamptz",
359
+ "primaryKey": false,
360
+ "notNull": true,
361
+ "default": "now()"
362
+ },
363
+ "dim_384": {
364
+ "name": "dim_384",
365
+ "type": "vector(384)",
366
+ "primaryKey": false,
367
+ "notNull": false
368
+ },
369
+ "dim_512": {
370
+ "name": "dim_512",
371
+ "type": "vector(512)",
372
+ "primaryKey": false,
373
+ "notNull": false
374
+ },
375
+ "dim_768": {
376
+ "name": "dim_768",
377
+ "type": "vector(768)",
378
+ "primaryKey": false,
379
+ "notNull": false
380
+ },
381
+ "dim_1024": {
382
+ "name": "dim_1024",
383
+ "type": "vector(1024)",
384
+ "primaryKey": false,
385
+ "notNull": false
386
+ },
387
+ "dim_1536": {
388
+ "name": "dim_1536",
389
+ "type": "vector(1536)",
390
+ "primaryKey": false,
391
+ "notNull": false
392
+ },
393
+ "dim_3072": {
394
+ "name": "dim_3072",
395
+ "type": "vector(3072)",
396
+ "primaryKey": false,
397
+ "notNull": false
398
+ }
399
+ },
400
+ "indexes": {
401
+ "idx_embedding_memory": {
402
+ "name": "idx_embedding_memory",
403
+ "columns": [
404
+ {
405
+ "expression": "memory_id",
406
+ "isExpression": false,
407
+ "asc": true,
408
+ "nulls": "last"
409
+ }
410
+ ],
411
+ "isUnique": false,
412
+ "concurrently": false,
413
+ "method": "btree",
414
+ "with": {}
415
+ }
416
+ },
417
+ "foreignKeys": {
418
+ "embeddings_memory_id_memories_id_fk": {
419
+ "name": "embeddings_memory_id_memories_id_fk",
420
+ "tableFrom": "embeddings",
421
+ "tableTo": "memories",
422
+ "columnsFrom": [
423
+ "memory_id"
424
+ ],
425
+ "columnsTo": [
426
+ "id"
427
+ ],
428
+ "onDelete": "no action",
429
+ "onUpdate": "no action"
430
+ },
431
+ "fk_embedding_memory": {
432
+ "name": "fk_embedding_memory",
433
+ "tableFrom": "embeddings",
434
+ "tableTo": "memories",
435
+ "columnsFrom": [
436
+ "memory_id"
437
+ ],
438
+ "columnsTo": [
439
+ "id"
440
+ ],
441
+ "onDelete": "cascade",
442
+ "onUpdate": "no action"
443
+ }
444
+ },
445
+ "compositePrimaryKeys": {},
446
+ "uniqueConstraints": {},
447
+ "policies": {},
448
+ "checkConstraints": {
449
+ "embedding_source_check": {
450
+ "name": "embedding_source_check",
451
+ "value": "\"memory_id\" IS NOT NULL"
452
+ }
453
+ },
454
+ "isRLSEnabled": false
455
+ },
456
+ "public.entities": {
457
+ "name": "entities",
458
+ "schema": "",
459
+ "columns": {
460
+ "id": {
461
+ "name": "id",
462
+ "type": "uuid",
463
+ "primaryKey": true,
464
+ "notNull": true
465
+ },
466
+ "agentId": {
467
+ "name": "agentId",
468
+ "type": "uuid",
469
+ "primaryKey": false,
470
+ "notNull": true
471
+ },
472
+ "createdAt": {
473
+ "name": "createdAt",
474
+ "type": "timestamptz",
475
+ "primaryKey": false,
476
+ "notNull": true,
477
+ "default": "now()"
478
+ },
479
+ "names": {
480
+ "name": "names",
481
+ "type": "text[]",
482
+ "primaryKey": false,
483
+ "notNull": false,
484
+ "default": "'{}'::text[]"
485
+ },
486
+ "metadata": {
487
+ "name": "metadata",
488
+ "type": "jsonb",
489
+ "primaryKey": false,
490
+ "notNull": false,
491
+ "default": "'{}'::jsonb"
492
+ }
493
+ },
494
+ "indexes": {},
495
+ "foreignKeys": {
496
+ "entities_agentId_agents_id_fk": {
497
+ "name": "entities_agentId_agents_id_fk",
498
+ "tableFrom": "entities",
499
+ "tableTo": "agents",
500
+ "columnsFrom": [
501
+ "agentId"
502
+ ],
503
+ "columnsTo": [
504
+ "id"
505
+ ],
506
+ "onDelete": "cascade",
507
+ "onUpdate": "no action"
508
+ }
509
+ },
510
+ "compositePrimaryKeys": {},
511
+ "uniqueConstraints": {
512
+ "id_agent_id_unique": {
513
+ "name": "id_agent_id_unique",
514
+ "nullsNotDistinct": false,
515
+ "columns": [
516
+ "id",
517
+ "agentId"
518
+ ]
519
+ }
520
+ },
521
+ "policies": {},
522
+ "checkConstraints": {},
523
+ "isRLSEnabled": false
524
+ },
525
+ "public.logs": {
526
+ "name": "logs",
527
+ "schema": "",
528
+ "columns": {
529
+ "id": {
530
+ "name": "id",
531
+ "type": "uuid",
532
+ "primaryKey": false,
533
+ "notNull": true,
534
+ "default": "gen_random_uuid()"
535
+ },
536
+ "createdAt": {
537
+ "name": "createdAt",
538
+ "type": "timestamptz",
539
+ "primaryKey": false,
540
+ "notNull": true,
541
+ "default": "now()"
542
+ },
543
+ "entityId": {
544
+ "name": "entityId",
545
+ "type": "uuid",
546
+ "primaryKey": false,
547
+ "notNull": true
548
+ },
549
+ "body": {
550
+ "name": "body",
551
+ "type": "jsonb",
552
+ "primaryKey": false,
553
+ "notNull": true
554
+ },
555
+ "type": {
556
+ "name": "type",
557
+ "type": "text",
558
+ "primaryKey": false,
559
+ "notNull": true
560
+ },
561
+ "roomId": {
562
+ "name": "roomId",
563
+ "type": "uuid",
564
+ "primaryKey": false,
565
+ "notNull": true
566
+ }
567
+ },
568
+ "indexes": {},
569
+ "foreignKeys": {
570
+ "logs_entityId_entities_id_fk": {
571
+ "name": "logs_entityId_entities_id_fk",
572
+ "tableFrom": "logs",
573
+ "tableTo": "entities",
574
+ "columnsFrom": [
575
+ "entityId"
576
+ ],
577
+ "columnsTo": [
578
+ "id"
579
+ ],
580
+ "onDelete": "no action",
581
+ "onUpdate": "no action"
582
+ },
583
+ "logs_roomId_rooms_id_fk": {
584
+ "name": "logs_roomId_rooms_id_fk",
585
+ "tableFrom": "logs",
586
+ "tableTo": "rooms",
587
+ "columnsFrom": [
588
+ "roomId"
589
+ ],
590
+ "columnsTo": [
591
+ "id"
592
+ ],
593
+ "onDelete": "no action",
594
+ "onUpdate": "no action"
595
+ },
596
+ "fk_room": {
597
+ "name": "fk_room",
598
+ "tableFrom": "logs",
599
+ "tableTo": "rooms",
600
+ "columnsFrom": [
601
+ "roomId"
602
+ ],
603
+ "columnsTo": [
604
+ "id"
605
+ ],
606
+ "onDelete": "cascade",
607
+ "onUpdate": "no action"
608
+ },
609
+ "fk_user": {
610
+ "name": "fk_user",
611
+ "tableFrom": "logs",
612
+ "tableTo": "entities",
613
+ "columnsFrom": [
614
+ "entityId"
615
+ ],
616
+ "columnsTo": [
617
+ "id"
618
+ ],
619
+ "onDelete": "cascade",
620
+ "onUpdate": "no action"
621
+ }
622
+ },
623
+ "compositePrimaryKeys": {},
624
+ "uniqueConstraints": {},
625
+ "policies": {},
626
+ "checkConstraints": {},
627
+ "isRLSEnabled": false
628
+ },
629
+ "public.memories": {
630
+ "name": "memories",
631
+ "schema": "",
632
+ "columns": {
633
+ "id": {
634
+ "name": "id",
635
+ "type": "uuid",
636
+ "primaryKey": true,
637
+ "notNull": true
638
+ },
639
+ "type": {
640
+ "name": "type",
641
+ "type": "text",
642
+ "primaryKey": false,
643
+ "notNull": true
644
+ },
645
+ "createdAt": {
646
+ "name": "createdAt",
647
+ "type": "timestamptz",
648
+ "primaryKey": false,
649
+ "notNull": true,
650
+ "default": "now()"
651
+ },
652
+ "content": {
653
+ "name": "content",
654
+ "type": "jsonb",
655
+ "primaryKey": false,
656
+ "notNull": true
657
+ },
658
+ "entityId": {
659
+ "name": "entityId",
660
+ "type": "uuid",
661
+ "primaryKey": false,
662
+ "notNull": false
663
+ },
664
+ "agentId": {
665
+ "name": "agentId",
666
+ "type": "uuid",
667
+ "primaryKey": false,
668
+ "notNull": false
669
+ },
670
+ "roomId": {
671
+ "name": "roomId",
672
+ "type": "uuid",
673
+ "primaryKey": false,
674
+ "notNull": false
675
+ },
676
+ "unique": {
677
+ "name": "unique",
678
+ "type": "boolean",
679
+ "primaryKey": false,
680
+ "notNull": true,
681
+ "default": true
682
+ },
683
+ "metadata": {
684
+ "name": "metadata",
685
+ "type": "jsonb",
686
+ "primaryKey": false,
687
+ "notNull": true,
688
+ "default": "'{}'::jsonb"
689
+ }
690
+ },
691
+ "indexes": {
692
+ "idx_memories_type_room": {
693
+ "name": "idx_memories_type_room",
694
+ "columns": [
695
+ {
696
+ "expression": "type",
697
+ "isExpression": false,
698
+ "asc": true,
699
+ "nulls": "last"
700
+ },
701
+ {
702
+ "expression": "roomId",
703
+ "isExpression": false,
704
+ "asc": true,
705
+ "nulls": "last"
706
+ }
707
+ ],
708
+ "isUnique": false,
709
+ "concurrently": false,
710
+ "method": "btree",
711
+ "with": {}
712
+ },
713
+ "idx_memories_metadata_type": {
714
+ "name": "idx_memories_metadata_type",
715
+ "columns": [
716
+ {
717
+ "expression": "((metadata->>'type'))",
718
+ "asc": true,
719
+ "isExpression": true,
720
+ "nulls": "last"
721
+ }
722
+ ],
723
+ "isUnique": false,
724
+ "concurrently": false,
725
+ "method": "btree",
726
+ "with": {}
727
+ },
728
+ "idx_memories_document_id": {
729
+ "name": "idx_memories_document_id",
730
+ "columns": [
731
+ {
732
+ "expression": "((metadata->>'documentId'))",
733
+ "asc": true,
734
+ "isExpression": true,
735
+ "nulls": "last"
736
+ }
737
+ ],
738
+ "isUnique": false,
739
+ "concurrently": false,
740
+ "method": "btree",
741
+ "with": {}
742
+ },
743
+ "idx_fragments_order": {
744
+ "name": "idx_fragments_order",
745
+ "columns": [
746
+ {
747
+ "expression": "((metadata->>'documentId'))",
748
+ "asc": true,
749
+ "isExpression": true,
750
+ "nulls": "last"
751
+ },
752
+ {
753
+ "expression": "((metadata->>'position'))",
754
+ "asc": true,
755
+ "isExpression": true,
756
+ "nulls": "last"
757
+ }
758
+ ],
759
+ "isUnique": false,
760
+ "concurrently": false,
761
+ "method": "btree",
762
+ "with": {}
763
+ }
764
+ },
765
+ "foreignKeys": {
766
+ "memories_entityId_entities_id_fk": {
767
+ "name": "memories_entityId_entities_id_fk",
768
+ "tableFrom": "memories",
769
+ "tableTo": "entities",
770
+ "columnsFrom": [
771
+ "entityId"
772
+ ],
773
+ "columnsTo": [
774
+ "id"
775
+ ],
776
+ "onDelete": "cascade",
777
+ "onUpdate": "no action"
778
+ },
779
+ "memories_agentId_agents_id_fk": {
780
+ "name": "memories_agentId_agents_id_fk",
781
+ "tableFrom": "memories",
782
+ "tableTo": "agents",
783
+ "columnsFrom": [
784
+ "agentId"
785
+ ],
786
+ "columnsTo": [
787
+ "id"
788
+ ],
789
+ "onDelete": "cascade",
790
+ "onUpdate": "no action"
791
+ },
792
+ "memories_roomId_rooms_id_fk": {
793
+ "name": "memories_roomId_rooms_id_fk",
794
+ "tableFrom": "memories",
795
+ "tableTo": "rooms",
796
+ "columnsFrom": [
797
+ "roomId"
798
+ ],
799
+ "columnsTo": [
800
+ "id"
801
+ ],
802
+ "onDelete": "cascade",
803
+ "onUpdate": "no action"
804
+ },
805
+ "fk_room": {
806
+ "name": "fk_room",
807
+ "tableFrom": "memories",
808
+ "tableTo": "rooms",
809
+ "columnsFrom": [
810
+ "roomId"
811
+ ],
812
+ "columnsTo": [
813
+ "id"
814
+ ],
815
+ "onDelete": "cascade",
816
+ "onUpdate": "no action"
817
+ },
818
+ "fk_user": {
819
+ "name": "fk_user",
820
+ "tableFrom": "memories",
821
+ "tableTo": "entities",
822
+ "columnsFrom": [
823
+ "entityId"
824
+ ],
825
+ "columnsTo": [
826
+ "id"
827
+ ],
828
+ "onDelete": "cascade",
829
+ "onUpdate": "no action"
830
+ },
831
+ "fk_agent": {
832
+ "name": "fk_agent",
833
+ "tableFrom": "memories",
834
+ "tableTo": "entities",
835
+ "columnsFrom": [
836
+ "agentId"
837
+ ],
838
+ "columnsTo": [
839
+ "id"
840
+ ],
841
+ "onDelete": "cascade",
842
+ "onUpdate": "no action"
843
+ }
844
+ },
845
+ "compositePrimaryKeys": {},
846
+ "uniqueConstraints": {},
847
+ "policies": {},
848
+ "checkConstraints": {
849
+ "fragment_metadata_check": {
850
+ "name": "fragment_metadata_check",
851
+ "value": "\n CASE \n WHEN metadata->>'type' = 'fragment' THEN\n metadata ? 'documentId' AND \n metadata ? 'position'\n ELSE true\n END\n "
852
+ },
853
+ "document_metadata_check": {
854
+ "name": "document_metadata_check",
855
+ "value": "\n CASE \n WHEN metadata->>'type' = 'document' THEN\n metadata ? 'timestamp'\n ELSE true\n END\n "
856
+ }
857
+ },
858
+ "isRLSEnabled": false
859
+ },
860
+ "public.participants": {
861
+ "name": "participants",
862
+ "schema": "",
863
+ "columns": {
864
+ "id": {
865
+ "name": "id",
866
+ "type": "uuid",
867
+ "primaryKey": true,
868
+ "notNull": true,
869
+ "default": "gen_random_uuid()"
870
+ },
871
+ "createdAt": {
872
+ "name": "createdAt",
873
+ "type": "timestamptz",
874
+ "primaryKey": false,
875
+ "notNull": true,
876
+ "default": "now()"
877
+ },
878
+ "entityId": {
879
+ "name": "entityId",
880
+ "type": "uuid",
881
+ "primaryKey": false,
882
+ "notNull": false
883
+ },
884
+ "roomId": {
885
+ "name": "roomId",
886
+ "type": "uuid",
887
+ "primaryKey": false,
888
+ "notNull": false
889
+ },
890
+ "agentId": {
891
+ "name": "agentId",
892
+ "type": "uuid",
893
+ "primaryKey": false,
894
+ "notNull": false
895
+ },
896
+ "roomState": {
897
+ "name": "roomState",
898
+ "type": "text",
899
+ "primaryKey": false,
900
+ "notNull": false
901
+ }
902
+ },
903
+ "indexes": {
904
+ "idx_participants_user": {
905
+ "name": "idx_participants_user",
906
+ "columns": [
907
+ {
908
+ "expression": "entityId",
909
+ "isExpression": false,
910
+ "asc": true,
911
+ "nulls": "last"
912
+ }
913
+ ],
914
+ "isUnique": false,
915
+ "concurrently": false,
916
+ "method": "btree",
917
+ "with": {}
918
+ },
919
+ "idx_participants_room": {
920
+ "name": "idx_participants_room",
921
+ "columns": [
922
+ {
923
+ "expression": "roomId",
924
+ "isExpression": false,
925
+ "asc": true,
926
+ "nulls": "last"
927
+ }
928
+ ],
929
+ "isUnique": false,
930
+ "concurrently": false,
931
+ "method": "btree",
932
+ "with": {}
933
+ }
934
+ },
935
+ "foreignKeys": {
936
+ "participants_entityId_entities_id_fk": {
937
+ "name": "participants_entityId_entities_id_fk",
938
+ "tableFrom": "participants",
939
+ "tableTo": "entities",
940
+ "columnsFrom": [
941
+ "entityId"
942
+ ],
943
+ "columnsTo": [
944
+ "id"
945
+ ],
946
+ "onDelete": "cascade",
947
+ "onUpdate": "no action"
948
+ },
949
+ "participants_roomId_rooms_id_fk": {
950
+ "name": "participants_roomId_rooms_id_fk",
951
+ "tableFrom": "participants",
952
+ "tableTo": "rooms",
953
+ "columnsFrom": [
954
+ "roomId"
955
+ ],
956
+ "columnsTo": [
957
+ "id"
958
+ ],
959
+ "onDelete": "cascade",
960
+ "onUpdate": "no action"
961
+ },
962
+ "participants_agentId_agents_id_fk": {
963
+ "name": "participants_agentId_agents_id_fk",
964
+ "tableFrom": "participants",
965
+ "tableTo": "agents",
966
+ "columnsFrom": [
967
+ "agentId"
968
+ ],
969
+ "columnsTo": [
970
+ "id"
971
+ ],
972
+ "onDelete": "cascade",
973
+ "onUpdate": "no action"
974
+ },
975
+ "fk_room": {
976
+ "name": "fk_room",
977
+ "tableFrom": "participants",
978
+ "tableTo": "rooms",
979
+ "columnsFrom": [
980
+ "roomId"
981
+ ],
982
+ "columnsTo": [
983
+ "id"
984
+ ],
985
+ "onDelete": "cascade",
986
+ "onUpdate": "no action"
987
+ },
988
+ "fk_user": {
989
+ "name": "fk_user",
990
+ "tableFrom": "participants",
991
+ "tableTo": "entities",
992
+ "columnsFrom": [
993
+ "entityId"
994
+ ],
995
+ "columnsTo": [
996
+ "id"
997
+ ],
998
+ "onDelete": "cascade",
999
+ "onUpdate": "no action"
1000
+ }
1001
+ },
1002
+ "compositePrimaryKeys": {},
1003
+ "uniqueConstraints": {},
1004
+ "policies": {},
1005
+ "checkConstraints": {},
1006
+ "isRLSEnabled": false
1007
+ },
1008
+ "public.relationships": {
1009
+ "name": "relationships",
1010
+ "schema": "",
1011
+ "columns": {
1012
+ "id": {
1013
+ "name": "id",
1014
+ "type": "uuid",
1015
+ "primaryKey": true,
1016
+ "notNull": true,
1017
+ "default": "gen_random_uuid()"
1018
+ },
1019
+ "createdAt": {
1020
+ "name": "createdAt",
1021
+ "type": "timestamptz",
1022
+ "primaryKey": false,
1023
+ "notNull": true,
1024
+ "default": "now()"
1025
+ },
1026
+ "sourceEntityId": {
1027
+ "name": "sourceEntityId",
1028
+ "type": "uuid",
1029
+ "primaryKey": false,
1030
+ "notNull": true
1031
+ },
1032
+ "targetEntityId": {
1033
+ "name": "targetEntityId",
1034
+ "type": "uuid",
1035
+ "primaryKey": false,
1036
+ "notNull": true
1037
+ },
1038
+ "agentId": {
1039
+ "name": "agentId",
1040
+ "type": "uuid",
1041
+ "primaryKey": false,
1042
+ "notNull": true
1043
+ },
1044
+ "tags": {
1045
+ "name": "tags",
1046
+ "type": "text[]",
1047
+ "primaryKey": false,
1048
+ "notNull": false
1049
+ },
1050
+ "metadata": {
1051
+ "name": "metadata",
1052
+ "type": "jsonb",
1053
+ "primaryKey": false,
1054
+ "notNull": false
1055
+ }
1056
+ },
1057
+ "indexes": {
1058
+ "idx_relationships_users": {
1059
+ "name": "idx_relationships_users",
1060
+ "columns": [
1061
+ {
1062
+ "expression": "sourceEntityId",
1063
+ "isExpression": false,
1064
+ "asc": true,
1065
+ "nulls": "last"
1066
+ },
1067
+ {
1068
+ "expression": "targetEntityId",
1069
+ "isExpression": false,
1070
+ "asc": true,
1071
+ "nulls": "last"
1072
+ }
1073
+ ],
1074
+ "isUnique": false,
1075
+ "concurrently": false,
1076
+ "method": "btree",
1077
+ "with": {}
1078
+ }
1079
+ },
1080
+ "foreignKeys": {
1081
+ "relationships_sourceEntityId_entities_id_fk": {
1082
+ "name": "relationships_sourceEntityId_entities_id_fk",
1083
+ "tableFrom": "relationships",
1084
+ "tableTo": "entities",
1085
+ "columnsFrom": [
1086
+ "sourceEntityId"
1087
+ ],
1088
+ "columnsTo": [
1089
+ "id"
1090
+ ],
1091
+ "onDelete": "cascade",
1092
+ "onUpdate": "no action"
1093
+ },
1094
+ "relationships_targetEntityId_entities_id_fk": {
1095
+ "name": "relationships_targetEntityId_entities_id_fk",
1096
+ "tableFrom": "relationships",
1097
+ "tableTo": "entities",
1098
+ "columnsFrom": [
1099
+ "targetEntityId"
1100
+ ],
1101
+ "columnsTo": [
1102
+ "id"
1103
+ ],
1104
+ "onDelete": "cascade",
1105
+ "onUpdate": "no action"
1106
+ },
1107
+ "relationships_agentId_agents_id_fk": {
1108
+ "name": "relationships_agentId_agents_id_fk",
1109
+ "tableFrom": "relationships",
1110
+ "tableTo": "agents",
1111
+ "columnsFrom": [
1112
+ "agentId"
1113
+ ],
1114
+ "columnsTo": [
1115
+ "id"
1116
+ ],
1117
+ "onDelete": "cascade",
1118
+ "onUpdate": "no action"
1119
+ },
1120
+ "fk_user_a": {
1121
+ "name": "fk_user_a",
1122
+ "tableFrom": "relationships",
1123
+ "tableTo": "entities",
1124
+ "columnsFrom": [
1125
+ "sourceEntityId"
1126
+ ],
1127
+ "columnsTo": [
1128
+ "id"
1129
+ ],
1130
+ "onDelete": "cascade",
1131
+ "onUpdate": "no action"
1132
+ },
1133
+ "fk_user_b": {
1134
+ "name": "fk_user_b",
1135
+ "tableFrom": "relationships",
1136
+ "tableTo": "entities",
1137
+ "columnsFrom": [
1138
+ "targetEntityId"
1139
+ ],
1140
+ "columnsTo": [
1141
+ "id"
1142
+ ],
1143
+ "onDelete": "cascade",
1144
+ "onUpdate": "no action"
1145
+ }
1146
+ },
1147
+ "compositePrimaryKeys": {},
1148
+ "uniqueConstraints": {
1149
+ "unique_relationship": {
1150
+ "name": "unique_relationship",
1151
+ "nullsNotDistinct": false,
1152
+ "columns": [
1153
+ "sourceEntityId",
1154
+ "targetEntityId",
1155
+ "agentId"
1156
+ ]
1157
+ }
1158
+ },
1159
+ "policies": {},
1160
+ "checkConstraints": {},
1161
+ "isRLSEnabled": false
1162
+ },
1163
+ "public.rooms": {
1164
+ "name": "rooms",
1165
+ "schema": "",
1166
+ "columns": {
1167
+ "id": {
1168
+ "name": "id",
1169
+ "type": "uuid",
1170
+ "primaryKey": true,
1171
+ "notNull": true,
1172
+ "default": "gen_random_uuid()"
1173
+ },
1174
+ "agentId": {
1175
+ "name": "agentId",
1176
+ "type": "uuid",
1177
+ "primaryKey": false,
1178
+ "notNull": false
1179
+ },
1180
+ "source": {
1181
+ "name": "source",
1182
+ "type": "text",
1183
+ "primaryKey": false,
1184
+ "notNull": true
1185
+ },
1186
+ "type": {
1187
+ "name": "type",
1188
+ "type": "text",
1189
+ "primaryKey": false,
1190
+ "notNull": true
1191
+ },
1192
+ "serverId": {
1193
+ "name": "serverId",
1194
+ "type": "text",
1195
+ "primaryKey": false,
1196
+ "notNull": false
1197
+ },
1198
+ "worldId": {
1199
+ "name": "worldId",
1200
+ "type": "uuid",
1201
+ "primaryKey": false,
1202
+ "notNull": false
1203
+ },
1204
+ "name": {
1205
+ "name": "name",
1206
+ "type": "text",
1207
+ "primaryKey": false,
1208
+ "notNull": false
1209
+ },
1210
+ "metadata": {
1211
+ "name": "metadata",
1212
+ "type": "jsonb",
1213
+ "primaryKey": false,
1214
+ "notNull": false
1215
+ },
1216
+ "channelId": {
1217
+ "name": "channelId",
1218
+ "type": "text",
1219
+ "primaryKey": false,
1220
+ "notNull": false
1221
+ },
1222
+ "createdAt": {
1223
+ "name": "createdAt",
1224
+ "type": "timestamptz",
1225
+ "primaryKey": false,
1226
+ "notNull": true,
1227
+ "default": "now()"
1228
+ }
1229
+ },
1230
+ "indexes": {},
1231
+ "foreignKeys": {
1232
+ "rooms_agentId_agents_id_fk": {
1233
+ "name": "rooms_agentId_agents_id_fk",
1234
+ "tableFrom": "rooms",
1235
+ "tableTo": "agents",
1236
+ "columnsFrom": [
1237
+ "agentId"
1238
+ ],
1239
+ "columnsTo": [
1240
+ "id"
1241
+ ],
1242
+ "onDelete": "cascade",
1243
+ "onUpdate": "no action"
1244
+ },
1245
+ "rooms_worldId_worlds_id_fk": {
1246
+ "name": "rooms_worldId_worlds_id_fk",
1247
+ "tableFrom": "rooms",
1248
+ "tableTo": "worlds",
1249
+ "columnsFrom": [
1250
+ "worldId"
1251
+ ],
1252
+ "columnsTo": [
1253
+ "id"
1254
+ ],
1255
+ "onDelete": "cascade",
1256
+ "onUpdate": "no action"
1257
+ }
1258
+ },
1259
+ "compositePrimaryKeys": {},
1260
+ "uniqueConstraints": {},
1261
+ "policies": {},
1262
+ "checkConstraints": {},
1263
+ "isRLSEnabled": false
1264
+ },
1265
+ "public.tasks": {
1266
+ "name": "tasks",
1267
+ "schema": "",
1268
+ "columns": {
1269
+ "id": {
1270
+ "name": "id",
1271
+ "type": "uuid",
1272
+ "primaryKey": true,
1273
+ "notNull": true,
1274
+ "default": "gen_random_uuid()"
1275
+ },
1276
+ "name": {
1277
+ "name": "name",
1278
+ "type": "text",
1279
+ "primaryKey": false,
1280
+ "notNull": true
1281
+ },
1282
+ "description": {
1283
+ "name": "description",
1284
+ "type": "text",
1285
+ "primaryKey": false,
1286
+ "notNull": true
1287
+ },
1288
+ "room_id": {
1289
+ "name": "room_id",
1290
+ "type": "uuid",
1291
+ "primaryKey": false,
1292
+ "notNull": false
1293
+ },
1294
+ "world_id": {
1295
+ "name": "world_id",
1296
+ "type": "uuid",
1297
+ "primaryKey": false,
1298
+ "notNull": false
1299
+ },
1300
+ "agent_id": {
1301
+ "name": "agent_id",
1302
+ "type": "uuid",
1303
+ "primaryKey": false,
1304
+ "notNull": true
1305
+ },
1306
+ "tags": {
1307
+ "name": "tags",
1308
+ "type": "text[]",
1309
+ "primaryKey": false,
1310
+ "notNull": false
1311
+ },
1312
+ "metadata": {
1313
+ "name": "metadata",
1314
+ "type": "jsonb",
1315
+ "primaryKey": false,
1316
+ "notNull": false
1317
+ },
1318
+ "created_at": {
1319
+ "name": "created_at",
1320
+ "type": "timestamp",
1321
+ "primaryKey": false,
1322
+ "notNull": false,
1323
+ "default": "now()"
1324
+ },
1325
+ "updated_at": {
1326
+ "name": "updated_at",
1327
+ "type": "timestamp",
1328
+ "primaryKey": false,
1329
+ "notNull": false,
1330
+ "default": "now()"
1331
+ }
1332
+ },
1333
+ "indexes": {},
1334
+ "foreignKeys": {},
1335
+ "compositePrimaryKeys": {},
1336
+ "uniqueConstraints": {},
1337
+ "policies": {},
1338
+ "checkConstraints": {},
1339
+ "isRLSEnabled": false
1340
+ },
1341
+ "public.worlds": {
1342
+ "name": "worlds",
1343
+ "schema": "",
1344
+ "columns": {
1345
+ "id": {
1346
+ "name": "id",
1347
+ "type": "uuid",
1348
+ "primaryKey": true,
1349
+ "notNull": true,
1350
+ "default": "gen_random_uuid()"
1351
+ },
1352
+ "agentId": {
1353
+ "name": "agentId",
1354
+ "type": "uuid",
1355
+ "primaryKey": false,
1356
+ "notNull": true
1357
+ },
1358
+ "name": {
1359
+ "name": "name",
1360
+ "type": "text",
1361
+ "primaryKey": false,
1362
+ "notNull": true
1363
+ },
1364
+ "metadata": {
1365
+ "name": "metadata",
1366
+ "type": "jsonb",
1367
+ "primaryKey": false,
1368
+ "notNull": false
1369
+ },
1370
+ "serverId": {
1371
+ "name": "serverId",
1372
+ "type": "text",
1373
+ "primaryKey": false,
1374
+ "notNull": true
1375
+ },
1376
+ "createdAt": {
1377
+ "name": "createdAt",
1378
+ "type": "timestamptz",
1379
+ "primaryKey": false,
1380
+ "notNull": true,
1381
+ "default": "now()"
1382
+ }
1383
+ },
1384
+ "indexes": {},
1385
+ "foreignKeys": {
1386
+ "worlds_agentId_agents_id_fk": {
1387
+ "name": "worlds_agentId_agents_id_fk",
1388
+ "tableFrom": "worlds",
1389
+ "tableTo": "agents",
1390
+ "columnsFrom": [
1391
+ "agentId"
1392
+ ],
1393
+ "columnsTo": [
1394
+ "id"
1395
+ ],
1396
+ "onDelete": "cascade",
1397
+ "onUpdate": "no action"
1398
+ }
1399
+ },
1400
+ "compositePrimaryKeys": {},
1401
+ "uniqueConstraints": {},
1402
+ "policies": {},
1403
+ "checkConstraints": {},
1404
+ "isRLSEnabled": false
1405
+ }
1406
+ },
1407
+ "enums": {},
1408
+ "schemas": {},
1409
+ "sequences": {},
1410
+ "roles": {},
1411
+ "policies": {},
1412
+ "views": {},
1413
+ "_meta": {
1414
+ "columns": {},
1415
+ "schemas": {},
1416
+ "tables": {}
1417
+ }
1418
+ }