Skip to content
Source
Sign inSign up
samwillis/neonbricks
Open History to see the last commit

0003_snapshot.json

1,270 lines31.3 KB

1{
2 "id": "3e492690-11c7-4725-a48c-71cfb914f1d8",
3 "prevId": "3b585d09-4c6f-4ca2-9abe-7a158ee150af",
4 "version": "7",
5 "dialect": "postgresql",
6 "tables": {
7 "public.ai_generations": {
8 "name": "ai_generations",
9 "schema": "",
10 "columns": {
11 "id": {
12 "name": "id",
13 "type": "uuid",
14 "primaryKey": true,
15 "notNull": true
16 },
17 "guest": {
18 "name": "guest",
19 "type": "uuid",
20 "primaryKey": false,
21 "notNull": true
22 },
23 "prompt": {
24 "name": "prompt",
25 "type": "text",
26 "primaryKey": false,
27 "notNull": true
28 },
29 "model": {
30 "name": "model",
31 "type": "text",
32 "primaryKey": false,
33 "notNull": true
34 },
35 "status": {
36 "name": "status",
37 "type": "text",
38 "primaryKey": false,
39 "notNull": true,
40 "default": "'queued'"
41 },
42 "attempt": {
43 "name": "attempt",
44 "type": "integer",
45 "primaryKey": false,
46 "notNull": true,
47 "default": 0
48 },
49 "blueprint": {
50 "name": "blueprint",
51 "type": "jsonb",
52 "primaryKey": false,
53 "notNull": false
54 },
55 "issues": {
56 "name": "issues",
57 "type": "jsonb",
58 "primaryKey": false,
59 "notNull": false
60 },
61 "error": {
62 "name": "error",
63 "type": "text",
64 "primaryKey": false,
65 "notNull": false
66 },
67 "input_tokens": {
68 "name": "input_tokens",
69 "type": "integer",
70 "primaryKey": false,
71 "notNull": true,
72 "default": 0
73 },
74 "output_tokens": {
75 "name": "output_tokens",
76 "type": "integer",
77 "primaryKey": false,
78 "notNull": true,
79 "default": 0
80 },
81 "world": {
82 "name": "world",
83 "type": "uuid",
84 "primaryKey": false,
85 "notNull": false
86 },
87 "lease_until": {
88 "name": "lease_until",
89 "type": "timestamp with time zone",
90 "primaryKey": false,
91 "notNull": false
92 },
93 "created_at": {
94 "name": "created_at",
95 "type": "timestamp with time zone",
96 "primaryKey": false,
97 "notNull": true,
98 "default": "now()"
99 },
100 "updated_at": {
101 "name": "updated_at",
102 "type": "timestamp with time zone",
103 "primaryKey": false,
104 "notNull": true,
105 "default": "now()"
106 }
107 },
108 "indexes": {
109 "ai_generations_guest_created": {
110 "name": "ai_generations_guest_created",
111 "columns": [
112 {
113 "expression": "guest",
114 "isExpression": false,
115 "asc": true,
116 "nulls": "last"
117 },
118 {
119 "expression": "created_at",
120 "isExpression": false,
121 "asc": true,
122 "nulls": "last"
123 }
124 ],
125 "isUnique": false,
126 "concurrently": false,
127 "method": "btree",
128 "with": {}
129 },
130 "ai_generations_status_lease": {
131 "name": "ai_generations_status_lease",
132 "columns": [
133 {
134 "expression": "status",
135 "isExpression": false,
136 "asc": true,
137 "nulls": "last"
138 },
139 {
140 "expression": "lease_until",
141 "isExpression": false,
142 "asc": true,
143 "nulls": "last"
144 }
145 ],
146 "isUnique": false,
147 "concurrently": false,
148 "method": "btree",
149 "with": {}
150 }
151 },
152 "foreignKeys": {
153 "ai_generations_world_worlds_id_fk": {
154 "name": "ai_generations_world_worlds_id_fk",
155 "tableFrom": "ai_generations",
156 "tableTo": "worlds",
157 "columnsFrom": [
158 "world"
159 ],
160 "columnsTo": [
161 "id"
162 ],
163 "onDelete": "no action",
164 "onUpdate": "no action"
165 }
166 },
167 "compositePrimaryKeys": {},
168 "uniqueConstraints": {},
169 "policies": {},
170 "checkConstraints": {},
171 "isRLSEnabled": false
172 },
173 "public.spatial_buckets": {
174 "name": "spatial_buckets",
175 "schema": "",
176 "columns": {
177 "world": {
178 "name": "world",
179 "type": "uuid",
180 "primaryKey": false,
181 "notNull": true
182 },
183 "x": {
184 "name": "x",
185 "type": "integer",
186 "primaryKey": false,
187 "notNull": true
188 },
189 "y": {
190 "name": "y",
191 "type": "integer",
192 "primaryKey": false,
193 "notNull": true
194 },
195 "z": {
196 "name": "z",
197 "type": "integer",
198 "primaryKey": false,
199 "notNull": true
200 }
201 },
202 "indexes": {},
203 "foreignKeys": {
204 "spatial_buckets_world_worlds_id_fk": {
205 "name": "spatial_buckets_world_worlds_id_fk",
206 "tableFrom": "spatial_buckets",
207 "tableTo": "worlds",
208 "columnsFrom": [
209 "world"
210 ],
211 "columnsTo": [
212 "id"
213 ],
214 "onDelete": "no action",
215 "onUpdate": "no action"
216 }
217 },
218 "compositePrimaryKeys": {
219 "spatial_buckets_world_x_y_z_pk": {
220 "name": "spatial_buckets_world_x_y_z_pk",
221 "columns": [
222 "world",
223 "x",
224 "y",
225 "z"
226 ]
227 }
228 },
229 "uniqueConstraints": {},
230 "policies": {},
231 "checkConstraints": {},
232 "isRLSEnabled": false
233 },
234 "public.connector_slot_claims": {
235 "name": "connector_slot_claims",
236 "schema": "",
237 "columns": {
238 "world": {
239 "name": "world",
240 "type": "uuid",
241 "primaryKey": false,
242 "notNull": true
243 },
244 "part": {
245 "name": "part",
246 "type": "uuid",
247 "primaryKey": false,
248 "notNull": true
249 },
250 "slot": {
251 "name": "slot",
252 "type": "text",
253 "primaryKey": false,
254 "notNull": true
255 },
256 "connection": {
257 "name": "connection",
258 "type": "uuid",
259 "primaryKey": false,
260 "notNull": true
261 }
262 },
263 "indexes": {},
264 "foreignKeys": {
265 "connector_slot_claims_world_worlds_id_fk": {
266 "name": "connector_slot_claims_world_worlds_id_fk",
267 "tableFrom": "connector_slot_claims",
268 "tableTo": "worlds",
269 "columnsFrom": [
270 "world"
271 ],
272 "columnsTo": [
273 "id"
274 ],
275 "onDelete": "no action",
276 "onUpdate": "no action"
277 },
278 "connector_slot_claims_part_part_instances_id_fk": {
279 "name": "connector_slot_claims_part_part_instances_id_fk",
280 "tableFrom": "connector_slot_claims",
281 "tableTo": "part_instances",
282 "columnsFrom": [
283 "part"
284 ],
285 "columnsTo": [
286 "id"
287 ],
288 "onDelete": "no action",
289 "onUpdate": "no action"
290 },
291 "connector_slot_claims_connection_part_connections_id_fk": {
292 "name": "connector_slot_claims_connection_part_connections_id_fk",
293 "tableFrom": "connector_slot_claims",
294 "tableTo": "part_connections",
295 "columnsFrom": [
296 "connection"
297 ],
298 "columnsTo": [
299 "id"
300 ],
301 "onDelete": "no action",
302 "onUpdate": "no action"
303 }
304 },
305 "compositePrimaryKeys": {
306 "connector_slot_claims_world_part_slot_pk": {
307 "name": "connector_slot_claims_world_part_slot_pk",
308 "columns": [
309 "world",
310 "part",
311 "slot"
312 ]
313 }
314 },
315 "uniqueConstraints": {},
316 "policies": {},
317 "checkConstraints": {},
318 "isRLSEnabled": false
319 },
320 "public.part_connections": {
321 "name": "part_connections",
322 "schema": "",
323 "columns": {
324 "id": {
325 "name": "id",
326 "type": "uuid",
327 "primaryKey": true,
328 "notNull": true
329 },
330 "world": {
331 "name": "world",
332 "type": "uuid",
333 "primaryKey": false,
334 "notNull": true
335 },
336 "a": {
337 "name": "a",
338 "type": "uuid",
339 "primaryKey": false,
340 "notNull": true
341 },
342 "b": {
343 "name": "b",
344 "type": "uuid",
345 "primaryKey": false,
346 "notNull": true
347 },
348 "ca": {
349 "name": "ca",
350 "type": "text",
351 "primaryKey": false,
352 "notNull": true
353 },
354 "cb": {
355 "name": "cb",
356 "type": "text",
357 "primaryKey": false,
358 "notNull": true
359 },
360 "revision": {
361 "name": "revision",
362 "type": "integer",
363 "primaryKey": false,
364 "notNull": true
365 },
366 "deleted": {
367 "name": "deleted",
368 "type": "integer",
369 "primaryKey": false,
370 "notNull": true,
371 "default": 0
372 }
373 },
374 "indexes": {
375 "connection_pair": {
376 "name": "connection_pair",
377 "columns": [
378 {
379 "expression": "world",
380 "isExpression": false,
381 "asc": true,
382 "nulls": "last"
383 },
384 {
385 "expression": "a",
386 "isExpression": false,
387 "asc": true,
388 "nulls": "last"
389 },
390 {
391 "expression": "b",
392 "isExpression": false,
393 "asc": true,
394 "nulls": "last"
395 },
396 {
397 "expression": "ca",
398 "isExpression": false,
399 "asc": true,
400 "nulls": "last"
401 },
402 {
403 "expression": "cb",
404 "isExpression": false,
405 "asc": true,
406 "nulls": "last"
407 }
408 ],
409 "isUnique": true,
410 "concurrently": false,
411 "method": "btree",
412 "with": {}
413 },
414 "connections_a": {
415 "name": "connections_a",
416 "columns": [
417 {
418 "expression": "world",
419 "isExpression": false,
420 "asc": true,
421 "nulls": "last"
422 },
423 {
424 "expression": "a",
425 "isExpression": false,
426 "asc": true,
427 "nulls": "last"
428 }
429 ],
430 "isUnique": false,
431 "concurrently": false,
432 "method": "btree",
433 "with": {}
434 },
435 "connections_b": {
436 "name": "connections_b",
437 "columns": [
438 {
439 "expression": "world",
440 "isExpression": false,
441 "asc": true,
442 "nulls": "last"
443 },
444 {
445 "expression": "b",
446 "isExpression": false,
447 "asc": true,
448 "nulls": "last"
449 }
450 ],
451 "isUnique": false,
452 "concurrently": false,
453 "method": "btree",
454 "with": {}
455 }
456 },
457 "foreignKeys": {
458 "part_connections_world_worlds_id_fk": {
459 "name": "part_connections_world_worlds_id_fk",
460 "tableFrom": "part_connections",
461 "tableTo": "worlds",
462 "columnsFrom": [
463 "world"
464 ],
465 "columnsTo": [
466 "id"
467 ],
468 "onDelete": "no action",
469 "onUpdate": "no action"
470 },
471 "part_connections_a_part_instances_id_fk": {
472 "name": "part_connections_a_part_instances_id_fk",
473 "tableFrom": "part_connections",
474 "tableTo": "part_instances",
475 "columnsFrom": [
476 "a"
477 ],
478 "columnsTo": [
479 "id"
480 ],
481 "onDelete": "no action",
482 "onUpdate": "no action"
483 },
484 "part_connections_b_part_instances_id_fk": {
485 "name": "part_connections_b_part_instances_id_fk",
486 "tableFrom": "part_connections",
487 "tableTo": "part_instances",
488 "columnsFrom": [
489 "b"
490 ],
491 "columnsTo": [
492 "id"
493 ],
494 "onDelete": "no action",
495 "onUpdate": "no action"
496 }
497 },
498 "compositePrimaryKeys": {},
499 "uniqueConstraints": {},
500 "policies": {},
501 "checkConstraints": {},
502 "isRLSEnabled": false
503 },
504 "public.guests": {
505 "name": "guests",
506 "schema": "",
507 "columns": {
508 "id": {
509 "name": "id",
510 "type": "uuid",
511 "primaryKey": true,
512 "notNull": true
513 },
514 "name": {
515 "name": "name",
516 "type": "text",
517 "primaryKey": false,
518 "notNull": true
519 },
520 "color": {
521 "name": "color",
522 "type": "text",
523 "primaryKey": false,
524 "notNull": true
525 }
526 },
527 "indexes": {},
528 "foreignKeys": {},
529 "compositePrimaryKeys": {},
530 "uniqueConstraints": {},
531 "policies": {},
532 "checkConstraints": {},
533 "isRLSEnabled": false
534 },
535 "public.guest_world_history": {
536 "name": "guest_world_history",
537 "schema": "",
538 "columns": {
539 "world": {
540 "name": "world",
541 "type": "uuid",
542 "primaryKey": false,
543 "notNull": true
544 },
545 "guest": {
546 "name": "guest",
547 "type": "uuid",
548 "primaryKey": false,
549 "notNull": true
550 },
551 "generation": {
552 "name": "generation",
553 "type": "integer",
554 "primaryKey": false,
555 "notNull": true
556 },
557 "undo": {
558 "name": "undo",
559 "type": "jsonb",
560 "primaryKey": false,
561 "notNull": true,
562 "default": "'[]'::jsonb"
563 },
564 "redo": {
565 "name": "redo",
566 "type": "jsonb",
567 "primaryKey": false,
568 "notNull": true,
569 "default": "'[]'::jsonb"
570 }
571 },
572 "indexes": {},
573 "foreignKeys": {
574 "guest_world_history_world_worlds_id_fk": {
575 "name": "guest_world_history_world_worlds_id_fk",
576 "tableFrom": "guest_world_history",
577 "tableTo": "worlds",
578 "columnsFrom": [
579 "world"
580 ],
581 "columnsTo": [
582 "id"
583 ],
584 "onDelete": "no action",
585 "onUpdate": "no action"
586 },
587 "guest_world_history_guest_guests_id_fk": {
588 "name": "guest_world_history_guest_guests_id_fk",
589 "tableFrom": "guest_world_history",
590 "tableTo": "guests",
591 "columnsFrom": [
592 "guest"
593 ],
594 "columnsTo": [
595 "id"
596 ],
597 "onDelete": "no action",
598 "onUpdate": "no action"
599 }
600 },
601 "compositePrimaryKeys": {
602 "guest_world_history_world_guest_pk": {
603 "name": "guest_world_history_world_guest_pk",
604 "columns": [
605 "world",
606 "guest"
607 ]
608 }
609 },
610 "uniqueConstraints": {},
611 "policies": {},
612 "checkConstraints": {},
613 "isRLSEnabled": false
614 },
615 "public.world_memberships": {
616 "name": "world_memberships",
617 "schema": "",
618 "columns": {
619 "world": {
620 "name": "world",
621 "type": "uuid",
622 "primaryKey": false,
623 "notNull": true
624 },
625 "guest": {
626 "name": "guest",
627 "type": "uuid",
628 "primaryKey": false,
629 "notNull": true
630 },
631 "role": {
632 "name": "role",
633 "type": "text",
634 "primaryKey": false,
635 "notNull": true,
636 "default": "'editor'"
637 },
638 "active": {
639 "name": "active",
640 "type": "integer",
641 "primaryKey": false,
642 "notNull": true,
643 "default": 1
644 }
645 },
646 "indexes": {},
647 "foreignKeys": {
648 "world_memberships_world_worlds_id_fk": {
649 "name": "world_memberships_world_worlds_id_fk",
650 "tableFrom": "world_memberships",
651 "tableTo": "worlds",
652 "columnsFrom": [
653 "world"
654 ],
655 "columnsTo": [
656 "id"
657 ],
658 "onDelete": "no action",
659 "onUpdate": "no action"
660 },
661 "world_memberships_guest_guests_id_fk": {
662 "name": "world_memberships_guest_guests_id_fk",
663 "tableFrom": "world_memberships",
664 "tableTo": "guests",
665 "columnsFrom": [
666 "guest"
667 ],
668 "columnsTo": [
669 "id"
670 ],
671 "onDelete": "no action",
672 "onUpdate": "no action"
673 }
674 },
675 "compositePrimaryKeys": {
676 "world_memberships_world_guest_pk": {
677 "name": "world_memberships_world_guest_pk",
678 "columns": [
679 "world",
680 "guest"
681 ]
682 }
683 },
684 "uniqueConstraints": {},
685 "policies": {},
686 "checkConstraints": {},
687 "isRLSEnabled": false
688 },
689 "public.build_operations": {
690 "name": "build_operations",
691 "schema": "",
692 "columns": {
693 "world": {
694 "name": "world",
695 "type": "uuid",
696 "primaryKey": false,
697 "notNull": true
698 },
699 "guest": {
700 "name": "guest",
701 "type": "uuid",
702 "primaryKey": false,
703 "notNull": true
704 },
705 "id": {
706 "name": "id",
707 "type": "uuid",
708 "primaryKey": false,
709 "notNull": true
710 },
711 "generation": {
712 "name": "generation",
713 "type": "integer",
714 "primaryKey": false,
715 "notNull": true
716 },
717 "digest": {
718 "name": "digest",
719 "type": "text",
720 "primaryKey": false,
721 "notNull": true
722 },
723 "receipt": {
724 "name": "receipt",
725 "type": "jsonb",
726 "primaryKey": false,
727 "notNull": false
728 },
729 "before": {
730 "name": "before",
731 "type": "jsonb",
732 "primaryKey": false,
733 "notNull": false
734 },
735 "after": {
736 "name": "after",
737 "type": "jsonb",
738 "primaryKey": false,
739 "notNull": false
740 },
741 "before_connections": {
742 "name": "before_connections",
743 "type": "jsonb",
744 "primaryKey": false,
745 "notNull": false
746 },
747 "after_connections": {
748 "name": "after_connections",
749 "type": "jsonb",
750 "primaryKey": false,
751 "notNull": false
752 },
753 "created_at": {
754 "name": "created_at",
755 "type": "timestamp with time zone",
756 "primaryKey": false,
757 "notNull": true,
758 "default": "now()"
759 }
760 },
761 "indexes": {},
762 "foreignKeys": {
763 "build_operations_world_worlds_id_fk": {
764 "name": "build_operations_world_worlds_id_fk",
765 "tableFrom": "build_operations",
766 "tableTo": "worlds",
767 "columnsFrom": [
768 "world"
769 ],
770 "columnsTo": [
771 "id"
772 ],
773 "onDelete": "no action",
774 "onUpdate": "no action"
775 },
776 "build_operations_guest_guests_id_fk": {
777 "name": "build_operations_guest_guests_id_fk",
778 "tableFrom": "build_operations",
779 "tableTo": "guests",
780 "columnsFrom": [
781 "guest"
782 ],
783 "columnsTo": [
784 "id"
785 ],
786 "onDelete": "no action",
787 "onUpdate": "no action"
788 }
789 },
790 "compositePrimaryKeys": {
791 "build_operations_world_guest_id_pk": {
792 "name": "build_operations_world_guest_id_pk",
793 "columns": [
794 "world",
795 "guest",
796 "id"
797 ]
798 }
799 },
800 "uniqueConstraints": {},
801 "policies": {},
802 "checkConstraints": {},
803 "isRLSEnabled": false
804 },
805 "public.part_instances": {
806 "name": "part_instances",
807 "schema": "",
808 "columns": {
809 "id": {
810 "name": "id",
811 "type": "uuid",
812 "primaryKey": true,
813 "notNull": true
814 },
815 "world": {
816 "name": "world",
817 "type": "uuid",
818 "primaryKey": false,
819 "notNull": true
820 },
821 "key": {
822 "name": "key",
823 "type": "text",
824 "primaryKey": false,
825 "notNull": true
826 },
827 "color": {
828 "name": "color",
829 "type": "text",
830 "primaryKey": false,
831 "notNull": true
832 },
833 "x": {
834 "name": "x",
835 "type": "integer",
836 "primaryKey": false,
837 "notNull": true
838 },
839 "y": {
840 "name": "y",
841 "type": "integer",
842 "primaryKey": false,
843 "notNull": true
844 },
845 "z": {
846 "name": "z",
847 "type": "integer",
848 "primaryKey": false,
849 "notNull": true
850 },
851 "rotation": {
852 "name": "rotation",
853 "type": "integer",
854 "primaryKey": false,
855 "notNull": true
856 },
857 "revision": {
858 "name": "revision",
859 "type": "integer",
860 "primaryKey": false,
861 "notNull": true
862 },
863 "deleted": {
864 "name": "deleted",
865 "type": "integer",
866 "primaryKey": false,
867 "notNull": true,
868 "default": 0
869 },
870 "minx": {
871 "name": "minx",
872 "type": "integer",
873 "primaryKey": false,
874 "notNull": true
875 },
876 "miny": {
877 "name": "miny",
878 "type": "integer",
879 "primaryKey": false,
880 "notNull": true
881 },
882 "minz": {
883 "name": "minz",
884 "type": "integer",
885 "primaryKey": false,
886 "notNull": true
887 },
888 "maxx": {
889 "name": "maxx",
890 "type": "integer",
891 "primaryKey": false,
892 "notNull": true
893 },
894 "maxy": {
895 "name": "maxy",
896 "type": "integer",
897 "primaryKey": false,
898 "notNull": true
899 },
900 "maxz": {
901 "name": "maxz",
902 "type": "integer",
903 "primaryKey": false,
904 "notNull": true
905 }
906 },
907 "indexes": {
908 "parts_world_bounds": {
909 "name": "parts_world_bounds",
910 "columns": [
911 {
912 "expression": "world",
913 "isExpression": false,
914 "asc": true,
915 "nulls": "last"
916 },
917 {
918 "expression": "minx",
919 "isExpression": false,
920 "asc": true,
921 "nulls": "last"
922 },
923 {
924 "expression": "maxx",
925 "isExpression": false,
926 "asc": true,
927 "nulls": "last"
928 }
929 ],
930 "isUnique": false,
931 "where": "\"part_instances\".\"deleted\"=0",
932 "concurrently": false,
933 "method": "btree",
934 "with": {}
935 }
936 },
937 "foreignKeys": {
938 "part_instances_world_worlds_id_fk": {
939 "name": "part_instances_world_worlds_id_fk",
940 "tableFrom": "part_instances",
941 "tableTo": "worlds",
942 "columnsFrom": [
943 "world"
944 ],
945 "columnsTo": [
946 "id"
947 ],
948 "onDelete": "no action",
949 "onUpdate": "no action"
950 }
951 },
952 "compositePrimaryKeys": {},
953 "uniqueConstraints": {},
954 "policies": {},
955 "checkConstraints": {},
956 "isRLSEnabled": false
957 },
958 "public.guest_sessions": {
959 "name": "guest_sessions",
960 "schema": "",
961 "columns": {
962 "id": {
963 "name": "id",
964 "type": "uuid",
965 "primaryKey": true,
966 "notNull": true
967 },
968 "guest": {
969 "name": "guest",
970 "type": "uuid",
971 "primaryKey": false,
972 "notNull": true
973 },
974 "hash": {
975 "name": "hash",
976 "type": "text",
977 "primaryKey": false,
978 "notNull": true
979 },
980 "expires_at": {
981 "name": "expires_at",
982 "type": "timestamp with time zone",
983 "primaryKey": false,
984 "notNull": true
985 },
986 "absolute_expiry": {
987 "name": "absolute_expiry",
988 "type": "timestamp with time zone",
989 "primaryKey": false,
990 "notNull": true
991 },
992 "revoked": {
993 "name": "revoked",
994 "type": "integer",
995 "primaryKey": false,
996 "notNull": true,
997 "default": 0
998 }
999 },
1000 "indexes": {},
1001 "foreignKeys": {
1002 "guest_sessions_guest_guests_id_fk": {
1003 "name": "guest_sessions_guest_guests_id_fk",
1004 "tableFrom": "guest_sessions",
1005 "tableTo": "guests",
1006 "columnsFrom": [
1007 "guest"
1008 ],
1009 "columnsTo": [
1010 "id"
1011 ],
1012 "onDelete": "no action",
1013 "onUpdate": "no action"
1015 },
1016 "compositePrimaryKeys": {},
1017 "uniqueConstraints": {
1018 "guest_sessions_hash_unique": {
1019 "name": "guest_sessions_hash_unique",
1020 "nullsNotDistinct": false,
1021 "columns": [
1022 "hash"
1025 },
1026 "policies": {},
1027 "checkConstraints": {},
1028 "isRLSEnabled": false
1029 },
1030 "public.viewer_sessions": {
1031 "name": "viewer_sessions",
1032 "schema": "",
1033 "columns": {
1034 "id": {
1035 "name": "id",
1036 "type": "uuid",
1037 "primaryKey": true,
1038 "notNull": true
1039 },
1040 "world": {
1041 "name": "world",
1042 "type": "uuid",
1043 "primaryKey": false,
1044 "notNull": true
1045 },
1046 "guest": {
1047 "name": "guest",
1048 "type": "uuid",
1049 "primaryKey": false,
1050 "notNull": true
1051 },
1052 "session": {
1053 "name": "session",
1054 "type": "uuid",
1055 "primaryKey": false,
1056 "notNull": true
1057 },
1058 "generation": {
1059 "name": "generation",
1060 "type": "integer",
1061 "primaryKey": false,
1062 "notNull": true
1063 },
1064 "selection": {
1065 "name": "selection",
1066 "type": "jsonb",
1067 "primaryKey": false,
1068 "notNull": true,
1069 "default": "'[]'::jsonb"
1070 },
1071 "preview": {
1072 "name": "preview",
1073 "type": "jsonb",
1074 "primaryKey": false,
1075 "notNull": false
1076 },
1077 "cursor": {
1078 "name": "cursor",
1079 "type": "jsonb",
1080 "primaryKey": false,
1081 "notNull": false
1082 },
1083 "sequence": {
1084 "name": "sequence",
1085 "type": "integer",
1086 "primaryKey": false,
1087 "notNull": true,
1088 "default": 0
1089 },
1090 "preview_at": {
1091 "name": "preview_at",
1092 "type": "timestamp with time zone",
1093 "primaryKey": false,
1094 "notNull": false
1095 },
1096 "cursor_at": {
1097 "name": "cursor_at",
1098 "type": "timestamp with time zone",
1099 "primaryKey": false,
1100 "notNull": false
1101 },
1102 "expires_at": {
1103 "name": "expires_at",
1104 "type": "timestamp with time zone",
1105 "primaryKey": false,
1106 "notNull": true
1108 },
1109 "indexes": {
1110 "viewers_expiry": {
1111 "name": "viewers_expiry",
1112 "columns": [
1114 "expression": "world",
1115 "isExpression": false,
1116 "asc": true,
1117 "nulls": "last"
1118 },
1120 "expression": "expires_at",
1121 "isExpression": false,
1122 "asc": true,
1123 "nulls": "last"
1125 ],
1126 "isUnique": false,
1127 "concurrently": false,
1128 "method": "btree",
1129 "with": {}
1131 },
1132 "foreignKeys": {
1133 "viewer_sessions_world_worlds_id_fk": {
1134 "name": "viewer_sessions_world_worlds_id_fk",
1135 "tableFrom": "viewer_sessions",
1136 "tableTo": "worlds",
1137 "columnsFrom": [
1138 "world"
1139 ],
1140 "columnsTo": [
1141 "id"
1142 ],
1143 "onDelete": "no action",
1144 "onUpdate": "no action"
1145 },
1146 "viewer_sessions_guest_guests_id_fk": {
1147 "name": "viewer_sessions_guest_guests_id_fk",
1148 "tableFrom": "viewer_sessions",
1149 "tableTo": "guests",
1150 "columnsFrom": [
1151 "guest"
1152 ],
1153 "columnsTo": [
1154 "id"
1155 ],
1156 "onDelete": "no action",
1157 "onUpdate": "no action"
1158 },
1159 "viewer_sessions_session_guest_sessions_id_fk": {
1160 "name": "viewer_sessions_session_guest_sessions_id_fk",
1161 "tableFrom": "viewer_sessions",
1162 "tableTo": "guest_sessions",
1163 "columnsFrom": [
1164 "session"
1165 ],
1166 "columnsTo": [
1167 "id"
1168 ],
1169 "onDelete": "no action",
1170 "onUpdate": "no action"
1172 },
1173 "compositePrimaryKeys": {},
1174 "uniqueConstraints": {},
1175 "policies": {},
1176 "checkConstraints": {},
1177 "isRLSEnabled": false
1178 },
1179 "public.worlds": {
1180 "name": "worlds",
1181 "schema": "",
1182 "columns": {
1183 "id": {
1184 "name": "id",
1185 "type": "uuid",
1186 "primaryKey": true,
1187 "notNull": true
1188 },
1189 "slug": {
1190 "name": "slug",
1191 "type": "text",
1192 "primaryKey": false,
1193 "notNull": true
1194 },
1195 "title": {
1196 "name": "title",
1197 "type": "text",
1198 "primaryKey": false,
1199 "notNull": true
1200 },
1201 "owner": {
1202 "name": "owner",
1203 "type": "uuid",
1204 "primaryKey": false,
1205 "notNull": false
1206 },
1207 "generation": {
1208 "name": "generation",
1209 "type": "integer",
1210 "primaryKey": false,
1211 "notNull": true,
1212 "default": 1
1213 },
1214 "catalogue": {
1215 "name": "catalogue",
1216 "type": "text",
1217 "primaryKey": false,
1218 "notNull": true
1219 },
1220 "status": {
1221 "name": "status",
1222 "type": "text",
1223 "primaryKey": false,
1224 "notNull": true,
1225 "default": "'open'"
1226 },
1227 "expires_at": {
1228 "name": "expires_at",
1229 "type": "timestamp with time zone",
1230 "primaryKey": false,
1231 "notNull": false,
1232 "default": "now()+interval '24 hours'"
1233 },
1234 "created_at": {
1235 "name": "created_at",
1236 "type": "timestamp with time zone",
1237 "primaryKey": false,
1238 "notNull": true,
1239 "default": "now()"
1241 },
1242 "indexes": {},
1243 "foreignKeys": {},
1244 "compositePrimaryKeys": {},
1245 "uniqueConstraints": {
1246 "worlds_slug_unique": {
1247 "name": "worlds_slug_unique",
1248 "nullsNotDistinct": false,
1249 "columns": [
1250 "slug"
1253 },
1254 "policies": {},
1255 "checkConstraints": {},
1256 "isRLSEnabled": false
1258 },
1259 "enums": {},
1260 "schemas": {},
1261 "sequences": {},
1262 "roles": {},
1263 "policies": {},
1264 "views": {},
1265 "_meta": {
1266 "columns": {},
1267 "schemas": {},
1268 "tables": {}