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