forked from
rocksky.app/rocksky
A decentralized music tracking and discovery platform built on AT Protocol 馃幍
1// Generated by Xata Codegen 0.30.1. Please do not edit.
2import { buildClient } from "@xata.io/client";
3import type {
4 BaseClientOptions,
5 SchemaInference,
6 XataRecord,
7} from "@xata.io/client";
8
9const tables = [
10 {
11 name: "album_tags",
12 checkConstraints: {
13 album_tags_xata_id_length_xata_id: {
14 name: "album_tags_xata_id_length_xata_id",
15 columns: ["xata_id"],
16 definition: "CHECK ((length(xata_id) < 256))",
17 },
18 },
19 foreignKeys: {
20 album_id_link: {
21 name: "album_id_link",
22 columns: ["album_id"],
23 referencedTable: "albums",
24 referencedColumns: ["xata_id"],
25 onDelete: "SET NULL",
26 },
27 tag_id_link: {
28 name: "tag_id_link",
29 columns: ["tag_id"],
30 referencedTable: "tags",
31 referencedColumns: ["xata_id"],
32 onDelete: "SET NULL",
33 },
34 },
35 primaryKey: [],
36 uniqueConstraints: {
37 _pgroll_new_album_tags_xata_id_key: {
38 name: "_pgroll_new_album_tags_xata_id_key",
39 columns: ["xata_id"],
40 },
41 },
42 columns: [
43 {
44 name: "album_id",
45 type: "link",
46 link: { table: "albums" },
47 notNull: true,
48 unique: false,
49 defaultValue: null,
50 comment: '{"xata.link":"albums"}',
51 },
52 {
53 name: "tag_id",
54 type: "link",
55 link: { table: "tags" },
56 notNull: true,
57 unique: false,
58 defaultValue: null,
59 comment: '{"xata.link":"tags"}',
60 },
61 {
62 name: "xata_createdat",
63 type: "datetime",
64 notNull: true,
65 unique: false,
66 defaultValue: "now()",
67 comment: "",
68 },
69 {
70 name: "xata_id",
71 type: "text",
72 notNull: true,
73 unique: true,
74 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
75 comment: "",
76 },
77 {
78 name: "xata_updatedat",
79 type: "datetime",
80 notNull: true,
81 unique: false,
82 defaultValue: "now()",
83 comment: "",
84 },
85 {
86 name: "xata_version",
87 type: "int",
88 notNull: true,
89 unique: false,
90 defaultValue: "0",
91 comment: "",
92 },
93 ],
94 },
95 {
96 name: "album_tracks",
97 checkConstraints: {
98 album_tracks_xata_id_length_xata_id: {
99 name: "album_tracks_xata_id_length_xata_id",
100 columns: ["xata_id"],
101 definition: "CHECK ((length(xata_id) < 256))",
102 },
103 },
104 foreignKeys: {
105 album_id_link: {
106 name: "album_id_link",
107 columns: ["album_id"],
108 referencedTable: "albums",
109 referencedColumns: ["xata_id"],
110 onDelete: "SET NULL",
111 },
112 track_id_link: {
113 name: "track_id_link",
114 columns: ["track_id"],
115 referencedTable: "tracks",
116 referencedColumns: ["xata_id"],
117 onDelete: "SET NULL",
118 },
119 },
120 primaryKey: [],
121 uniqueConstraints: {
122 _pgroll_new_album_tracks_xata_id_key: {
123 name: "_pgroll_new_album_tracks_xata_id_key",
124 columns: ["xata_id"],
125 },
126 },
127 columns: [
128 {
129 name: "album_id",
130 type: "link",
131 link: { table: "albums" },
132 notNull: true,
133 unique: false,
134 defaultValue: null,
135 comment: '{"xata.link":"albums"}',
136 },
137 {
138 name: "track_id",
139 type: "link",
140 link: { table: "tracks" },
141 notNull: true,
142 unique: false,
143 defaultValue: null,
144 comment: '{"xata.link":"tracks"}',
145 },
146 {
147 name: "xata_createdat",
148 type: "datetime",
149 notNull: true,
150 unique: false,
151 defaultValue: "now()",
152 comment: "",
153 },
154 {
155 name: "xata_id",
156 type: "text",
157 notNull: true,
158 unique: true,
159 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
160 comment: "",
161 },
162 {
163 name: "xata_updatedat",
164 type: "datetime",
165 notNull: true,
166 unique: false,
167 defaultValue: "now()",
168 comment: "",
169 },
170 {
171 name: "xata_version",
172 type: "int",
173 notNull: true,
174 unique: false,
175 defaultValue: "0",
176 comment: "",
177 },
178 ],
179 },
180 {
181 name: "albums",
182 checkConstraints: {
183 albums_xata_id_length_xata_id: {
184 name: "albums_xata_id_length_xata_id",
185 columns: ["xata_id"],
186 definition: "CHECK ((length(xata_id) < 256))",
187 },
188 },
189 foreignKeys: {},
190 primaryKey: [],
191 uniqueConstraints: {
192 _pgroll_new_albums_xata_id_key: {
193 name: "_pgroll_new_albums_xata_id_key",
194 columns: ["xata_id"],
195 },
196 albums__pgroll_new_sha256_key: {
197 name: "albums__pgroll_new_sha256_key",
198 columns: ["sha256"],
199 },
200 albums__pgroll_new_uri_key: {
201 name: "albums__pgroll_new_uri_key",
202 columns: ["uri"],
203 },
204 albums_apple_music_link_unique: {
205 name: "albums_apple_music_link_unique",
206 columns: ["apple_music_link"],
207 },
208 albums_spotify_link_unique: {
209 name: "albums_spotify_link_unique",
210 columns: ["spotify_link"],
211 },
212 },
213 columns: [
214 {
215 name: "album_art",
216 type: "text",
217 notNull: false,
218 unique: false,
219 defaultValue: null,
220 comment: "",
221 },
222 {
223 name: "apple_music_link",
224 type: "text",
225 notNull: false,
226 unique: true,
227 defaultValue: null,
228 comment: "",
229 },
230 {
231 name: "artist",
232 type: "text",
233 notNull: true,
234 unique: false,
235 defaultValue: null,
236 comment: "",
237 },
238 {
239 name: "artist_uri",
240 type: "text",
241 notNull: false,
242 unique: false,
243 defaultValue: null,
244 comment: "",
245 },
246 {
247 name: "lastfm_link",
248 type: "text",
249 notNull: false,
250 unique: false,
251 defaultValue: null,
252 comment: "",
253 },
254 {
255 name: "release_date",
256 type: "text",
257 notNull: false,
258 unique: false,
259 defaultValue: null,
260 comment: "",
261 },
262 {
263 name: "sha256",
264 type: "text",
265 notNull: true,
266 unique: true,
267 defaultValue: null,
268 comment: "",
269 },
270 {
271 name: "spotify_link",
272 type: "text",
273 notNull: false,
274 unique: true,
275 defaultValue: null,
276 comment: "",
277 },
278 {
279 name: "tidal_link",
280 type: "text",
281 notNull: false,
282 unique: false,
283 defaultValue: null,
284 comment: "",
285 },
286 {
287 name: "title",
288 type: "text",
289 notNull: true,
290 unique: false,
291 defaultValue: null,
292 comment: "",
293 },
294 {
295 name: "uri",
296 type: "text",
297 notNull: false,
298 unique: true,
299 defaultValue: null,
300 comment: "",
301 },
302 {
303 name: "xata_createdat",
304 type: "datetime",
305 notNull: true,
306 unique: false,
307 defaultValue: "now()",
308 comment: "",
309 },
310 {
311 name: "xata_id",
312 type: "text",
313 notNull: true,
314 unique: true,
315 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
316 comment: "",
317 },
318 {
319 name: "xata_updatedat",
320 type: "datetime",
321 notNull: true,
322 unique: false,
323 defaultValue: "now()",
324 comment: "",
325 },
326 {
327 name: "xata_version",
328 type: "int",
329 notNull: true,
330 unique: false,
331 defaultValue: "0",
332 comment: "",
333 },
334 {
335 name: "year",
336 type: "int",
337 notNull: false,
338 unique: false,
339 defaultValue: null,
340 comment: "",
341 },
342 {
343 name: "youtube_link",
344 type: "text",
345 notNull: false,
346 unique: false,
347 defaultValue: null,
348 comment: "",
349 },
350 ],
351 },
352 {
353 name: "api_keys",
354 checkConstraints: {
355 api_keys_xata_id_length_xata_id: {
356 name: "api_keys_xata_id_length_xata_id",
357 columns: ["xata_id"],
358 definition: "CHECK ((length(xata_id) < 256))",
359 },
360 },
361 foreignKeys: {
362 user_id_link: {
363 name: "user_id_link",
364 columns: ["user_id"],
365 referencedTable: "users",
366 referencedColumns: ["xata_id"],
367 onDelete: "CASCADE",
368 },
369 },
370 primaryKey: [],
371 uniqueConstraints: {
372 _pgroll_new_api_keys_xata_id_key: {
373 name: "_pgroll_new_api_keys_xata_id_key",
374 columns: ["xata_id"],
375 },
376 api_keys__pgroll_new_api_key_key: {
377 name: "api_keys__pgroll_new_api_key_key",
378 columns: ["api_key"],
379 },
380 api_keys__pgroll_new_shared_secret_key: {
381 name: "api_keys__pgroll_new_shared_secret_key",
382 columns: ["shared_secret"],
383 },
384 api_keys_name_unique: { name: "api_keys_name_unique", columns: ["name"] },
385 },
386 columns: [
387 {
388 name: "api_key",
389 type: "text",
390 notNull: true,
391 unique: true,
392 defaultValue: null,
393 comment: "",
394 },
395 {
396 name: "description",
397 type: "text",
398 notNull: false,
399 unique: false,
400 defaultValue: null,
401 comment: "",
402 },
403 {
404 name: "enabled",
405 type: "bool",
406 notNull: true,
407 unique: false,
408 defaultValue: "true",
409 comment: "",
410 },
411 {
412 name: "name",
413 type: "text",
414 notNull: true,
415 unique: true,
416 defaultValue: null,
417 comment: "",
418 },
419 {
420 name: "shared_secret",
421 type: "text",
422 notNull: true,
423 unique: true,
424 defaultValue: null,
425 comment: "",
426 },
427 {
428 name: "user_id",
429 type: "link",
430 link: { table: "users" },
431 notNull: true,
432 unique: false,
433 defaultValue: null,
434 comment: '{"xata.link":"users"}',
435 },
436 {
437 name: "xata_createdat",
438 type: "datetime",
439 notNull: true,
440 unique: false,
441 defaultValue: "now()",
442 comment: "",
443 },
444 {
445 name: "xata_id",
446 type: "text",
447 notNull: true,
448 unique: true,
449 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
450 comment: "",
451 },
452 {
453 name: "xata_updatedat",
454 type: "datetime",
455 notNull: true,
456 unique: false,
457 defaultValue: "now()",
458 comment: "",
459 },
460 {
461 name: "xata_version",
462 type: "int",
463 notNull: true,
464 unique: false,
465 defaultValue: "0",
466 comment: "",
467 },
468 ],
469 },
470 {
471 name: "artist_albums",
472 checkConstraints: {
473 artist_albums_xata_id_length_xata_id: {
474 name: "artist_albums_xata_id_length_xata_id",
475 columns: ["xata_id"],
476 definition: "CHECK ((length(xata_id) < 256))",
477 },
478 },
479 foreignKeys: {
480 album_id_link: {
481 name: "album_id_link",
482 columns: ["album_id"],
483 referencedTable: "albums",
484 referencedColumns: ["xata_id"],
485 onDelete: "SET NULL",
486 },
487 artist_id_link: {
488 name: "artist_id_link",
489 columns: ["artist_id"],
490 referencedTable: "artists",
491 referencedColumns: ["xata_id"],
492 onDelete: "SET NULL",
493 },
494 },
495 primaryKey: [],
496 uniqueConstraints: {
497 _pgroll_new_artist_albums_xata_id_key: {
498 name: "_pgroll_new_artist_albums_xata_id_key",
499 columns: ["xata_id"],
500 },
501 },
502 columns: [
503 {
504 name: "album_id",
505 type: "link",
506 link: { table: "albums" },
507 notNull: true,
508 unique: false,
509 defaultValue: null,
510 comment: '{"xata.link":"albums"}',
511 },
512 {
513 name: "artist_id",
514 type: "link",
515 link: { table: "artists" },
516 notNull: true,
517 unique: false,
518 defaultValue: null,
519 comment: '{"xata.link":"artists"}',
520 },
521 {
522 name: "xata_createdat",
523 type: "datetime",
524 notNull: true,
525 unique: false,
526 defaultValue: "now()",
527 comment: "",
528 },
529 {
530 name: "xata_id",
531 type: "text",
532 notNull: true,
533 unique: true,
534 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
535 comment: "",
536 },
537 {
538 name: "xata_updatedat",
539 type: "datetime",
540 notNull: true,
541 unique: false,
542 defaultValue: "now()",
543 comment: "",
544 },
545 {
546 name: "xata_version",
547 type: "int",
548 notNull: true,
549 unique: false,
550 defaultValue: "0",
551 comment: "",
552 },
553 ],
554 },
555 {
556 name: "artist_tags",
557 checkConstraints: {
558 artist_tags_xata_id_length_xata_id: {
559 name: "artist_tags_xata_id_length_xata_id",
560 columns: ["xata_id"],
561 definition: "CHECK ((length(xata_id) < 256))",
562 },
563 },
564 foreignKeys: {
565 artist_id_link: {
566 name: "artist_id_link",
567 columns: ["artist_id"],
568 referencedTable: "artists",
569 referencedColumns: ["xata_id"],
570 onDelete: "SET NULL",
571 },
572 tag_id_link: {
573 name: "tag_id_link",
574 columns: ["tag_id"],
575 referencedTable: "tags",
576 referencedColumns: ["xata_id"],
577 onDelete: "SET NULL",
578 },
579 },
580 primaryKey: [],
581 uniqueConstraints: {
582 _pgroll_new_artist_tags_xata_id_key: {
583 name: "_pgroll_new_artist_tags_xata_id_key",
584 columns: ["xata_id"],
585 },
586 },
587 columns: [
588 {
589 name: "artist_id",
590 type: "link",
591 link: { table: "artists" },
592 notNull: true,
593 unique: false,
594 defaultValue: null,
595 comment: '{"xata.link":"artists"}',
596 },
597 {
598 name: "tag_id",
599 type: "link",
600 link: { table: "tags" },
601 notNull: true,
602 unique: false,
603 defaultValue: null,
604 comment: '{"xata.link":"tags"}',
605 },
606 {
607 name: "xata_createdat",
608 type: "datetime",
609 notNull: true,
610 unique: false,
611 defaultValue: "now()",
612 comment: "",
613 },
614 {
615 name: "xata_id",
616 type: "text",
617 notNull: true,
618 unique: true,
619 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
620 comment: "",
621 },
622 {
623 name: "xata_updatedat",
624 type: "datetime",
625 notNull: true,
626 unique: false,
627 defaultValue: "now()",
628 comment: "",
629 },
630 {
631 name: "xata_version",
632 type: "int",
633 notNull: true,
634 unique: false,
635 defaultValue: "0",
636 comment: "",
637 },
638 ],
639 },
640 {
641 name: "artist_tracks",
642 checkConstraints: {
643 artist_tracks_xata_id_length_xata_id: {
644 name: "artist_tracks_xata_id_length_xata_id",
645 columns: ["xata_id"],
646 definition: "CHECK ((length(xata_id) < 256))",
647 },
648 },
649 foreignKeys: {
650 artist_id_link: {
651 name: "artist_id_link",
652 columns: ["artist_id"],
653 referencedTable: "artists",
654 referencedColumns: ["xata_id"],
655 onDelete: "SET NULL",
656 },
657 track_id_link: {
658 name: "track_id_link",
659 columns: ["track_id"],
660 referencedTable: "tracks",
661 referencedColumns: ["xata_id"],
662 onDelete: "SET NULL",
663 },
664 },
665 primaryKey: [],
666 uniqueConstraints: {
667 _pgroll_new_artist_tracks_xata_id_key: {
668 name: "_pgroll_new_artist_tracks_xata_id_key",
669 columns: ["xata_id"],
670 },
671 },
672 columns: [
673 {
674 name: "artist_id",
675 type: "link",
676 link: { table: "artists" },
677 notNull: true,
678 unique: false,
679 defaultValue: null,
680 comment: '{"xata.link":"artists"}',
681 },
682 {
683 name: "track_id",
684 type: "link",
685 link: { table: "tracks" },
686 notNull: true,
687 unique: false,
688 defaultValue: null,
689 comment: '{"xata.link":"tracks"}',
690 },
691 {
692 name: "xata_createdat",
693 type: "datetime",
694 notNull: true,
695 unique: false,
696 defaultValue: "now()",
697 comment: "",
698 },
699 {
700 name: "xata_id",
701 type: "text",
702 notNull: true,
703 unique: true,
704 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
705 comment: "",
706 },
707 {
708 name: "xata_updatedat",
709 type: "datetime",
710 notNull: true,
711 unique: false,
712 defaultValue: "now()",
713 comment: "",
714 },
715 {
716 name: "xata_version",
717 type: "int",
718 notNull: true,
719 unique: false,
720 defaultValue: "0",
721 comment: "",
722 },
723 ],
724 },
725 {
726 name: "artists",
727 checkConstraints: {
728 artists_xata_id_length_xata_id: {
729 name: "artists_xata_id_length_xata_id",
730 columns: ["xata_id"],
731 definition: "CHECK ((length(xata_id) < 256))",
732 },
733 },
734 foreignKeys: {},
735 primaryKey: [],
736 uniqueConstraints: {
737 _pgroll_new_artists_xata_id_key: {
738 name: "_pgroll_new_artists_xata_id_key",
739 columns: ["xata_id"],
740 },
741 artists__pgroll_new_sha256_key: {
742 name: "artists__pgroll_new_sha256_key",
743 columns: ["sha256"],
744 },
745 artists__pgroll_new_uri_key: {
746 name: "artists__pgroll_new_uri_key",
747 columns: ["uri"],
748 },
749 artists_apple_music_link_unique: {
750 name: "artists_apple_music_link_unique",
751 columns: ["apple_music_link"],
752 },
753 artists_spotify_link_unique: {
754 name: "artists_spotify_link_unique",
755 columns: ["spotify_link"],
756 },
757 artists_tidal_link_unique: {
758 name: "artists_tidal_link_unique",
759 columns: ["tidal_link"],
760 },
761 artists_youtube_link_unique: {
762 name: "artists_youtube_link_unique",
763 columns: ["youtube_link"],
764 },
765 },
766 columns: [
767 {
768 name: "apple_music_link",
769 type: "text",
770 notNull: false,
771 unique: true,
772 defaultValue: null,
773 comment: "",
774 },
775 {
776 name: "biography",
777 type: "text",
778 notNull: false,
779 unique: false,
780 defaultValue: null,
781 comment: "",
782 },
783 {
784 name: "born",
785 type: "datetime",
786 notNull: false,
787 unique: false,
788 defaultValue: null,
789 comment: "",
790 },
791 {
792 name: "born_in",
793 type: "text",
794 notNull: false,
795 unique: false,
796 defaultValue: null,
797 comment: "",
798 },
799 {
800 name: "died",
801 type: "datetime",
802 notNull: false,
803 unique: false,
804 defaultValue: null,
805 comment: "",
806 },
807 {
808 name: "lastfm_link",
809 type: "text",
810 notNull: false,
811 unique: false,
812 defaultValue: null,
813 comment: "",
814 },
815 {
816 name: "name",
817 type: "text",
818 notNull: true,
819 unique: false,
820 defaultValue: null,
821 comment: "",
822 },
823 {
824 name: "picture",
825 type: "text",
826 notNull: false,
827 unique: false,
828 defaultValue: null,
829 comment: "",
830 },
831 {
832 name: "sha256",
833 type: "text",
834 notNull: true,
835 unique: true,
836 defaultValue: null,
837 comment: "",
838 },
839 {
840 name: "spotify_link",
841 type: "text",
842 notNull: false,
843 unique: true,
844 defaultValue: null,
845 comment: "",
846 },
847 {
848 name: "tidal_link",
849 type: "text",
850 notNull: false,
851 unique: true,
852 defaultValue: null,
853 comment: "",
854 },
855 {
856 name: "uri",
857 type: "text",
858 notNull: false,
859 unique: true,
860 defaultValue: null,
861 comment: "",
862 },
863 {
864 name: "xata_createdat",
865 type: "datetime",
866 notNull: true,
867 unique: false,
868 defaultValue: "now()",
869 comment: "",
870 },
871 {
872 name: "xata_id",
873 type: "text",
874 notNull: true,
875 unique: true,
876 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
877 comment: "",
878 },
879 {
880 name: "xata_updatedat",
881 type: "datetime",
882 notNull: true,
883 unique: false,
884 defaultValue: "now()",
885 comment: "",
886 },
887 {
888 name: "xata_version",
889 type: "int",
890 notNull: true,
891 unique: false,
892 defaultValue: "0",
893 comment: "",
894 },
895 {
896 name: "youtube_link",
897 type: "text",
898 notNull: false,
899 unique: true,
900 defaultValue: null,
901 comment: "",
902 },
903 ],
904 },
905 {
906 name: "builtin_storage_paths",
907 checkConstraints: {
908 builtin_storage_paths_xata_id_length_xata_id: {
909 name: "builtin_storage_paths_xata_id_length_xata_id",
910 columns: ["xata_id"],
911 definition: "CHECK ((length(xata_id) < 256))",
912 },
913 },
914 foreignKeys: {
915 track_id_link: {
916 name: "track_id_link",
917 columns: ["track_id"],
918 referencedTable: "tracks",
919 referencedColumns: ["xata_id"],
920 onDelete: "CASCADE",
921 },
922 user_id_link: {
923 name: "user_id_link",
924 columns: ["user_id"],
925 referencedTable: "users",
926 referencedColumns: ["xata_id"],
927 onDelete: "CASCADE",
928 },
929 },
930 primaryKey: [],
931 uniqueConstraints: {
932 _pgroll_new_builtin_storage_paths_xata_id_key: {
933 name: "_pgroll_new_builtin_storage_paths_xata_id_key",
934 columns: ["xata_id"],
935 },
936 builtin_storage_paths__pgroll_new_path_key: {
937 name: "builtin_storage_paths__pgroll_new_path_key",
938 columns: ["path"],
939 },
940 },
941 columns: [
942 {
943 name: "path",
944 type: "text",
945 notNull: true,
946 unique: true,
947 defaultValue: null,
948 comment: "",
949 },
950 {
951 name: "track_id",
952 type: "link",
953 link: { table: "tracks" },
954 notNull: true,
955 unique: false,
956 defaultValue: null,
957 comment: '{"xata.link":"tracks"}',
958 },
959 {
960 name: "user_id",
961 type: "link",
962 link: { table: "users" },
963 notNull: true,
964 unique: false,
965 defaultValue: null,
966 comment: '{"xata.link":"users"}',
967 },
968 {
969 name: "xata_createdat",
970 type: "datetime",
971 notNull: true,
972 unique: false,
973 defaultValue: "now()",
974 comment: "",
975 },
976 {
977 name: "xata_id",
978 type: "text",
979 notNull: true,
980 unique: true,
981 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
982 comment: "",
983 },
984 {
985 name: "xata_updatedat",
986 type: "datetime",
987 notNull: true,
988 unique: false,
989 defaultValue: "now()",
990 comment: "",
991 },
992 {
993 name: "xata_version",
994 type: "int",
995 notNull: true,
996 unique: false,
997 defaultValue: "0",
998 comment: "",
999 },
1000 ],
1001 },
1002 {
1003 name: "dropbox",
1004 checkConstraints: {
1005 dropbox_xata_id_length_xata_id: {
1006 name: "dropbox_xata_id_length_xata_id",
1007 columns: ["xata_id"],
1008 definition: "CHECK ((length(xata_id) < 256))",
1009 },
1010 },
1011 foreignKeys: {
1012 dropbox_token_id_link: {
1013 name: "dropbox_token_id_link",
1014 columns: ["dropbox_token_id"],
1015 referencedTable: "dropbox_tokens",
1016 referencedColumns: ["xata_id"],
1017 onDelete: "CASCADE",
1018 },
1019 user_id_link: {
1020 name: "user_id_link",
1021 columns: ["user_id"],
1022 referencedTable: "users",
1023 referencedColumns: ["xata_id"],
1024 onDelete: "CASCADE",
1025 },
1026 },
1027 primaryKey: [],
1028 uniqueConstraints: {
1029 _pgroll_new_dropbox_xata_id_key: {
1030 name: "_pgroll_new_dropbox_xata_id_key",
1031 columns: ["xata_id"],
1032 },
1033 },
1034 columns: [
1035 {
1036 name: "dropbox_token_id",
1037 type: "link",
1038 link: { table: "dropbox_tokens" },
1039 notNull: true,
1040 unique: false,
1041 defaultValue: null,
1042 comment: '{"xata.link":"dropbox_tokens"}',
1043 },
1044 {
1045 name: "user_id",
1046 type: "link",
1047 link: { table: "users" },
1048 notNull: true,
1049 unique: false,
1050 defaultValue: null,
1051 comment: '{"xata.link":"users"}',
1052 },
1053 {
1054 name: "xata_createdat",
1055 type: "datetime",
1056 notNull: true,
1057 unique: false,
1058 defaultValue: "now()",
1059 comment: "",
1060 },
1061 {
1062 name: "xata_id",
1063 type: "text",
1064 notNull: true,
1065 unique: true,
1066 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
1067 comment: "",
1068 },
1069 {
1070 name: "xata_updatedat",
1071 type: "datetime",
1072 notNull: true,
1073 unique: false,
1074 defaultValue: "now()",
1075 comment: "",
1076 },
1077 {
1078 name: "xata_version",
1079 type: "int",
1080 notNull: true,
1081 unique: false,
1082 defaultValue: "0",
1083 comment: "",
1084 },
1085 ],
1086 },
1087 {
1088 name: "dropbox_accounts",
1089 checkConstraints: {
1090 dropbox_accounts_xata_id_length_xata_id: {
1091 name: "dropbox_accounts_xata_id_length_xata_id",
1092 columns: ["xata_id"],
1093 definition: "CHECK ((length(xata_id) < 256))",
1094 },
1095 },
1096 foreignKeys: {
1097 user_id_link: {
1098 name: "user_id_link",
1099 columns: ["user_id"],
1100 referencedTable: "users",
1101 referencedColumns: ["xata_id"],
1102 onDelete: "CASCADE",
1103 },
1104 },
1105 primaryKey: [],
1106 uniqueConstraints: {
1107 _pgroll_new_dropbox_accounts_xata_id_key: {
1108 name: "_pgroll_new_dropbox_accounts_xata_id_key",
1109 columns: ["xata_id"],
1110 },
1111 dropbox_accounts__pgroll_new_email_key: {
1112 name: "dropbox_accounts__pgroll_new_email_key",
1113 columns: ["email"],
1114 },
1115 },
1116 columns: [
1117 {
1118 name: "email",
1119 type: "text",
1120 notNull: true,
1121 unique: true,
1122 defaultValue: null,
1123 comment: "",
1124 },
1125 {
1126 name: "is_beta_user",
1127 type: "bool",
1128 notNull: true,
1129 unique: false,
1130 defaultValue: null,
1131 comment: "",
1132 },
1133 {
1134 name: "user_id",
1135 type: "link",
1136 link: { table: "users" },
1137 notNull: true,
1138 unique: false,
1139 defaultValue: null,
1140 comment: '{"xata.link":"users"}',
1141 },
1142 {
1143 name: "xata_createdat",
1144 type: "datetime",
1145 notNull: true,
1146 unique: false,
1147 defaultValue: "now()",
1148 comment: "",
1149 },
1150 {
1151 name: "xata_id",
1152 type: "text",
1153 notNull: true,
1154 unique: true,
1155 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
1156 comment: "",
1157 },
1158 {
1159 name: "xata_updatedat",
1160 type: "datetime",
1161 notNull: true,
1162 unique: false,
1163 defaultValue: "now()",
1164 comment: "",
1165 },
1166 {
1167 name: "xata_version",
1168 type: "int",
1169 notNull: true,
1170 unique: false,
1171 defaultValue: "0",
1172 comment: "",
1173 },
1174 ],
1175 },
1176 {
1177 name: "dropbox_paths",
1178 checkConstraints: {
1179 dropbox_paths_xata_id_length_xata_id: {
1180 name: "dropbox_paths_xata_id_length_xata_id",
1181 columns: ["xata_id"],
1182 definition: "CHECK ((length(xata_id) < 256))",
1183 },
1184 },
1185 foreignKeys: {
1186 dropbox_id_link: {
1187 name: "dropbox_id_link",
1188 columns: ["dropbox_id"],
1189 referencedTable: "dropbox",
1190 referencedColumns: ["xata_id"],
1191 onDelete: "CASCADE",
1192 },
1193 track_id_link: {
1194 name: "track_id_link",
1195 columns: ["track_id"],
1196 referencedTable: "tracks",
1197 referencedColumns: ["xata_id"],
1198 onDelete: "CASCADE",
1199 },
1200 },
1201 primaryKey: [],
1202 uniqueConstraints: {
1203 _pgroll_new_dropbox_paths_xata_id_key: {
1204 name: "_pgroll_new_dropbox_paths_xata_id_key",
1205 columns: ["xata_id"],
1206 },
1207 dropbox_paths__pgroll_new_file_id_key: {
1208 name: "dropbox_paths__pgroll_new_file_id_key",
1209 columns: ["file_id"],
1210 },
1211 },
1212 columns: [
1213 {
1214 name: "dropbox_id",
1215 type: "link",
1216 link: { table: "dropbox" },
1217 notNull: true,
1218 unique: false,
1219 defaultValue: null,
1220 comment: '{"xata.link":"dropbox"}',
1221 },
1222 {
1223 name: "file_id",
1224 type: "text",
1225 notNull: true,
1226 unique: true,
1227 defaultValue: null,
1228 comment: "",
1229 },
1230 {
1231 name: "name",
1232 type: "text",
1233 notNull: true,
1234 unique: false,
1235 defaultValue: null,
1236 comment: "",
1237 },
1238 {
1239 name: "path",
1240 type: "text",
1241 notNull: true,
1242 unique: false,
1243 defaultValue: null,
1244 comment: "",
1245 },
1246 {
1247 name: "track_id",
1248 type: "link",
1249 link: { table: "tracks" },
1250 notNull: true,
1251 unique: false,
1252 defaultValue: null,
1253 comment: '{"xata.link":"tracks"}',
1254 },
1255 {
1256 name: "xata_createdat",
1257 type: "datetime",
1258 notNull: true,
1259 unique: false,
1260 defaultValue: "now()",
1261 comment: "",
1262 },
1263 {
1264 name: "xata_id",
1265 type: "text",
1266 notNull: true,
1267 unique: true,
1268 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
1269 comment: "",
1270 },
1271 {
1272 name: "xata_updatedat",
1273 type: "datetime",
1274 notNull: true,
1275 unique: false,
1276 defaultValue: "now()",
1277 comment: "",
1278 },
1279 {
1280 name: "xata_version",
1281 type: "int",
1282 notNull: true,
1283 unique: false,
1284 defaultValue: "0",
1285 comment: "",
1286 },
1287 ],
1288 },
1289 {
1290 name: "dropbox_tokens",
1291 checkConstraints: {
1292 dropbox_tokens_xata_id_length_xata_id: {
1293 name: "dropbox_tokens_xata_id_length_xata_id",
1294 columns: ["xata_id"],
1295 definition: "CHECK ((length(xata_id) < 256))",
1296 },
1297 },
1298 foreignKeys: {},
1299 primaryKey: [],
1300 uniqueConstraints: {
1301 _pgroll_new_dropbox_tokens_xata_id_key: {
1302 name: "_pgroll_new_dropbox_tokens_xata_id_key",
1303 columns: ["xata_id"],
1304 },
1305 },
1306 columns: [
1307 {
1308 name: "refresh_token",
1309 type: "text",
1310 notNull: true,
1311 unique: false,
1312 defaultValue: null,
1313 comment: "",
1314 },
1315 {
1316 name: "xata_createdat",
1317 type: "datetime",
1318 notNull: true,
1319 unique: false,
1320 defaultValue: "now()",
1321 comment: "",
1322 },
1323 {
1324 name: "xata_id",
1325 type: "text",
1326 notNull: true,
1327 unique: true,
1328 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
1329 comment: "",
1330 },
1331 {
1332 name: "xata_updatedat",
1333 type: "datetime",
1334 notNull: true,
1335 unique: false,
1336 defaultValue: "now()",
1337 comment: "",
1338 },
1339 {
1340 name: "xata_version",
1341 type: "int",
1342 notNull: true,
1343 unique: false,
1344 defaultValue: "0",
1345 comment: "",
1346 },
1347 ],
1348 },
1349 {
1350 name: "google_drive",
1351 checkConstraints: {
1352 google_drive_xata_id_length_xata_id: {
1353 name: "google_drive_xata_id_length_xata_id",
1354 columns: ["xata_id"],
1355 definition: "CHECK ((length(xata_id) < 256))",
1356 },
1357 },
1358 foreignKeys: {
1359 google_drive_token_id_link: {
1360 name: "google_drive_token_id_link",
1361 columns: ["google_drive_token_id"],
1362 referencedTable: "google_drive_tokens",
1363 referencedColumns: ["xata_id"],
1364 onDelete: "CASCADE",
1365 },
1366 user_id_link: {
1367 name: "user_id_link",
1368 columns: ["user_id"],
1369 referencedTable: "users",
1370 referencedColumns: ["xata_id"],
1371 onDelete: "SET NULL",
1372 },
1373 },
1374 primaryKey: [],
1375 uniqueConstraints: {
1376 _pgroll_new_google_drive_xata_id_key: {
1377 name: "_pgroll_new_google_drive_xata_id_key",
1378 columns: ["xata_id"],
1379 },
1380 },
1381 columns: [
1382 {
1383 name: "google_drive_token_id",
1384 type: "link",
1385 link: { table: "google_drive_tokens" },
1386 notNull: true,
1387 unique: false,
1388 defaultValue: null,
1389 comment: '{"xata.link":"google_drive_tokens"}',
1390 },
1391 {
1392 name: "user_id",
1393 type: "link",
1394 link: { table: "users" },
1395 notNull: true,
1396 unique: false,
1397 defaultValue: null,
1398 comment: '{"xata.link":"users"}',
1399 },
1400 {
1401 name: "xata_createdat",
1402 type: "datetime",
1403 notNull: true,
1404 unique: false,
1405 defaultValue: "now()",
1406 comment: "",
1407 },
1408 {
1409 name: "xata_id",
1410 type: "text",
1411 notNull: true,
1412 unique: true,
1413 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
1414 comment: "",
1415 },
1416 {
1417 name: "xata_updatedat",
1418 type: "datetime",
1419 notNull: true,
1420 unique: false,
1421 defaultValue: "now()",
1422 comment: "",
1423 },
1424 {
1425 name: "xata_version",
1426 type: "int",
1427 notNull: true,
1428 unique: false,
1429 defaultValue: "0",
1430 comment: "",
1431 },
1432 ],
1433 },
1434 {
1435 name: "google_drive_accounts",
1436 checkConstraints: {
1437 google_drive_accounts_xata_id_length_xata_id: {
1438 name: "google_drive_accounts_xata_id_length_xata_id",
1439 columns: ["xata_id"],
1440 definition: "CHECK ((length(xata_id) < 256))",
1441 },
1442 },
1443 foreignKeys: {
1444 user_id_link: {
1445 name: "user_id_link",
1446 columns: ["user_id"],
1447 referencedTable: "users",
1448 referencedColumns: ["xata_id"],
1449 onDelete: "CASCADE",
1450 },
1451 },
1452 primaryKey: [],
1453 uniqueConstraints: {
1454 _pgroll_new_google_drive_accounts_xata_id_key: {
1455 name: "_pgroll_new_google_drive_accounts_xata_id_key",
1456 columns: ["xata_id"],
1457 },
1458 google_drive_accounts__pgroll_new_email_key: {
1459 name: "google_drive_accounts__pgroll_new_email_key",
1460 columns: ["email"],
1461 },
1462 },
1463 columns: [
1464 {
1465 name: "email",
1466 type: "text",
1467 notNull: true,
1468 unique: true,
1469 defaultValue: null,
1470 comment: "",
1471 },
1472 {
1473 name: "is_beta_user",
1474 type: "bool",
1475 notNull: true,
1476 unique: false,
1477 defaultValue: null,
1478 comment: "",
1479 },
1480 {
1481 name: "user_id",
1482 type: "link",
1483 link: { table: "users" },
1484 notNull: true,
1485 unique: false,
1486 defaultValue: null,
1487 comment: '{"xata.link":"users"}',
1488 },
1489 {
1490 name: "xata_createdat",
1491 type: "datetime",
1492 notNull: true,
1493 unique: false,
1494 defaultValue: "now()",
1495 comment: "",
1496 },
1497 {
1498 name: "xata_id",
1499 type: "text",
1500 notNull: true,
1501 unique: true,
1502 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
1503 comment: "",
1504 },
1505 {
1506 name: "xata_updatedat",
1507 type: "datetime",
1508 notNull: true,
1509 unique: false,
1510 defaultValue: "now()",
1511 comment: "",
1512 },
1513 {
1514 name: "xata_version",
1515 type: "int",
1516 notNull: true,
1517 unique: false,
1518 defaultValue: "0",
1519 comment: "",
1520 },
1521 ],
1522 },
1523 {
1524 name: "google_drive_paths",
1525 checkConstraints: {
1526 google_drive_paths_xata_id_length_xata_id: {
1527 name: "google_drive_paths_xata_id_length_xata_id",
1528 columns: ["xata_id"],
1529 definition: "CHECK ((length(xata_id) < 256))",
1530 },
1531 },
1532 foreignKeys: {
1533 google_drive_id_link: {
1534 name: "google_drive_id_link",
1535 columns: ["google_drive_id"],
1536 referencedTable: "google_drive",
1537 referencedColumns: ["xata_id"],
1538 onDelete: "CASCADE",
1539 },
1540 track_id_link: {
1541 name: "track_id_link",
1542 columns: ["track_id"],
1543 referencedTable: "tracks",
1544 referencedColumns: ["xata_id"],
1545 onDelete: "CASCADE",
1546 },
1547 },
1548 primaryKey: [],
1549 uniqueConstraints: {
1550 _pgroll_new_google_drive_paths_xata_id_key: {
1551 name: "_pgroll_new_google_drive_paths_xata_id_key",
1552 columns: ["xata_id"],
1553 },
1554 google_drive_paths__pgroll_new_google_drive_file_id_key: {
1555 name: "google_drive_paths__pgroll_new_google_drive_file_id_key",
1556 columns: ["file_id"],
1557 },
1558 },
1559 columns: [
1560 {
1561 name: "file_id",
1562 type: "text",
1563 notNull: true,
1564 unique: true,
1565 defaultValue: null,
1566 comment: "",
1567 },
1568 {
1569 name: "google_drive_id",
1570 type: "link",
1571 link: { table: "google_drive" },
1572 notNull: true,
1573 unique: false,
1574 defaultValue: null,
1575 comment: '{"xata.link":"google_drive"}',
1576 },
1577 {
1578 name: "name",
1579 type: "text",
1580 notNull: true,
1581 unique: false,
1582 defaultValue: null,
1583 comment: "",
1584 },
1585 {
1586 name: "track_id",
1587 type: "link",
1588 link: { table: "tracks" },
1589 notNull: true,
1590 unique: false,
1591 defaultValue: null,
1592 comment: '{"xata.link":"tracks"}',
1593 },
1594 {
1595 name: "xata_createdat",
1596 type: "datetime",
1597 notNull: true,
1598 unique: false,
1599 defaultValue: "now()",
1600 comment: "",
1601 },
1602 {
1603 name: "xata_id",
1604 type: "text",
1605 notNull: true,
1606 unique: true,
1607 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
1608 comment: "",
1609 },
1610 {
1611 name: "xata_updatedat",
1612 type: "datetime",
1613 notNull: true,
1614 unique: false,
1615 defaultValue: "now()",
1616 comment: "",
1617 },
1618 {
1619 name: "xata_version",
1620 type: "int",
1621 notNull: true,
1622 unique: false,
1623 defaultValue: "0",
1624 comment: "",
1625 },
1626 ],
1627 },
1628 {
1629 name: "google_drive_tokens",
1630 checkConstraints: {
1631 google_drive_tokens_xata_id_length_xata_id: {
1632 name: "google_drive_tokens_xata_id_length_xata_id",
1633 columns: ["xata_id"],
1634 definition: "CHECK ((length(xata_id) < 256))",
1635 },
1636 },
1637 foreignKeys: {},
1638 primaryKey: [],
1639 uniqueConstraints: {
1640 _pgroll_new_google_drive_tokens_xata_id_key: {
1641 name: "_pgroll_new_google_drive_tokens_xata_id_key",
1642 columns: ["xata_id"],
1643 },
1644 },
1645 columns: [
1646 {
1647 name: "refresh_token",
1648 type: "text",
1649 notNull: true,
1650 unique: false,
1651 defaultValue: null,
1652 comment: "",
1653 },
1654 {
1655 name: "xata_createdat",
1656 type: "datetime",
1657 notNull: true,
1658 unique: false,
1659 defaultValue: "now()",
1660 comment: "",
1661 },
1662 {
1663 name: "xata_id",
1664 type: "text",
1665 notNull: true,
1666 unique: true,
1667 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
1668 comment: "",
1669 },
1670 {
1671 name: "xata_updatedat",
1672 type: "datetime",
1673 notNull: true,
1674 unique: false,
1675 defaultValue: "now()",
1676 comment: "",
1677 },
1678 {
1679 name: "xata_version",
1680 type: "int",
1681 notNull: true,
1682 unique: false,
1683 defaultValue: "0",
1684 comment: "",
1685 },
1686 ],
1687 },
1688 {
1689 name: "loved_tracks",
1690 checkConstraints: {
1691 loved_tracks_xata_id_length_xata_id: {
1692 name: "loved_tracks_xata_id_length_xata_id",
1693 columns: ["xata_id"],
1694 definition: "CHECK ((length(xata_id) < 256))",
1695 },
1696 },
1697 foreignKeys: {
1698 track_id_link: {
1699 name: "track_id_link",
1700 columns: ["track_id"],
1701 referencedTable: "tracks",
1702 referencedColumns: ["xata_id"],
1703 onDelete: "SET NULL",
1704 },
1705 user_id_link: {
1706 name: "user_id_link",
1707 columns: ["user_id"],
1708 referencedTable: "users",
1709 referencedColumns: ["xata_id"],
1710 onDelete: "SET NULL",
1711 },
1712 },
1713 primaryKey: [],
1714 uniqueConstraints: {
1715 _pgroll_new_loved_tracks_xata_id_key: {
1716 name: "_pgroll_new_loved_tracks_xata_id_key",
1717 columns: ["xata_id"],
1718 },
1719 loved_tracks__pgroll_new_uri_key: {
1720 name: "loved_tracks__pgroll_new_uri_key",
1721 columns: ["uri"],
1722 },
1723 },
1724 columns: [
1725 {
1726 name: "track_id",
1727 type: "link",
1728 link: { table: "tracks" },
1729 notNull: true,
1730 unique: false,
1731 defaultValue: null,
1732 comment: '{"xata.link":"tracks"}',
1733 },
1734 {
1735 name: "uri",
1736 type: "text",
1737 notNull: false,
1738 unique: true,
1739 defaultValue: null,
1740 comment: "",
1741 },
1742 {
1743 name: "user_id",
1744 type: "link",
1745 link: { table: "users" },
1746 notNull: true,
1747 unique: false,
1748 defaultValue: null,
1749 comment: '{"xata.link":"users"}',
1750 },
1751 {
1752 name: "xata_createdat",
1753 type: "datetime",
1754 notNull: true,
1755 unique: false,
1756 defaultValue: "now()",
1757 comment: "",
1758 },
1759 {
1760 name: "xata_id",
1761 type: "text",
1762 notNull: true,
1763 unique: true,
1764 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
1765 comment: "",
1766 },
1767 {
1768 name: "xata_updatedat",
1769 type: "datetime",
1770 notNull: true,
1771 unique: false,
1772 defaultValue: "now()",
1773 comment: "",
1774 },
1775 {
1776 name: "xata_version",
1777 type: "int",
1778 notNull: true,
1779 unique: false,
1780 defaultValue: "0",
1781 comment: "",
1782 },
1783 ],
1784 },
1785 {
1786 name: "playback_state",
1787 checkConstraints: {
1788 playback_states_xata_id_length_xata_id: {
1789 name: "playback_states_xata_id_length_xata_id",
1790 columns: ["xata_id"],
1791 definition: "CHECK ((length(xata_id) < 256))",
1792 },
1793 },
1794 foreignKeys: {
1795 track_id_link: {
1796 name: "track_id_link",
1797 columns: ["track_id"],
1798 referencedTable: "tracks",
1799 referencedColumns: ["xata_id"],
1800 onDelete: "CASCADE",
1801 },
1802 user_id_link: {
1803 name: "user_id_link",
1804 columns: ["user_id"],
1805 referencedTable: "users",
1806 referencedColumns: ["xata_id"],
1807 onDelete: "CASCADE",
1808 },
1809 },
1810 primaryKey: [],
1811 uniqueConstraints: {
1812 _pgroll_new_playback_states_xata_id_key: {
1813 name: "_pgroll_new_playback_states_xata_id_key",
1814 columns: ["xata_id"],
1815 },
1816 },
1817 columns: [
1818 {
1819 name: "progress_ms",
1820 type: "int",
1821 notNull: true,
1822 unique: false,
1823 defaultValue: null,
1824 comment: "",
1825 },
1826 {
1827 name: "queue_position",
1828 type: "int",
1829 notNull: true,
1830 unique: false,
1831 defaultValue: null,
1832 comment: "",
1833 },
1834 {
1835 name: "track_id",
1836 type: "link",
1837 link: { table: "tracks" },
1838 notNull: true,
1839 unique: false,
1840 defaultValue: null,
1841 comment: '{"xata.link":"tracks"}',
1842 },
1843 {
1844 name: "user_id",
1845 type: "link",
1846 link: { table: "users" },
1847 notNull: true,
1848 unique: false,
1849 defaultValue: null,
1850 comment: '{"xata.link":"users"}',
1851 },
1852 {
1853 name: "xata_createdat",
1854 type: "datetime",
1855 notNull: true,
1856 unique: false,
1857 defaultValue: "now()",
1858 comment: "",
1859 },
1860 {
1861 name: "xata_id",
1862 type: "text",
1863 notNull: true,
1864 unique: true,
1865 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
1866 comment: "",
1867 },
1868 {
1869 name: "xata_updatedat",
1870 type: "datetime",
1871 notNull: true,
1872 unique: false,
1873 defaultValue: "now()",
1874 comment: "",
1875 },
1876 {
1877 name: "xata_version",
1878 type: "int",
1879 notNull: true,
1880 unique: false,
1881 defaultValue: "0",
1882 comment: "",
1883 },
1884 ],
1885 },
1886 {
1887 name: "playlist_tracks",
1888 checkConstraints: {
1889 playlist_tracks_xata_id_length_xata_id: {
1890 name: "playlist_tracks_xata_id_length_xata_id",
1891 columns: ["xata_id"],
1892 definition: "CHECK ((length(xata_id) < 256))",
1893 },
1894 },
1895 foreignKeys: {
1896 playlist_id_link: {
1897 name: "playlist_id_link",
1898 columns: ["playlist_id"],
1899 referencedTable: "playlists",
1900 referencedColumns: ["xata_id"],
1901 onDelete: "SET NULL",
1902 },
1903 track_id_link: {
1904 name: "track_id_link",
1905 columns: ["track_id"],
1906 referencedTable: "tracks",
1907 referencedColumns: ["xata_id"],
1908 onDelete: "SET NULL",
1909 },
1910 },
1911 primaryKey: [],
1912 uniqueConstraints: {
1913 _pgroll_new_playlist_tracks_xata_id_key: {
1914 name: "_pgroll_new_playlist_tracks_xata_id_key",
1915 columns: ["xata_id"],
1916 },
1917 },
1918 columns: [
1919 {
1920 name: "playlist_id",
1921 type: "link",
1922 link: { table: "playlists" },
1923 notNull: true,
1924 unique: false,
1925 defaultValue: null,
1926 comment: '{"xata.link":"playlists"}',
1927 },
1928 {
1929 name: "track_id",
1930 type: "link",
1931 link: { table: "tracks" },
1932 notNull: true,
1933 unique: false,
1934 defaultValue: null,
1935 comment: '{"xata.link":"tracks"}',
1936 },
1937 {
1938 name: "xata_createdat",
1939 type: "datetime",
1940 notNull: true,
1941 unique: false,
1942 defaultValue: "now()",
1943 comment: "",
1944 },
1945 {
1946 name: "xata_id",
1947 type: "text",
1948 notNull: true,
1949 unique: true,
1950 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
1951 comment: "",
1952 },
1953 {
1954 name: "xata_updatedat",
1955 type: "datetime",
1956 notNull: true,
1957 unique: false,
1958 defaultValue: "now()",
1959 comment: "",
1960 },
1961 {
1962 name: "xata_version",
1963 type: "int",
1964 notNull: true,
1965 unique: false,
1966 defaultValue: "0",
1967 comment: "",
1968 },
1969 ],
1970 },
1971 {
1972 name: "playlists",
1973 checkConstraints: {
1974 playlists_xata_id_length_xata_id: {
1975 name: "playlists_xata_id_length_xata_id",
1976 columns: ["xata_id"],
1977 definition: "CHECK ((length(xata_id) < 256))",
1978 },
1979 },
1980 foreignKeys: {
1981 created_by_link: {
1982 name: "created_by_link",
1983 columns: ["created_by"],
1984 referencedTable: "users",
1985 referencedColumns: ["xata_id"],
1986 onDelete: "SET NULL",
1987 },
1988 },
1989 primaryKey: [],
1990 uniqueConstraints: {
1991 _pgroll_new_playlists_xata_id_key: {
1992 name: "_pgroll_new_playlists_xata_id_key",
1993 columns: ["xata_id"],
1994 },
1995 playlists__pgroll_new_uri_key: {
1996 name: "playlists__pgroll_new_uri_key",
1997 columns: ["uri"],
1998 },
1999 playlists_apple_music_link_unique: {
2000 name: "playlists_apple_music_link_unique",
2001 columns: ["apple_music_link"],
2002 },
2003 playlists_spotify_link_unique: {
2004 name: "playlists_spotify_link_unique",
2005 columns: ["spotify_link"],
2006 },
2007 playlists_tidal_link_unique: {
2008 name: "playlists_tidal_link_unique",
2009 columns: ["tidal_link"],
2010 },
2011 },
2012 columns: [
2013 {
2014 name: "apple_music_link",
2015 type: "text",
2016 notNull: false,
2017 unique: true,
2018 defaultValue: null,
2019 comment: "",
2020 },
2021 {
2022 name: "created_by",
2023 type: "link",
2024 link: { table: "users" },
2025 notNull: true,
2026 unique: false,
2027 defaultValue: null,
2028 comment: '{"xata.link":"users"}',
2029 },
2030 {
2031 name: "description",
2032 type: "text",
2033 notNull: false,
2034 unique: false,
2035 defaultValue: null,
2036 comment: "",
2037 },
2038 {
2039 name: "name",
2040 type: "text",
2041 notNull: true,
2042 unique: false,
2043 defaultValue: null,
2044 comment: "",
2045 },
2046 {
2047 name: "picture",
2048 type: "text",
2049 notNull: false,
2050 unique: false,
2051 defaultValue: null,
2052 comment: "",
2053 },
2054 {
2055 name: "spotify_link",
2056 type: "text",
2057 notNull: false,
2058 unique: true,
2059 defaultValue: null,
2060 comment: "",
2061 },
2062 {
2063 name: "tidal_link",
2064 type: "text",
2065 notNull: false,
2066 unique: true,
2067 defaultValue: null,
2068 comment: "",
2069 },
2070 {
2071 name: "uri",
2072 type: "text",
2073 notNull: false,
2074 unique: true,
2075 defaultValue: null,
2076 comment: "",
2077 },
2078 {
2079 name: "xata_createdat",
2080 type: "datetime",
2081 notNull: true,
2082 unique: false,
2083 defaultValue: "now()",
2084 comment: "",
2085 },
2086 {
2087 name: "xata_id",
2088 type: "text",
2089 notNull: true,
2090 unique: true,
2091 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
2092 comment: "",
2093 },
2094 {
2095 name: "xata_updatedat",
2096 type: "datetime",
2097 notNull: true,
2098 unique: false,
2099 defaultValue: "now()",
2100 comment: "",
2101 },
2102 {
2103 name: "xata_version",
2104 type: "int",
2105 notNull: true,
2106 unique: false,
2107 defaultValue: "0",
2108 comment: "",
2109 },
2110 ],
2111 },
2112 {
2113 name: "profile_shouts",
2114 checkConstraints: {
2115 profile_shouts_xata_id_length_xata_id: {
2116 name: "profile_shouts_xata_id_length_xata_id",
2117 columns: ["xata_id"],
2118 definition: "CHECK ((length(xata_id) < 256))",
2119 },
2120 },
2121 foreignKeys: {
2122 shout_id_link: {
2123 name: "shout_id_link",
2124 columns: ["shout_id"],
2125 referencedTable: "shouts",
2126 referencedColumns: ["xata_id"],
2127 onDelete: "SET NULL",
2128 },
2129 user_id_link: {
2130 name: "user_id_link",
2131 columns: ["user_id"],
2132 referencedTable: "users",
2133 referencedColumns: ["xata_id"],
2134 onDelete: "SET NULL",
2135 },
2136 },
2137 primaryKey: [],
2138 uniqueConstraints: {
2139 _pgroll_new_profile_shouts_xata_id_key: {
2140 name: "_pgroll_new_profile_shouts_xata_id_key",
2141 columns: ["xata_id"],
2142 },
2143 },
2144 columns: [
2145 {
2146 name: "shout_id",
2147 type: "link",
2148 link: { table: "shouts" },
2149 notNull: true,
2150 unique: false,
2151 defaultValue: null,
2152 comment: '{"xata.link":"shouts"}',
2153 },
2154 {
2155 name: "user_id",
2156 type: "link",
2157 link: { table: "users" },
2158 notNull: true,
2159 unique: false,
2160 defaultValue: null,
2161 comment: '{"xata.link":"users"}',
2162 },
2163 {
2164 name: "xata_createdat",
2165 type: "datetime",
2166 notNull: true,
2167 unique: false,
2168 defaultValue: "now()",
2169 comment: "",
2170 },
2171 {
2172 name: "xata_id",
2173 type: "text",
2174 notNull: true,
2175 unique: true,
2176 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
2177 comment: "",
2178 },
2179 {
2180 name: "xata_updatedat",
2181 type: "datetime",
2182 notNull: true,
2183 unique: false,
2184 defaultValue: "now()",
2185 comment: "",
2186 },
2187 {
2188 name: "xata_version",
2189 type: "int",
2190 notNull: true,
2191 unique: false,
2192 defaultValue: "0",
2193 comment: "",
2194 },
2195 ],
2196 },
2197 {
2198 name: "queue_tracks",
2199 checkConstraints: {
2200 queue_tracks_xata_id_length_xata_id: {
2201 name: "queue_tracks_xata_id_length_xata_id",
2202 columns: ["xata_id"],
2203 definition: "CHECK ((length(xata_id) < 256))",
2204 },
2205 },
2206 foreignKeys: {
2207 track_id_link: {
2208 name: "track_id_link",
2209 columns: ["track_id"],
2210 referencedTable: "tracks",
2211 referencedColumns: ["xata_id"],
2212 onDelete: "SET NULL",
2213 },
2214 user_id_link: {
2215 name: "user_id_link",
2216 columns: ["user_id"],
2217 referencedTable: "users",
2218 referencedColumns: ["xata_id"],
2219 onDelete: "SET NULL",
2220 },
2221 },
2222 primaryKey: [],
2223 uniqueConstraints: {
2224 _pgroll_new_queue_tracks_xata_id_key: {
2225 name: "_pgroll_new_queue_tracks_xata_id_key",
2226 columns: ["xata_id"],
2227 },
2228 },
2229 columns: [
2230 {
2231 name: "position",
2232 type: "int",
2233 notNull: true,
2234 unique: false,
2235 defaultValue: null,
2236 comment: "",
2237 },
2238 {
2239 name: "track_id",
2240 type: "link",
2241 link: { table: "tracks" },
2242 notNull: true,
2243 unique: false,
2244 defaultValue: null,
2245 comment: '{"xata.link":"tracks"}',
2246 },
2247 {
2248 name: "user_id",
2249 type: "link",
2250 link: { table: "users" },
2251 notNull: true,
2252 unique: false,
2253 defaultValue: null,
2254 comment: '{"xata.link":"users"}',
2255 },
2256 {
2257 name: "xata_createdat",
2258 type: "datetime",
2259 notNull: true,
2260 unique: false,
2261 defaultValue: "now()",
2262 comment: "",
2263 },
2264 {
2265 name: "xata_id",
2266 type: "text",
2267 notNull: true,
2268 unique: true,
2269 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
2270 comment: "",
2271 },
2272 {
2273 name: "xata_updatedat",
2274 type: "datetime",
2275 notNull: true,
2276 unique: false,
2277 defaultValue: "now()",
2278 comment: "",
2279 },
2280 {
2281 name: "xata_version",
2282 type: "int",
2283 notNull: true,
2284 unique: false,
2285 defaultValue: "0",
2286 comment: "",
2287 },
2288 ],
2289 },
2290 {
2291 name: "radios",
2292 checkConstraints: {
2293 radios_xata_id_length_xata_id: {
2294 name: "radios_xata_id_length_xata_id",
2295 columns: ["xata_id"],
2296 definition: "CHECK ((length(xata_id) < 256))",
2297 },
2298 },
2299 foreignKeys: {},
2300 primaryKey: [],
2301 uniqueConstraints: {
2302 _pgroll_new_radios_xata_id_key: {
2303 name: "_pgroll_new_radios_xata_id_key",
2304 columns: ["xata_id"],
2305 },
2306 radios__pgroll_new_uri_key: {
2307 name: "radios__pgroll_new_uri_key",
2308 columns: ["uri"],
2309 },
2310 radios__pgroll_new_url_key: {
2311 name: "radios__pgroll_new_url_key",
2312 columns: ["url"],
2313 },
2314 },
2315 columns: [
2316 {
2317 name: "description",
2318 type: "text",
2319 notNull: false,
2320 unique: false,
2321 defaultValue: null,
2322 comment: "",
2323 },
2324 {
2325 name: "genre",
2326 type: "text",
2327 notNull: false,
2328 unique: false,
2329 defaultValue: null,
2330 comment: "",
2331 },
2332 {
2333 name: "logo",
2334 type: "text",
2335 notNull: false,
2336 unique: false,
2337 defaultValue: null,
2338 comment: "",
2339 },
2340 {
2341 name: "name",
2342 type: "text",
2343 notNull: true,
2344 unique: false,
2345 defaultValue: null,
2346 comment: "",
2347 },
2348 {
2349 name: "uri",
2350 type: "text",
2351 notNull: false,
2352 unique: true,
2353 defaultValue: null,
2354 comment: "",
2355 },
2356 {
2357 name: "url",
2358 type: "text",
2359 notNull: true,
2360 unique: true,
2361 defaultValue: null,
2362 comment: "",
2363 },
2364 {
2365 name: "website",
2366 type: "text",
2367 notNull: false,
2368 unique: false,
2369 defaultValue: null,
2370 comment: "",
2371 },
2372 {
2373 name: "xata_createdat",
2374 type: "datetime",
2375 notNull: true,
2376 unique: false,
2377 defaultValue: "now()",
2378 comment: "",
2379 },
2380 {
2381 name: "xata_id",
2382 type: "text",
2383 notNull: true,
2384 unique: true,
2385 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
2386 comment: "",
2387 },
2388 {
2389 name: "xata_updatedat",
2390 type: "datetime",
2391 notNull: true,
2392 unique: false,
2393 defaultValue: "now()",
2394 comment: "",
2395 },
2396 {
2397 name: "xata_version",
2398 type: "int",
2399 notNull: true,
2400 unique: false,
2401 defaultValue: "0",
2402 comment: "",
2403 },
2404 ],
2405 },
2406 {
2407 name: "s3_bucket",
2408 checkConstraints: {
2409 s3_xata_id_length_xata_id: {
2410 name: "s3_xata_id_length_xata_id",
2411 columns: ["xata_id"],
2412 definition: "CHECK ((length(xata_id) < 256))",
2413 },
2414 },
2415 foreignKeys: {
2416 s3_token_id_link: {
2417 name: "s3_token_id_link",
2418 columns: ["s3_token_id"],
2419 referencedTable: "s3_tokens",
2420 referencedColumns: ["xata_id"],
2421 onDelete: "CASCADE",
2422 },
2423 user_id_link: {
2424 name: "user_id_link",
2425 columns: ["user_id"],
2426 referencedTable: "users",
2427 referencedColumns: ["xata_id"],
2428 onDelete: "CASCADE",
2429 },
2430 },
2431 primaryKey: [],
2432 uniqueConstraints: {
2433 _pgroll_new_s3_xata_id_key: {
2434 name: "_pgroll_new_s3_xata_id_key",
2435 columns: ["xata_id"],
2436 },
2437 },
2438 columns: [
2439 {
2440 name: "name",
2441 type: "text",
2442 notNull: true,
2443 unique: false,
2444 defaultValue: null,
2445 comment: "",
2446 },
2447 {
2448 name: "s3_token_id",
2449 type: "link",
2450 link: { table: "s3_tokens" },
2451 notNull: true,
2452 unique: false,
2453 defaultValue: null,
2454 comment: '{"xata.link":"s3_tokens"}',
2455 },
2456 {
2457 name: "user_id",
2458 type: "link",
2459 link: { table: "users" },
2460 notNull: true,
2461 unique: false,
2462 defaultValue: null,
2463 comment: '{"xata.link":"users"}',
2464 },
2465 {
2466 name: "xata_createdat",
2467 type: "datetime",
2468 notNull: true,
2469 unique: false,
2470 defaultValue: "now()",
2471 comment: "",
2472 },
2473 {
2474 name: "xata_id",
2475 type: "text",
2476 notNull: true,
2477 unique: true,
2478 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
2479 comment: "",
2480 },
2481 {
2482 name: "xata_updatedat",
2483 type: "datetime",
2484 notNull: true,
2485 unique: false,
2486 defaultValue: "now()",
2487 comment: "",
2488 },
2489 {
2490 name: "xata_version",
2491 type: "int",
2492 notNull: true,
2493 unique: false,
2494 defaultValue: "0",
2495 comment: "",
2496 },
2497 ],
2498 },
2499 {
2500 name: "s3_paths",
2501 checkConstraints: {
2502 s3_paths_xata_id_length_xata_id: {
2503 name: "s3_paths_xata_id_length_xata_id",
2504 columns: ["xata_id"],
2505 definition: "CHECK ((length(xata_id) < 256))",
2506 },
2507 },
2508 foreignKeys: {
2509 s3_bucket_id_link: {
2510 name: "s3_bucket_id_link",
2511 columns: ["s3_bucket_id"],
2512 referencedTable: "s3_bucket",
2513 referencedColumns: ["xata_id"],
2514 onDelete: "CASCADE",
2515 },
2516 track_id_link: {
2517 name: "track_id_link",
2518 columns: ["track_id"],
2519 referencedTable: "tracks",
2520 referencedColumns: ["xata_id"],
2521 onDelete: "CASCADE",
2522 },
2523 },
2524 primaryKey: [],
2525 uniqueConstraints: {
2526 _pgroll_new_s3_paths_xata_id_key: {
2527 name: "_pgroll_new_s3_paths_xata_id_key",
2528 columns: ["xata_id"],
2529 },
2530 },
2531 columns: [
2532 {
2533 name: "name",
2534 type: "text",
2535 notNull: true,
2536 unique: false,
2537 defaultValue: null,
2538 comment: "",
2539 },
2540 {
2541 name: "path",
2542 type: "text",
2543 notNull: true,
2544 unique: false,
2545 defaultValue: null,
2546 comment: "",
2547 },
2548 {
2549 name: "s3_bucket_id",
2550 type: "link",
2551 link: { table: "s3_bucket" },
2552 notNull: true,
2553 unique: false,
2554 defaultValue: null,
2555 comment: '{"xata.link":"s3_bucket"}',
2556 },
2557 {
2558 name: "track_id",
2559 type: "link",
2560 link: { table: "tracks" },
2561 notNull: true,
2562 unique: false,
2563 defaultValue: null,
2564 comment: '{"xata.link":"tracks"}',
2565 },
2566 {
2567 name: "xata_createdat",
2568 type: "datetime",
2569 notNull: true,
2570 unique: false,
2571 defaultValue: "now()",
2572 comment: "",
2573 },
2574 {
2575 name: "xata_id",
2576 type: "text",
2577 notNull: true,
2578 unique: true,
2579 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
2580 comment: "",
2581 },
2582 {
2583 name: "xata_updatedat",
2584 type: "datetime",
2585 notNull: true,
2586 unique: false,
2587 defaultValue: "now()",
2588 comment: "",
2589 },
2590 {
2591 name: "xata_version",
2592 type: "int",
2593 notNull: true,
2594 unique: false,
2595 defaultValue: "0",
2596 comment: "",
2597 },
2598 ],
2599 },
2600 {
2601 name: "s3_tokens",
2602 checkConstraints: {
2603 s3_tokens_xata_id_length_xata_id: {
2604 name: "s3_tokens_xata_id_length_xata_id",
2605 columns: ["xata_id"],
2606 definition: "CHECK ((length(xata_id) < 256))",
2607 },
2608 },
2609 foreignKeys: {},
2610 primaryKey: [],
2611 uniqueConstraints: {
2612 _pgroll_new_s3_tokens_xata_id_key: {
2613 name: "_pgroll_new_s3_tokens_xata_id_key",
2614 columns: ["xata_id"],
2615 },
2616 },
2617 columns: [
2618 {
2619 name: "client_access_key",
2620 type: "text",
2621 notNull: true,
2622 unique: false,
2623 defaultValue: null,
2624 comment: "",
2625 },
2626 {
2627 name: "secret_access_key",
2628 type: "text",
2629 notNull: true,
2630 unique: false,
2631 defaultValue: null,
2632 comment: "",
2633 },
2634 {
2635 name: "xata_createdat",
2636 type: "datetime",
2637 notNull: true,
2638 unique: false,
2639 defaultValue: "now()",
2640 comment: "",
2641 },
2642 {
2643 name: "xata_id",
2644 type: "text",
2645 notNull: true,
2646 unique: true,
2647 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
2648 comment: "",
2649 },
2650 {
2651 name: "xata_updatedat",
2652 type: "datetime",
2653 notNull: true,
2654 unique: false,
2655 defaultValue: "now()",
2656 comment: "",
2657 },
2658 {
2659 name: "xata_version",
2660 type: "int",
2661 notNull: true,
2662 unique: false,
2663 defaultValue: "0",
2664 comment: "",
2665 },
2666 ],
2667 },
2668 {
2669 name: "scrobbles",
2670 checkConstraints: {
2671 scrobbles_xata_id_length_xata_id: {
2672 name: "scrobbles_xata_id_length_xata_id",
2673 columns: ["xata_id"],
2674 definition: "CHECK ((length(xata_id) < 256))",
2675 },
2676 },
2677 foreignKeys: {
2678 album_id_link: {
2679 name: "album_id_link",
2680 columns: ["album_id"],
2681 referencedTable: "albums",
2682 referencedColumns: ["xata_id"],
2683 onDelete: "SET NULL",
2684 },
2685 artist_id_link: {
2686 name: "artist_id_link",
2687 columns: ["artist_id"],
2688 referencedTable: "artists",
2689 referencedColumns: ["xata_id"],
2690 onDelete: "SET NULL",
2691 },
2692 track_id_link: {
2693 name: "track_id_link",
2694 columns: ["track_id"],
2695 referencedTable: "tracks",
2696 referencedColumns: ["xata_id"],
2697 onDelete: "SET NULL",
2698 },
2699 user_id_link: {
2700 name: "user_id_link",
2701 columns: ["user_id"],
2702 referencedTable: "users",
2703 referencedColumns: ["xata_id"],
2704 onDelete: "SET NULL",
2705 },
2706 },
2707 primaryKey: [],
2708 uniqueConstraints: {
2709 _pgroll_new_scrobbles_xata_id_key: {
2710 name: "_pgroll_new_scrobbles_xata_id_key",
2711 columns: ["xata_id"],
2712 },
2713 scrobbles_uri_unique: { name: "scrobbles_uri_unique", columns: ["uri"] },
2714 },
2715 columns: [
2716 {
2717 name: "album_id",
2718 type: "link",
2719 link: { table: "albums" },
2720 notNull: false,
2721 unique: false,
2722 defaultValue: null,
2723 comment: '{"xata.link":"albums"}',
2724 },
2725 {
2726 name: "artist_id",
2727 type: "link",
2728 link: { table: "artists" },
2729 notNull: false,
2730 unique: false,
2731 defaultValue: null,
2732 comment: '{"xata.link":"artists"}',
2733 },
2734 {
2735 name: "timestamp",
2736 type: "datetime",
2737 notNull: false,
2738 unique: false,
2739 defaultValue: null,
2740 comment: "",
2741 },
2742 {
2743 name: "track_id",
2744 type: "link",
2745 link: { table: "tracks" },
2746 notNull: true,
2747 unique: false,
2748 defaultValue: null,
2749 comment: '{"xata.link":"tracks"}',
2750 },
2751 {
2752 name: "uri",
2753 type: "text",
2754 notNull: false,
2755 unique: true,
2756 defaultValue: null,
2757 comment: "",
2758 },
2759 {
2760 name: "user_id",
2761 type: "link",
2762 link: { table: "users" },
2763 notNull: true,
2764 unique: false,
2765 defaultValue: null,
2766 comment: '{"xata.link":"users"}',
2767 },
2768 {
2769 name: "xata_createdat",
2770 type: "datetime",
2771 notNull: true,
2772 unique: false,
2773 defaultValue: "now()",
2774 comment: "",
2775 },
2776 {
2777 name: "xata_id",
2778 type: "text",
2779 notNull: true,
2780 unique: true,
2781 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
2782 comment: "",
2783 },
2784 {
2785 name: "xata_updatedat",
2786 type: "datetime",
2787 notNull: true,
2788 unique: false,
2789 defaultValue: "now()",
2790 comment: "",
2791 },
2792 {
2793 name: "xata_version",
2794 type: "int",
2795 notNull: true,
2796 unique: false,
2797 defaultValue: "0",
2798 comment: "",
2799 },
2800 ],
2801 },
2802 {
2803 name: "sftp",
2804 checkConstraints: {
2805 sftp_xata_id_length_xata_id: {
2806 name: "sftp_xata_id_length_xata_id",
2807 columns: ["xata_id"],
2808 definition: "CHECK ((length(xata_id) < 256))",
2809 },
2810 },
2811 foreignKeys: {},
2812 primaryKey: [],
2813 uniqueConstraints: {
2814 _pgroll_new_sftp_xata_id_key: {
2815 name: "_pgroll_new_sftp_xata_id_key",
2816 columns: ["xata_id"],
2817 },
2818 },
2819 columns: [
2820 {
2821 name: "xata_createdat",
2822 type: "datetime",
2823 notNull: true,
2824 unique: false,
2825 defaultValue: "now()",
2826 comment: "",
2827 },
2828 {
2829 name: "xata_id",
2830 type: "text",
2831 notNull: true,
2832 unique: true,
2833 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
2834 comment: "",
2835 },
2836 {
2837 name: "xata_updatedat",
2838 type: "datetime",
2839 notNull: true,
2840 unique: false,
2841 defaultValue: "now()",
2842 comment: "",
2843 },
2844 {
2845 name: "xata_version",
2846 type: "int",
2847 notNull: true,
2848 unique: false,
2849 defaultValue: "0",
2850 comment: "",
2851 },
2852 ],
2853 },
2854 {
2855 name: "sftp_access",
2856 checkConstraints: {
2857 sftp_access_xata_id_length_xata_id: {
2858 name: "sftp_access_xata_id_length_xata_id",
2859 columns: ["xata_id"],
2860 definition: "CHECK ((length(xata_id) < 256))",
2861 },
2862 },
2863 foreignKeys: {},
2864 primaryKey: [],
2865 uniqueConstraints: {
2866 _pgroll_new_sftp_access_xata_id_key: {
2867 name: "_pgroll_new_sftp_access_xata_id_key",
2868 columns: ["xata_id"],
2869 },
2870 },
2871 columns: [
2872 {
2873 name: "xata_createdat",
2874 type: "datetime",
2875 notNull: true,
2876 unique: false,
2877 defaultValue: "now()",
2878 comment: "",
2879 },
2880 {
2881 name: "xata_id",
2882 type: "text",
2883 notNull: true,
2884 unique: true,
2885 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
2886 comment: "",
2887 },
2888 {
2889 name: "xata_updatedat",
2890 type: "datetime",
2891 notNull: true,
2892 unique: false,
2893 defaultValue: "now()",
2894 comment: "",
2895 },
2896 {
2897 name: "xata_version",
2898 type: "int",
2899 notNull: true,
2900 unique: false,
2901 defaultValue: "0",
2902 comment: "",
2903 },
2904 ],
2905 },
2906 {
2907 name: "sftp_path",
2908 checkConstraints: {
2909 sftp_path_xata_id_length_xata_id: {
2910 name: "sftp_path_xata_id_length_xata_id",
2911 columns: ["xata_id"],
2912 definition: "CHECK ((length(xata_id) < 256))",
2913 },
2914 },
2915 foreignKeys: {
2916 sftp_id_link: {
2917 name: "sftp_id_link",
2918 columns: ["sftp_id"],
2919 referencedTable: "sftp",
2920 referencedColumns: ["xata_id"],
2921 onDelete: "CASCADE",
2922 },
2923 track_id_link: {
2924 name: "track_id_link",
2925 columns: ["track_id"],
2926 referencedTable: "tracks",
2927 referencedColumns: ["xata_id"],
2928 onDelete: "CASCADE",
2929 },
2930 },
2931 primaryKey: [],
2932 uniqueConstraints: {
2933 _pgroll_new_sftp_path_xata_id_key: {
2934 name: "_pgroll_new_sftp_path_xata_id_key",
2935 columns: ["xata_id"],
2936 },
2937 },
2938 columns: [
2939 {
2940 name: "name",
2941 type: "text",
2942 notNull: true,
2943 unique: false,
2944 defaultValue: null,
2945 comment: "",
2946 },
2947 {
2948 name: "path",
2949 type: "text",
2950 notNull: true,
2951 unique: false,
2952 defaultValue: null,
2953 comment: "",
2954 },
2955 {
2956 name: "sftp_id",
2957 type: "link",
2958 link: { table: "sftp" },
2959 notNull: true,
2960 unique: false,
2961 defaultValue: null,
2962 comment: '{"xata.link":"sftp"}',
2963 },
2964 {
2965 name: "track_id",
2966 type: "link",
2967 link: { table: "tracks" },
2968 notNull: true,
2969 unique: false,
2970 defaultValue: null,
2971 comment: '{"xata.link":"tracks"}',
2972 },
2973 {
2974 name: "xata_createdat",
2975 type: "datetime",
2976 notNull: true,
2977 unique: false,
2978 defaultValue: "now()",
2979 comment: "",
2980 },
2981 {
2982 name: "xata_id",
2983 type: "text",
2984 notNull: true,
2985 unique: true,
2986 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
2987 comment: "",
2988 },
2989 {
2990 name: "xata_updatedat",
2991 type: "datetime",
2992 notNull: true,
2993 unique: false,
2994 defaultValue: "now()",
2995 comment: "",
2996 },
2997 {
2998 name: "xata_version",
2999 type: "int",
3000 notNull: true,
3001 unique: false,
3002 defaultValue: "0",
3003 comment: "",
3004 },
3005 ],
3006 },
3007 {
3008 name: "shout_likes",
3009 checkConstraints: {
3010 shout_likes_xata_id_length_xata_id: {
3011 name: "shout_likes_xata_id_length_xata_id",
3012 columns: ["xata_id"],
3013 definition: "CHECK ((length(xata_id) < 256))",
3014 },
3015 },
3016 foreignKeys: {
3017 shout_id_link: {
3018 name: "shout_id_link",
3019 columns: ["shout_id"],
3020 referencedTable: "shouts",
3021 referencedColumns: ["xata_id"],
3022 onDelete: "SET NULL",
3023 },
3024 user_id_link: {
3025 name: "user_id_link",
3026 columns: ["user_id"],
3027 referencedTable: "users",
3028 referencedColumns: ["xata_id"],
3029 onDelete: "SET NULL",
3030 },
3031 },
3032 primaryKey: [],
3033 uniqueConstraints: {
3034 _pgroll_new_shout_likes_xata_id_key: {
3035 name: "_pgroll_new_shout_likes_xata_id_key",
3036 columns: ["xata_id"],
3037 },
3038 shout_likes__pgroll_new_uri_key: {
3039 name: "shout_likes__pgroll_new_uri_key",
3040 columns: ["uri"],
3041 },
3042 },
3043 columns: [
3044 {
3045 name: "shout_id",
3046 type: "link",
3047 link: { table: "shouts" },
3048 notNull: true,
3049 unique: false,
3050 defaultValue: null,
3051 comment: '{"xata.link":"shouts"}',
3052 },
3053 {
3054 name: "uri",
3055 type: "text",
3056 notNull: true,
3057 unique: true,
3058 defaultValue: null,
3059 comment: "",
3060 },
3061 {
3062 name: "user_id",
3063 type: "link",
3064 link: { table: "users" },
3065 notNull: true,
3066 unique: false,
3067 defaultValue: null,
3068 comment: '{"xata.link":"users"}',
3069 },
3070 {
3071 name: "xata_createdat",
3072 type: "datetime",
3073 notNull: true,
3074 unique: false,
3075 defaultValue: "now()",
3076 comment: "",
3077 },
3078 {
3079 name: "xata_id",
3080 type: "text",
3081 notNull: true,
3082 unique: true,
3083 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
3084 comment: "",
3085 },
3086 {
3087 name: "xata_updatedat",
3088 type: "datetime",
3089 notNull: true,
3090 unique: false,
3091 defaultValue: "now()",
3092 comment: "",
3093 },
3094 {
3095 name: "xata_version",
3096 type: "int",
3097 notNull: true,
3098 unique: false,
3099 defaultValue: "0",
3100 comment: "",
3101 },
3102 ],
3103 },
3104 {
3105 name: "shout_reports",
3106 checkConstraints: {
3107 shout_reports_xata_id_length_xata_id: {
3108 name: "shout_reports_xata_id_length_xata_id",
3109 columns: ["xata_id"],
3110 definition: "CHECK ((length(xata_id) < 256))",
3111 },
3112 },
3113 foreignKeys: {
3114 shout_id_link: {
3115 name: "shout_id_link",
3116 columns: ["shout_id"],
3117 referencedTable: "shouts",
3118 referencedColumns: ["xata_id"],
3119 onDelete: "SET NULL",
3120 },
3121 user_id_link: {
3122 name: "user_id_link",
3123 columns: ["user_id"],
3124 referencedTable: "users",
3125 referencedColumns: ["xata_id"],
3126 onDelete: "SET NULL",
3127 },
3128 },
3129 primaryKey: [],
3130 uniqueConstraints: {
3131 _pgroll_new_shout_reports_xata_id_key: {
3132 name: "_pgroll_new_shout_reports_xata_id_key",
3133 columns: ["xata_id"],
3134 },
3135 },
3136 columns: [
3137 {
3138 name: "shout_id",
3139 type: "link",
3140 link: { table: "shouts" },
3141 notNull: true,
3142 unique: false,
3143 defaultValue: null,
3144 comment: '{"xata.link":"shouts"}',
3145 },
3146 {
3147 name: "user_id",
3148 type: "link",
3149 link: { table: "users" },
3150 notNull: true,
3151 unique: false,
3152 defaultValue: null,
3153 comment: '{"xata.link":"users"}',
3154 },
3155 {
3156 name: "xata_createdat",
3157 type: "datetime",
3158 notNull: true,
3159 unique: false,
3160 defaultValue: "now()",
3161 comment: "",
3162 },
3163 {
3164 name: "xata_id",
3165 type: "text",
3166 notNull: true,
3167 unique: true,
3168 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
3169 comment: "",
3170 },
3171 {
3172 name: "xata_updatedat",
3173 type: "datetime",
3174 notNull: true,
3175 unique: false,
3176 defaultValue: "now()",
3177 comment: "",
3178 },
3179 {
3180 name: "xata_version",
3181 type: "int",
3182 notNull: true,
3183 unique: false,
3184 defaultValue: "0",
3185 comment: "",
3186 },
3187 ],
3188 },
3189 {
3190 name: "shouts",
3191 checkConstraints: {
3192 shouts_xata_id_length_xata_id: {
3193 name: "shouts_xata_id_length_xata_id",
3194 columns: ["xata_id"],
3195 definition: "CHECK ((length(xata_id) < 256))",
3196 },
3197 },
3198 foreignKeys: {
3199 album_id_link: {
3200 name: "album_id_link",
3201 columns: ["album_id"],
3202 referencedTable: "albums",
3203 referencedColumns: ["xata_id"],
3204 onDelete: "SET NULL",
3205 },
3206 artist_id_link: {
3207 name: "artist_id_link",
3208 columns: ["artist_id"],
3209 referencedTable: "artists",
3210 referencedColumns: ["xata_id"],
3211 onDelete: "SET NULL",
3212 },
3213 parent_id_link: {
3214 name: "parent_id_link",
3215 columns: ["parent_id"],
3216 referencedTable: "shouts",
3217 referencedColumns: ["xata_id"],
3218 onDelete: "SET NULL",
3219 },
3220 scrobble_id_link: {
3221 name: "scrobble_id_link",
3222 columns: ["scrobble_id"],
3223 referencedTable: "scrobbles",
3224 referencedColumns: ["xata_id"],
3225 onDelete: "SET NULL",
3226 },
3227 track_id_link: {
3228 name: "track_id_link",
3229 columns: ["track_id"],
3230 referencedTable: "tracks",
3231 referencedColumns: ["xata_id"],
3232 onDelete: "SET NULL",
3233 },
3234 user_id_link: {
3235 name: "user_id_link",
3236 columns: ["author_id"],
3237 referencedTable: "users",
3238 referencedColumns: ["xata_id"],
3239 onDelete: "SET NULL",
3240 },
3241 },
3242 primaryKey: [],
3243 uniqueConstraints: {
3244 _pgroll_new_shouts_xata_id_key: {
3245 name: "_pgroll_new_shouts_xata_id_key",
3246 columns: ["xata_id"],
3247 },
3248 shouts__pgroll_new_uri_key: {
3249 name: "shouts__pgroll_new_uri_key",
3250 columns: ["uri"],
3251 },
3252 },
3253 columns: [
3254 {
3255 name: "album_id",
3256 type: "link",
3257 link: { table: "albums" },
3258 notNull: false,
3259 unique: false,
3260 defaultValue: null,
3261 comment: '{"xata.link":"albums"}',
3262 },
3263 {
3264 name: "artist_id",
3265 type: "link",
3266 link: { table: "artists" },
3267 notNull: false,
3268 unique: false,
3269 defaultValue: null,
3270 comment: '{"xata.link":"artists"}',
3271 },
3272 {
3273 name: "author_id",
3274 type: "link",
3275 link: { table: "users" },
3276 notNull: true,
3277 unique: false,
3278 defaultValue: null,
3279 comment: '{"xata.link":"users"}',
3280 },
3281 {
3282 name: "content",
3283 type: "text",
3284 notNull: true,
3285 unique: false,
3286 defaultValue: null,
3287 comment: "",
3288 },
3289 {
3290 name: "parent_id",
3291 type: "link",
3292 link: { table: "shouts" },
3293 notNull: false,
3294 unique: false,
3295 defaultValue: null,
3296 comment: '{"xata.link":"shouts"}',
3297 },
3298 {
3299 name: "scrobble_id",
3300 type: "link",
3301 link: { table: "scrobbles" },
3302 notNull: false,
3303 unique: false,
3304 defaultValue: null,
3305 comment: '{"xata.link":"scrobbles"}',
3306 },
3307 {
3308 name: "track_id",
3309 type: "link",
3310 link: { table: "tracks" },
3311 notNull: false,
3312 unique: false,
3313 defaultValue: null,
3314 comment: '{"xata.link":"tracks"}',
3315 },
3316 {
3317 name: "uri",
3318 type: "text",
3319 notNull: false,
3320 unique: true,
3321 defaultValue: null,
3322 comment: "",
3323 },
3324 {
3325 name: "xata_createdat",
3326 type: "datetime",
3327 notNull: true,
3328 unique: false,
3329 defaultValue: "now()",
3330 comment: "",
3331 },
3332 {
3333 name: "xata_id",
3334 type: "text",
3335 notNull: true,
3336 unique: true,
3337 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
3338 comment: "",
3339 },
3340 {
3341 name: "xata_updatedat",
3342 type: "datetime",
3343 notNull: true,
3344 unique: false,
3345 defaultValue: "now()",
3346 comment: "",
3347 },
3348 {
3349 name: "xata_version",
3350 type: "int",
3351 notNull: true,
3352 unique: false,
3353 defaultValue: "0",
3354 comment: "",
3355 },
3356 ],
3357 },
3358 {
3359 name: "spotify_accounts",
3360 checkConstraints: {
3361 spotify_accounts_xata_id_length_xata_id: {
3362 name: "spotify_accounts_xata_id_length_xata_id",
3363 columns: ["xata_id"],
3364 definition: "CHECK ((length(xata_id) < 256))",
3365 },
3366 },
3367 foreignKeys: {
3368 user_id_link: {
3369 name: "user_id_link",
3370 columns: ["user_id"],
3371 referencedTable: "users",
3372 referencedColumns: ["xata_id"],
3373 onDelete: "SET NULL",
3374 },
3375 },
3376 primaryKey: [],
3377 uniqueConstraints: {
3378 _pgroll_new_spotify_accounts_xata_id_key: {
3379 name: "_pgroll_new_spotify_accounts_xata_id_key",
3380 columns: ["xata_id"],
3381 },
3382 spotify_accounts__pgroll_new_email_key: {
3383 name: "spotify_accounts__pgroll_new_email_key",
3384 columns: ["email"],
3385 },
3386 },
3387 columns: [
3388 {
3389 name: "email",
3390 type: "text",
3391 notNull: true,
3392 unique: true,
3393 defaultValue: null,
3394 comment: "",
3395 },
3396 {
3397 name: "is_beta_user",
3398 type: "bool",
3399 notNull: true,
3400 unique: false,
3401 defaultValue: "false",
3402 comment: "",
3403 },
3404 {
3405 name: "user_id",
3406 type: "link",
3407 link: { table: "users" },
3408 notNull: true,
3409 unique: false,
3410 defaultValue: null,
3411 comment: '{"xata.link":"users"}',
3412 },
3413 {
3414 name: "xata_createdat",
3415 type: "datetime",
3416 notNull: true,
3417 unique: false,
3418 defaultValue: "now()",
3419 comment: "",
3420 },
3421 {
3422 name: "xata_id",
3423 type: "text",
3424 notNull: true,
3425 unique: true,
3426 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
3427 comment: "",
3428 },
3429 {
3430 name: "xata_updatedat",
3431 type: "datetime",
3432 notNull: true,
3433 unique: false,
3434 defaultValue: "now()",
3435 comment: "",
3436 },
3437 {
3438 name: "xata_version",
3439 type: "int",
3440 notNull: true,
3441 unique: false,
3442 defaultValue: "0",
3443 comment: "",
3444 },
3445 ],
3446 },
3447 {
3448 name: "spotify_tokens",
3449 checkConstraints: {
3450 spotify_tokens_xata_id_length_xata_id: {
3451 name: "spotify_tokens_xata_id_length_xata_id",
3452 columns: ["xata_id"],
3453 definition: "CHECK ((length(xata_id) < 256))",
3454 },
3455 },
3456 foreignKeys: {
3457 user_id_link: {
3458 name: "user_id_link",
3459 columns: ["user_id"],
3460 referencedTable: "users",
3461 referencedColumns: ["xata_id"],
3462 onDelete: "SET NULL",
3463 },
3464 },
3465 primaryKey: [],
3466 uniqueConstraints: {
3467 _pgroll_new_spotify_tokens_xata_id_key: {
3468 name: "_pgroll_new_spotify_tokens_xata_id_key",
3469 columns: ["xata_id"],
3470 },
3471 },
3472 columns: [
3473 {
3474 name: "access_token",
3475 type: "text",
3476 notNull: true,
3477 unique: false,
3478 defaultValue: null,
3479 comment: "",
3480 },
3481 {
3482 name: "refresh_token",
3483 type: "text",
3484 notNull: true,
3485 unique: false,
3486 defaultValue: null,
3487 comment: "",
3488 },
3489 {
3490 name: "user_id",
3491 type: "link",
3492 link: { table: "users" },
3493 notNull: true,
3494 unique: false,
3495 defaultValue: null,
3496 comment: '{"xata.link":"users"}',
3497 },
3498 {
3499 name: "xata_createdat",
3500 type: "datetime",
3501 notNull: true,
3502 unique: false,
3503 defaultValue: "now()",
3504 comment: "",
3505 },
3506 {
3507 name: "xata_id",
3508 type: "text",
3509 notNull: true,
3510 unique: true,
3511 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
3512 comment: "",
3513 },
3514 {
3515 name: "xata_updatedat",
3516 type: "datetime",
3517 notNull: true,
3518 unique: false,
3519 defaultValue: "now()",
3520 comment: "",
3521 },
3522 {
3523 name: "xata_version",
3524 type: "int",
3525 notNull: true,
3526 unique: false,
3527 defaultValue: "0",
3528 comment: "",
3529 },
3530 ],
3531 },
3532 {
3533 name: "tags",
3534 checkConstraints: {
3535 tags_xata_id_length_xata_id: {
3536 name: "tags_xata_id_length_xata_id",
3537 columns: ["xata_id"],
3538 definition: "CHECK ((length(xata_id) < 256))",
3539 },
3540 },
3541 foreignKeys: {},
3542 primaryKey: [],
3543 uniqueConstraints: {
3544 _pgroll_new_tags_xata_id_key: {
3545 name: "_pgroll_new_tags_xata_id_key",
3546 columns: ["xata_id"],
3547 },
3548 tags__pgroll_new_name_key: {
3549 name: "tags__pgroll_new_name_key",
3550 columns: ["name"],
3551 },
3552 },
3553 columns: [
3554 {
3555 name: "name",
3556 type: "text",
3557 notNull: true,
3558 unique: true,
3559 defaultValue: null,
3560 comment: "",
3561 },
3562 {
3563 name: "xata_createdat",
3564 type: "datetime",
3565 notNull: true,
3566 unique: false,
3567 defaultValue: "now()",
3568 comment: "",
3569 },
3570 {
3571 name: "xata_id",
3572 type: "text",
3573 notNull: true,
3574 unique: true,
3575 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
3576 comment: "",
3577 },
3578 {
3579 name: "xata_updatedat",
3580 type: "datetime",
3581 notNull: true,
3582 unique: false,
3583 defaultValue: "now()",
3584 comment: "",
3585 },
3586 {
3587 name: "xata_version",
3588 type: "int",
3589 notNull: true,
3590 unique: false,
3591 defaultValue: "0",
3592 comment: "",
3593 },
3594 ],
3595 },
3596 {
3597 name: "track_tags",
3598 checkConstraints: {
3599 track_tags_xata_id_length_xata_id: {
3600 name: "track_tags_xata_id_length_xata_id",
3601 columns: ["xata_id"],
3602 definition: "CHECK ((length(xata_id) < 256))",
3603 },
3604 },
3605 foreignKeys: {
3606 tag_id_link: {
3607 name: "tag_id_link",
3608 columns: ["tag_id"],
3609 referencedTable: "tags",
3610 referencedColumns: ["xata_id"],
3611 onDelete: "SET NULL",
3612 },
3613 track_id_link: {
3614 name: "track_id_link",
3615 columns: ["track_id"],
3616 referencedTable: "tracks",
3617 referencedColumns: ["xata_id"],
3618 onDelete: "SET NULL",
3619 },
3620 },
3621 primaryKey: [],
3622 uniqueConstraints: {
3623 _pgroll_new_track_tags_xata_id_key: {
3624 name: "_pgroll_new_track_tags_xata_id_key",
3625 columns: ["xata_id"],
3626 },
3627 },
3628 columns: [
3629 {
3630 name: "tag_id",
3631 type: "link",
3632 link: { table: "tags" },
3633 notNull: true,
3634 unique: false,
3635 defaultValue: null,
3636 comment: '{"xata.link":"tags"}',
3637 },
3638 {
3639 name: "track_id",
3640 type: "link",
3641 link: { table: "tracks" },
3642 notNull: true,
3643 unique: false,
3644 defaultValue: null,
3645 comment: '{"xata.link":"tracks"}',
3646 },
3647 {
3648 name: "xata_createdat",
3649 type: "datetime",
3650 notNull: true,
3651 unique: false,
3652 defaultValue: "now()",
3653 comment: "",
3654 },
3655 {
3656 name: "xata_id",
3657 type: "text",
3658 notNull: true,
3659 unique: true,
3660 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
3661 comment: "",
3662 },
3663 {
3664 name: "xata_updatedat",
3665 type: "datetime",
3666 notNull: true,
3667 unique: false,
3668 defaultValue: "now()",
3669 comment: "",
3670 },
3671 {
3672 name: "xata_version",
3673 type: "int",
3674 notNull: true,
3675 unique: false,
3676 defaultValue: "0",
3677 comment: "",
3678 },
3679 ],
3680 },
3681 {
3682 name: "tracks",
3683 checkConstraints: {
3684 tracks_xata_id_length_xata_id: {
3685 name: "tracks_xata_id_length_xata_id",
3686 columns: ["xata_id"],
3687 definition: "CHECK ((length(xata_id) < 256))",
3688 },
3689 },
3690 foreignKeys: {},
3691 primaryKey: [],
3692 uniqueConstraints: {
3693 _pgroll_new_tracks_xata_id_key: {
3694 name: "_pgroll_new_tracks_xata_id_key",
3695 columns: ["xata_id"],
3696 },
3697 tracks__pgroll_new_mb_id_key: {
3698 name: "tracks__pgroll_new_mb_id_key",
3699 columns: ["mb_id"],
3700 },
3701 tracks__pgroll_new_sha256_key: {
3702 name: "tracks__pgroll_new_sha256_key",
3703 columns: ["sha256"],
3704 },
3705 tracks__pgroll_new_uri_key: {
3706 name: "tracks__pgroll_new_uri_key",
3707 columns: ["uri"],
3708 },
3709 tracks_tidal_link_unique: {
3710 name: "tracks_tidal_link_unique",
3711 columns: ["tidal_link"],
3712 },
3713 tracks_youtube_link_unique: {
3714 name: "tracks_youtube_link_unique",
3715 columns: ["youtube_link"],
3716 },
3717 },
3718 columns: [
3719 {
3720 name: "album",
3721 type: "text",
3722 notNull: true,
3723 unique: false,
3724 defaultValue: null,
3725 comment: "",
3726 },
3727 {
3728 name: "album_art",
3729 type: "text",
3730 notNull: false,
3731 unique: false,
3732 defaultValue: null,
3733 comment: "",
3734 },
3735 {
3736 name: "album_artist",
3737 type: "text",
3738 notNull: true,
3739 unique: false,
3740 defaultValue: null,
3741 comment: "",
3742 },
3743 {
3744 name: "album_uri",
3745 type: "text",
3746 notNull: false,
3747 unique: false,
3748 defaultValue: null,
3749 comment: "",
3750 },
3751 {
3752 name: "apple_music_link",
3753 type: "text",
3754 notNull: false,
3755 unique: false,
3756 defaultValue: null,
3757 comment: "",
3758 },
3759 {
3760 name: "artist",
3761 type: "text",
3762 notNull: true,
3763 unique: false,
3764 defaultValue: null,
3765 comment: "",
3766 },
3767 {
3768 name: "artist_uri",
3769 type: "text",
3770 notNull: false,
3771 unique: false,
3772 defaultValue: null,
3773 comment: "",
3774 },
3775 {
3776 name: "composer",
3777 type: "text",
3778 notNull: false,
3779 unique: false,
3780 defaultValue: null,
3781 comment: "",
3782 },
3783 {
3784 name: "copyright_message",
3785 type: "text",
3786 notNull: false,
3787 unique: false,
3788 defaultValue: null,
3789 comment: "",
3790 },
3791 {
3792 name: "disc_number",
3793 type: "int",
3794 notNull: false,
3795 unique: false,
3796 defaultValue: null,
3797 comment: "",
3798 },
3799 {
3800 name: "duration",
3801 type: "int",
3802 notNull: false,
3803 unique: false,
3804 defaultValue: null,
3805 comment: "",
3806 },
3807 {
3808 name: "genre",
3809 type: "text",
3810 notNull: false,
3811 unique: false,
3812 defaultValue: null,
3813 comment: "",
3814 },
3815 {
3816 name: "label",
3817 type: "text",
3818 notNull: false,
3819 unique: false,
3820 defaultValue: null,
3821 comment: "",
3822 },
3823 {
3824 name: "lastfm_link",
3825 type: "text",
3826 notNull: false,
3827 unique: false,
3828 defaultValue: null,
3829 comment: "",
3830 },
3831 {
3832 name: "lyrics",
3833 type: "text",
3834 notNull: false,
3835 unique: false,
3836 defaultValue: null,
3837 comment: "",
3838 },
3839 {
3840 name: "mb_id",
3841 type: "text",
3842 notNull: false,
3843 unique: true,
3844 defaultValue: null,
3845 comment: "",
3846 },
3847 {
3848 name: "sha256",
3849 type: "text",
3850 notNull: true,
3851 unique: true,
3852 defaultValue: null,
3853 comment: "",
3854 },
3855 {
3856 name: "spotify_link",
3857 type: "text",
3858 notNull: false,
3859 unique: false,
3860 defaultValue: null,
3861 comment: "",
3862 },
3863 {
3864 name: "tidal_link",
3865 type: "text",
3866 notNull: false,
3867 unique: true,
3868 defaultValue: null,
3869 comment: "",
3870 },
3871 {
3872 name: "title",
3873 type: "text",
3874 notNull: true,
3875 unique: false,
3876 defaultValue: null,
3877 comment: "",
3878 },
3879 {
3880 name: "track_number",
3881 type: "int",
3882 notNull: false,
3883 unique: false,
3884 defaultValue: null,
3885 comment: "",
3886 },
3887 {
3888 name: "uri",
3889 type: "text",
3890 notNull: false,
3891 unique: true,
3892 defaultValue: null,
3893 comment: "",
3894 },
3895 {
3896 name: "xata_createdat",
3897 type: "datetime",
3898 notNull: true,
3899 unique: false,
3900 defaultValue: "now()",
3901 comment: "",
3902 },
3903 {
3904 name: "xata_id",
3905 type: "text",
3906 notNull: true,
3907 unique: true,
3908 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
3909 comment: "",
3910 },
3911 {
3912 name: "xata_updatedat",
3913 type: "datetime",
3914 notNull: true,
3915 unique: false,
3916 defaultValue: "now()",
3917 comment: "",
3918 },
3919 {
3920 name: "xata_version",
3921 type: "int",
3922 notNull: true,
3923 unique: false,
3924 defaultValue: "0",
3925 comment: "",
3926 },
3927 {
3928 name: "youtube_link",
3929 type: "text",
3930 notNull: false,
3931 unique: true,
3932 defaultValue: null,
3933 comment: "",
3934 },
3935 ],
3936 },
3937 {
3938 name: "user_albums",
3939 checkConstraints: {
3940 user_albums_xata_id_length_xata_id: {
3941 name: "user_albums_xata_id_length_xata_id",
3942 columns: ["xata_id"],
3943 definition: "CHECK ((length(xata_id) < 256))",
3944 },
3945 },
3946 foreignKeys: {
3947 album_id_link: {
3948 name: "album_id_link",
3949 columns: ["album_id"],
3950 referencedTable: "albums",
3951 referencedColumns: ["xata_id"],
3952 onDelete: "SET NULL",
3953 },
3954 user_id_link: {
3955 name: "user_id_link",
3956 columns: ["user_id"],
3957 referencedTable: "users",
3958 referencedColumns: ["xata_id"],
3959 onDelete: "SET NULL",
3960 },
3961 },
3962 primaryKey: [],
3963 uniqueConstraints: {
3964 _pgroll_new_user_albums_xata_id_key: {
3965 name: "_pgroll_new_user_albums_xata_id_key",
3966 columns: ["xata_id"],
3967 },
3968 },
3969 columns: [
3970 {
3971 name: "album_id",
3972 type: "link",
3973 link: { table: "albums" },
3974 notNull: true,
3975 unique: false,
3976 defaultValue: null,
3977 comment: '{"xata.link":"albums"}',
3978 },
3979 {
3980 name: "scrobbles",
3981 type: "int",
3982 notNull: false,
3983 unique: false,
3984 defaultValue: null,
3985 comment: "",
3986 },
3987 {
3988 name: "uri",
3989 type: "text",
3990 notNull: false,
3991 unique: false,
3992 defaultValue: null,
3993 comment: "",
3994 },
3995 {
3996 name: "user_id",
3997 type: "link",
3998 link: { table: "users" },
3999 notNull: true,
4000 unique: false,
4001 defaultValue: null,
4002 comment: '{"xata.link":"users"}',
4003 },
4004 {
4005 name: "xata_createdat",
4006 type: "datetime",
4007 notNull: true,
4008 unique: false,
4009 defaultValue: "now()",
4010 comment: "",
4011 },
4012 {
4013 name: "xata_id",
4014 type: "text",
4015 notNull: true,
4016 unique: true,
4017 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
4018 comment: "",
4019 },
4020 {
4021 name: "xata_updatedat",
4022 type: "datetime",
4023 notNull: true,
4024 unique: false,
4025 defaultValue: "now()",
4026 comment: "",
4027 },
4028 {
4029 name: "xata_version",
4030 type: "int",
4031 notNull: true,
4032 unique: false,
4033 defaultValue: "0",
4034 comment: "",
4035 },
4036 ],
4037 },
4038 {
4039 name: "user_artists",
4040 checkConstraints: {
4041 user_artists_xata_id_length_xata_id: {
4042 name: "user_artists_xata_id_length_xata_id",
4043 columns: ["xata_id"],
4044 definition: "CHECK ((length(xata_id) < 256))",
4045 },
4046 },
4047 foreignKeys: {
4048 artist_id_link: {
4049 name: "artist_id_link",
4050 columns: ["artist_id"],
4051 referencedTable: "artists",
4052 referencedColumns: ["xata_id"],
4053 onDelete: "SET NULL",
4054 },
4055 user_id_link: {
4056 name: "user_id_link",
4057 columns: ["user_id"],
4058 referencedTable: "users",
4059 referencedColumns: ["xata_id"],
4060 onDelete: "SET NULL",
4061 },
4062 },
4063 primaryKey: [],
4064 uniqueConstraints: {
4065 _pgroll_new_user_artists_xata_id_key: {
4066 name: "_pgroll_new_user_artists_xata_id_key",
4067 columns: ["xata_id"],
4068 },
4069 },
4070 columns: [
4071 {
4072 name: "artist_id",
4073 type: "link",
4074 link: { table: "artists" },
4075 notNull: true,
4076 unique: false,
4077 defaultValue: null,
4078 comment: '{"xata.link":"artists"}',
4079 },
4080 {
4081 name: "scrobbles",
4082 type: "int",
4083 notNull: false,
4084 unique: false,
4085 defaultValue: null,
4086 comment: "",
4087 },
4088 {
4089 name: "uri",
4090 type: "text",
4091 notNull: true,
4092 unique: false,
4093 defaultValue: null,
4094 comment: "",
4095 },
4096 {
4097 name: "user_id",
4098 type: "link",
4099 link: { table: "users" },
4100 notNull: true,
4101 unique: false,
4102 defaultValue: null,
4103 comment: '{"xata.link":"users"}',
4104 },
4105 {
4106 name: "xata_createdat",
4107 type: "datetime",
4108 notNull: true,
4109 unique: false,
4110 defaultValue: "now()",
4111 comment: "",
4112 },
4113 {
4114 name: "xata_id",
4115 type: "text",
4116 notNull: true,
4117 unique: true,
4118 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
4119 comment: "",
4120 },
4121 {
4122 name: "xata_updatedat",
4123 type: "datetime",
4124 notNull: true,
4125 unique: false,
4126 defaultValue: "now()",
4127 comment: "",
4128 },
4129 {
4130 name: "xata_version",
4131 type: "int",
4132 notNull: true,
4133 unique: false,
4134 defaultValue: "0",
4135 comment: "",
4136 },
4137 ],
4138 },
4139 {
4140 name: "user_playlists",
4141 checkConstraints: {
4142 user_playlists_xata_id_length_xata_id: {
4143 name: "user_playlists_xata_id_length_xata_id",
4144 columns: ["xata_id"],
4145 definition: "CHECK ((length(xata_id) < 256))",
4146 },
4147 },
4148 foreignKeys: {
4149 playlist_id_link: {
4150 name: "playlist_id_link",
4151 columns: ["playlist_id"],
4152 referencedTable: "playlists",
4153 referencedColumns: ["xata_id"],
4154 onDelete: "SET NULL",
4155 },
4156 user_id_link: {
4157 name: "user_id_link",
4158 columns: ["user_id"],
4159 referencedTable: "users",
4160 referencedColumns: ["xata_id"],
4161 onDelete: "SET NULL",
4162 },
4163 },
4164 primaryKey: [],
4165 uniqueConstraints: {
4166 _pgroll_new_user_playlists_xata_id_key: {
4167 name: "_pgroll_new_user_playlists_xata_id_key",
4168 columns: ["xata_id"],
4169 },
4170 user_playlists__pgroll_new_uri_key: {
4171 name: "user_playlists__pgroll_new_uri_key",
4172 columns: ["uri"],
4173 },
4174 },
4175 columns: [
4176 {
4177 name: "playlist_id",
4178 type: "link",
4179 link: { table: "playlists" },
4180 notNull: true,
4181 unique: false,
4182 defaultValue: null,
4183 comment: '{"xata.link":"playlists"}',
4184 },
4185 {
4186 name: "uri",
4187 type: "text",
4188 notNull: false,
4189 unique: true,
4190 defaultValue: null,
4191 comment: "",
4192 },
4193 {
4194 name: "user_id",
4195 type: "link",
4196 link: { table: "users" },
4197 notNull: true,
4198 unique: false,
4199 defaultValue: null,
4200 comment: '{"xata.link":"users"}',
4201 },
4202 {
4203 name: "xata_createdat",
4204 type: "datetime",
4205 notNull: true,
4206 unique: false,
4207 defaultValue: "now()",
4208 comment: "",
4209 },
4210 {
4211 name: "xata_id",
4212 type: "text",
4213 notNull: true,
4214 unique: true,
4215 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
4216 comment: "",
4217 },
4218 {
4219 name: "xata_updatedat",
4220 type: "datetime",
4221 notNull: true,
4222 unique: false,
4223 defaultValue: "now()",
4224 comment: "",
4225 },
4226 {
4227 name: "xata_version",
4228 type: "int",
4229 notNull: true,
4230 unique: false,
4231 defaultValue: "0",
4232 comment: "",
4233 },
4234 ],
4235 },
4236 {
4237 name: "user_tracks",
4238 checkConstraints: {
4239 user_tracks_xata_id_length_xata_id: {
4240 name: "user_tracks_xata_id_length_xata_id",
4241 columns: ["xata_id"],
4242 definition: "CHECK ((length(xata_id) < 256))",
4243 },
4244 },
4245 foreignKeys: {
4246 track_id_link: {
4247 name: "track_id_link",
4248 columns: ["track_id"],
4249 referencedTable: "tracks",
4250 referencedColumns: ["xata_id"],
4251 onDelete: "SET NULL",
4252 },
4253 user_id_link: {
4254 name: "user_id_link",
4255 columns: ["user_id"],
4256 referencedTable: "users",
4257 referencedColumns: ["xata_id"],
4258 onDelete: "SET NULL",
4259 },
4260 },
4261 primaryKey: [],
4262 uniqueConstraints: {
4263 _pgroll_new_user_tracks_xata_id_key: {
4264 name: "_pgroll_new_user_tracks_xata_id_key",
4265 columns: ["xata_id"],
4266 },
4267 },
4268 columns: [
4269 {
4270 name: "scrobbles",
4271 type: "int",
4272 notNull: false,
4273 unique: false,
4274 defaultValue: null,
4275 comment: "",
4276 },
4277 {
4278 name: "track_id",
4279 type: "link",
4280 link: { table: "tracks" },
4281 notNull: true,
4282 unique: false,
4283 defaultValue: null,
4284 comment: '{"xata.link":"tracks"}',
4285 },
4286 {
4287 name: "uri",
4288 type: "text",
4289 notNull: false,
4290 unique: false,
4291 defaultValue: null,
4292 comment: "",
4293 },
4294 {
4295 name: "user_id",
4296 type: "link",
4297 link: { table: "users" },
4298 notNull: true,
4299 unique: false,
4300 defaultValue: null,
4301 comment: '{"xata.link":"users"}',
4302 },
4303 {
4304 name: "xata_createdat",
4305 type: "datetime",
4306 notNull: true,
4307 unique: false,
4308 defaultValue: "now()",
4309 comment: "",
4310 },
4311 {
4312 name: "xata_id",
4313 type: "text",
4314 notNull: true,
4315 unique: true,
4316 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
4317 comment: "",
4318 },
4319 {
4320 name: "xata_updatedat",
4321 type: "datetime",
4322 notNull: true,
4323 unique: false,
4324 defaultValue: "now()",
4325 comment: "",
4326 },
4327 {
4328 name: "xata_version",
4329 type: "int",
4330 notNull: true,
4331 unique: false,
4332 defaultValue: "0",
4333 comment: "",
4334 },
4335 ],
4336 },
4337 {
4338 name: "users",
4339 checkConstraints: {
4340 users_xata_id_length_xata_id: {
4341 name: "users_xata_id_length_xata_id",
4342 columns: ["xata_id"],
4343 definition: "CHECK ((length(xata_id) < 256))",
4344 },
4345 },
4346 foreignKeys: {},
4347 primaryKey: [],
4348 uniqueConstraints: {
4349 _pgroll_new_users_xata_id_key: {
4350 name: "_pgroll_new_users_xata_id_key",
4351 columns: ["xata_id"],
4352 },
4353 users__pgroll_new_did_key: {
4354 name: "users__pgroll_new_did_key",
4355 columns: ["did"],
4356 },
4357 users__pgroll_new_handle_key: {
4358 name: "users__pgroll_new_handle_key",
4359 columns: ["handle"],
4360 },
4361 },
4362 columns: [
4363 {
4364 name: "avatar",
4365 type: "text",
4366 notNull: true,
4367 unique: false,
4368 defaultValue: null,
4369 comment: "",
4370 },
4371 {
4372 name: "did",
4373 type: "text",
4374 notNull: true,
4375 unique: true,
4376 defaultValue: null,
4377 comment: "",
4378 },
4379 {
4380 name: "display_name",
4381 type: "text",
4382 notNull: true,
4383 unique: false,
4384 defaultValue: null,
4385 comment: "",
4386 },
4387 {
4388 name: "handle",
4389 type: "text",
4390 notNull: true,
4391 unique: true,
4392 defaultValue: null,
4393 comment: "",
4394 },
4395 {
4396 name: "xata_createdat",
4397 type: "datetime",
4398 notNull: true,
4399 unique: false,
4400 defaultValue: "now()",
4401 comment: "",
4402 },
4403 {
4404 name: "xata_id",
4405 type: "text",
4406 notNull: true,
4407 unique: true,
4408 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
4409 comment: "",
4410 },
4411 {
4412 name: "xata_updatedat",
4413 type: "datetime",
4414 notNull: true,
4415 unique: false,
4416 defaultValue: "now()",
4417 comment: "",
4418 },
4419 {
4420 name: "xata_version",
4421 type: "int",
4422 notNull: true,
4423 unique: false,
4424 defaultValue: "0",
4425 comment: "",
4426 },
4427 ],
4428 },
4429 {
4430 name: "webscrobblers",
4431 checkConstraints: {
4432 webscrobblers_xata_id_length_xata_id: {
4433 name: "webscrobblers_xata_id_length_xata_id",
4434 columns: ["xata_id"],
4435 definition: "CHECK ((length(xata_id) < 256))",
4436 },
4437 },
4438 foreignKeys: {
4439 user_id_link: {
4440 name: "user_id_link",
4441 columns: ["user_id"],
4442 referencedTable: "users",
4443 referencedColumns: ["xata_id"],
4444 onDelete: "CASCADE",
4445 },
4446 },
4447 primaryKey: [],
4448 uniqueConstraints: {
4449 _pgroll_new_webscrobblers_xata_id_key: {
4450 name: "_pgroll_new_webscrobblers_xata_id_key",
4451 columns: ["xata_id"],
4452 },
4453 webscrobblers__pgroll_new_uuid_key: {
4454 name: "webscrobblers__pgroll_new_uuid_key",
4455 columns: ["uuid"],
4456 },
4457 },
4458 columns: [
4459 {
4460 name: "description",
4461 type: "text",
4462 notNull: false,
4463 unique: false,
4464 defaultValue: null,
4465 comment: "",
4466 },
4467 {
4468 name: "enabled",
4469 type: "bool",
4470 notNull: false,
4471 unique: false,
4472 defaultValue: "true",
4473 comment: "",
4474 },
4475 {
4476 name: "name",
4477 type: "text",
4478 notNull: true,
4479 unique: false,
4480 defaultValue: null,
4481 comment: "",
4482 },
4483 {
4484 name: "user_id",
4485 type: "link",
4486 link: { table: "users" },
4487 notNull: true,
4488 unique: false,
4489 defaultValue: null,
4490 comment: '{"xata.link":"users"}',
4491 },
4492 {
4493 name: "uuid",
4494 type: "text",
4495 notNull: true,
4496 unique: true,
4497 defaultValue: null,
4498 comment: "",
4499 },
4500 {
4501 name: "xata_createdat",
4502 type: "datetime",
4503 notNull: true,
4504 unique: false,
4505 defaultValue: "now()",
4506 comment: "",
4507 },
4508 {
4509 name: "xata_id",
4510 type: "text",
4511 notNull: true,
4512 unique: true,
4513 defaultValue: "('rec_'::text || (xata_private.xid())::text)",
4514 comment: "",
4515 },
4516 {
4517 name: "xata_updatedat",
4518 type: "datetime",
4519 notNull: true,
4520 unique: false,
4521 defaultValue: "now()",
4522 comment: "",
4523 },
4524 {
4525 name: "xata_version",
4526 type: "int",
4527 notNull: true,
4528 unique: false,
4529 defaultValue: "0",
4530 comment: "",
4531 },
4532 ],
4533 },
4534] as const;
4535
4536export type SchemaTables = typeof tables;
4537export type InferredTypes = SchemaInference<SchemaTables>;
4538
4539export type AlbumTags = InferredTypes["album_tags"];
4540export type AlbumTagsRecord = AlbumTags & XataRecord;
4541
4542export type AlbumTracks = InferredTypes["album_tracks"];
4543export type AlbumTracksRecord = AlbumTracks & XataRecord;
4544
4545export type Albums = InferredTypes["albums"];
4546export type AlbumsRecord = Albums & XataRecord;
4547
4548export type ApiKeys = InferredTypes["api_keys"];
4549export type ApiKeysRecord = ApiKeys & XataRecord;
4550
4551export type ArtistAlbums = InferredTypes["artist_albums"];
4552export type ArtistAlbumsRecord = ArtistAlbums & XataRecord;
4553
4554export type ArtistTags = InferredTypes["artist_tags"];
4555export type ArtistTagsRecord = ArtistTags & XataRecord;
4556
4557export type ArtistTracks = InferredTypes["artist_tracks"];
4558export type ArtistTracksRecord = ArtistTracks & XataRecord;
4559
4560export type Artists = InferredTypes["artists"];
4561export type ArtistsRecord = Artists & XataRecord;
4562
4563export type BuiltinStoragePaths = InferredTypes["builtin_storage_paths"];
4564export type BuiltinStoragePathsRecord = BuiltinStoragePaths & XataRecord;
4565
4566export type Dropbox = InferredTypes["dropbox"];
4567export type DropboxRecord = Dropbox & XataRecord;
4568
4569export type DropboxAccounts = InferredTypes["dropbox_accounts"];
4570export type DropboxAccountsRecord = DropboxAccounts & XataRecord;
4571
4572export type DropboxPaths = InferredTypes["dropbox_paths"];
4573export type DropboxPathsRecord = DropboxPaths & XataRecord;
4574
4575export type DropboxTokens = InferredTypes["dropbox_tokens"];
4576export type DropboxTokensRecord = DropboxTokens & XataRecord;
4577
4578export type GoogleDrive = InferredTypes["google_drive"];
4579export type GoogleDriveRecord = GoogleDrive & XataRecord;
4580
4581export type GoogleDriveAccounts = InferredTypes["google_drive_accounts"];
4582export type GoogleDriveAccountsRecord = GoogleDriveAccounts & XataRecord;
4583
4584export type GoogleDrivePaths = InferredTypes["google_drive_paths"];
4585export type GoogleDrivePathsRecord = GoogleDrivePaths & XataRecord;
4586
4587export type GoogleDriveTokens = InferredTypes["google_drive_tokens"];
4588export type GoogleDriveTokensRecord = GoogleDriveTokens & XataRecord;
4589
4590export type LovedTracks = InferredTypes["loved_tracks"];
4591export type LovedTracksRecord = LovedTracks & XataRecord;
4592
4593export type PlaybackState = InferredTypes["playback_state"];
4594export type PlaybackStateRecord = PlaybackState & XataRecord;
4595
4596export type PlaylistTracks = InferredTypes["playlist_tracks"];
4597export type PlaylistTracksRecord = PlaylistTracks & XataRecord;
4598
4599export type Playlists = InferredTypes["playlists"];
4600export type PlaylistsRecord = Playlists & XataRecord;
4601
4602export type ProfileShouts = InferredTypes["profile_shouts"];
4603export type ProfileShoutsRecord = ProfileShouts & XataRecord;
4604
4605export type QueueTracks = InferredTypes["queue_tracks"];
4606export type QueueTracksRecord = QueueTracks & XataRecord;
4607
4608export type Radios = InferredTypes["radios"];
4609export type RadiosRecord = Radios & XataRecord;
4610
4611export type S3Bucket = InferredTypes["s3_bucket"];
4612export type S3BucketRecord = S3Bucket & XataRecord;
4613
4614export type S3Paths = InferredTypes["s3_paths"];
4615export type S3PathsRecord = S3Paths & XataRecord;
4616
4617export type S3Tokens = InferredTypes["s3_tokens"];
4618export type S3TokensRecord = S3Tokens & XataRecord;
4619
4620export type Scrobbles = InferredTypes["scrobbles"];
4621export type ScrobblesRecord = Scrobbles & XataRecord;
4622
4623export type Sftp = InferredTypes["sftp"];
4624export type SftpRecord = Sftp & XataRecord;
4625
4626export type SftpAccess = InferredTypes["sftp_access"];
4627export type SftpAccessRecord = SftpAccess & XataRecord;
4628
4629export type SftpPath = InferredTypes["sftp_path"];
4630export type SftpPathRecord = SftpPath & XataRecord;
4631
4632export type ShoutLikes = InferredTypes["shout_likes"];
4633export type ShoutLikesRecord = ShoutLikes & XataRecord;
4634
4635export type ShoutReports = InferredTypes["shout_reports"];
4636export type ShoutReportsRecord = ShoutReports & XataRecord;
4637
4638export type Shouts = InferredTypes["shouts"];
4639export type ShoutsRecord = Shouts & XataRecord;
4640
4641export type SpotifyAccounts = InferredTypes["spotify_accounts"];
4642export type SpotifyAccountsRecord = SpotifyAccounts & XataRecord;
4643
4644export type SpotifyTokens = InferredTypes["spotify_tokens"];
4645export type SpotifyTokensRecord = SpotifyTokens & XataRecord;
4646
4647export type Tags = InferredTypes["tags"];
4648export type TagsRecord = Tags & XataRecord;
4649
4650export type TrackTags = InferredTypes["track_tags"];
4651export type TrackTagsRecord = TrackTags & XataRecord;
4652
4653export type Tracks = InferredTypes["tracks"];
4654export type TracksRecord = Tracks & XataRecord;
4655
4656export type UserAlbums = InferredTypes["user_albums"];
4657export type UserAlbumsRecord = UserAlbums & XataRecord;
4658
4659export type UserArtists = InferredTypes["user_artists"];
4660export type UserArtistsRecord = UserArtists & XataRecord;
4661
4662export type UserPlaylists = InferredTypes["user_playlists"];
4663export type UserPlaylistsRecord = UserPlaylists & XataRecord;
4664
4665export type UserTracks = InferredTypes["user_tracks"];
4666export type UserTracksRecord = UserTracks & XataRecord;
4667
4668export type Users = InferredTypes["users"];
4669export type UsersRecord = Users & XataRecord;
4670
4671export type Webscrobblers = InferredTypes["webscrobblers"];
4672export type WebscrobblersRecord = Webscrobblers & XataRecord;
4673
4674export type DatabaseSchema = {
4675 album_tags: AlbumTagsRecord;
4676 album_tracks: AlbumTracksRecord;
4677 albums: AlbumsRecord;
4678 api_keys: ApiKeysRecord;
4679 artist_albums: ArtistAlbumsRecord;
4680 artist_tags: ArtistTagsRecord;
4681 artist_tracks: ArtistTracksRecord;
4682 artists: ArtistsRecord;
4683 builtin_storage_paths: BuiltinStoragePathsRecord;
4684 dropbox: DropboxRecord;
4685 dropbox_accounts: DropboxAccountsRecord;
4686 dropbox_paths: DropboxPathsRecord;
4687 dropbox_tokens: DropboxTokensRecord;
4688 google_drive: GoogleDriveRecord;
4689 google_drive_accounts: GoogleDriveAccountsRecord;
4690 google_drive_paths: GoogleDrivePathsRecord;
4691 google_drive_tokens: GoogleDriveTokensRecord;
4692 loved_tracks: LovedTracksRecord;
4693 playback_state: PlaybackStateRecord;
4694 playlist_tracks: PlaylistTracksRecord;
4695 playlists: PlaylistsRecord;
4696 profile_shouts: ProfileShoutsRecord;
4697 queue_tracks: QueueTracksRecord;
4698 radios: RadiosRecord;
4699 s3_bucket: S3BucketRecord;
4700 s3_paths: S3PathsRecord;
4701 s3_tokens: S3TokensRecord;
4702 scrobbles: ScrobblesRecord;
4703 sftp: SftpRecord;
4704 sftp_access: SftpAccessRecord;
4705 sftp_path: SftpPathRecord;
4706 shout_likes: ShoutLikesRecord;
4707 shout_reports: ShoutReportsRecord;
4708 shouts: ShoutsRecord;
4709 spotify_accounts: SpotifyAccountsRecord;
4710 spotify_tokens: SpotifyTokensRecord;
4711 tags: TagsRecord;
4712 track_tags: TrackTagsRecord;
4713 tracks: TracksRecord;
4714 user_albums: UserAlbumsRecord;
4715 user_artists: UserArtistsRecord;
4716 user_playlists: UserPlaylistsRecord;
4717 user_tracks: UserTracksRecord;
4718 users: UsersRecord;
4719 webscrobblers: WebscrobblersRecord;
4720};
4721
4722const DatabaseClient = buildClient();
4723
4724const defaultOptions = {
4725 databaseURL:
4726 "https://Tsiry-Sandratraina-s-workspace-b1ficn.us-east-1.xata.sh/db/rocksky",
4727};
4728
4729export class XataClient extends DatabaseClient<DatabaseSchema> {
4730 constructor(options?: BaseClientOptions) {
4731 super({ ...defaultOptions, ...options }, tables);
4732 }
4733}
4734
4735let instance: XataClient | undefined;
4736
4737export const getXataClient = () => {
4738 if (instance) return instance;
4739
4740 instance = new XataClient();
4741 return instance;
4742};