A decentralized music tracking and discovery platform built on AT Protocol 🎵
listenbrainz spotify atproto lastfm musicbrainz scrobbling

feat: update user playlists schema and related functionality

- Added new entries to the journal for tracking purposes.
- Changed the import from tracks to playlists in user-playlists schema.
- Updated the playlistId reference in user-playlists to point to playlists instead of tracks.
- Modified the insert_album_track function to remove xata_createdat from the insert statement.
- Updated the insert_playlist_track function to remove added_by from the insert statement.
- Removed added_by field from the PlaylistTrack struct in xata.

+1
apps/api/drizzle/0001_fluffy_epoch.sql
··· 1 + ALTER TABLE "user_playlists" ALTER COLUMN "uri" DROP NOT NULL;
+3
apps/api/drizzle/0002_sweet_randall_flagg.sql
··· 1 + ALTER TABLE "user_playlists" DROP CONSTRAINT "user_playlists_playlist_id_tracks_xata_id_fk"; 2 + --> statement-breakpoint 3 + ALTER TABLE "user_playlists" ADD CONSTRAINT "user_playlists_playlist_id_playlists_xata_id_fk" FOREIGN KEY ("playlist_id") REFERENCES "public"."playlists"("xata_id") ON DELETE no action ON UPDATE no action;
+3132
apps/api/drizzle/meta/0001_snapshot.json
··· 1 + { 2 + "id": "6ebb9775-b900-418c-bbd8-b704571a20d5", 3 + "prevId": "6b33dcd0-52df-4403-bdc0-31517769923d", 4 + "version": "7", 5 + "dialect": "postgresql", 6 + "tables": { 7 + "public.album_tracks": { 8 + "name": "album_tracks", 9 + "schema": "", 10 + "columns": { 11 + "xata_id": { 12 + "name": "xata_id", 13 + "type": "text", 14 + "primaryKey": true, 15 + "notNull": true 16 + }, 17 + "album_id": { 18 + "name": "album_id", 19 + "type": "text", 20 + "primaryKey": false, 21 + "notNull": true 22 + }, 23 + "track_id": { 24 + "name": "track_id", 25 + "type": "text", 26 + "primaryKey": false, 27 + "notNull": true 28 + }, 29 + "xata_createdat": { 30 + "name": "xata_createdat", 31 + "type": "timestamp", 32 + "primaryKey": false, 33 + "notNull": true, 34 + "default": "now()" 35 + }, 36 + "xata_updatedat": { 37 + "name": "xata_updatedat", 38 + "type": "timestamp", 39 + "primaryKey": false, 40 + "notNull": true, 41 + "default": "now()" 42 + }, 43 + "xata_version": { 44 + "name": "xata_version", 45 + "type": "integer", 46 + "primaryKey": false, 47 + "notNull": false 48 + } 49 + }, 50 + "indexes": {}, 51 + "foreignKeys": { 52 + "album_tracks_album_id_albums_xata_id_fk": { 53 + "name": "album_tracks_album_id_albums_xata_id_fk", 54 + "tableFrom": "album_tracks", 55 + "tableTo": "albums", 56 + "columnsFrom": [ 57 + "album_id" 58 + ], 59 + "columnsTo": [ 60 + "xata_id" 61 + ], 62 + "onDelete": "no action", 63 + "onUpdate": "no action" 64 + }, 65 + "album_tracks_track_id_tracks_xata_id_fk": { 66 + "name": "album_tracks_track_id_tracks_xata_id_fk", 67 + "tableFrom": "album_tracks", 68 + "tableTo": "tracks", 69 + "columnsFrom": [ 70 + "track_id" 71 + ], 72 + "columnsTo": [ 73 + "xata_id" 74 + ], 75 + "onDelete": "no action", 76 + "onUpdate": "no action" 77 + } 78 + }, 79 + "compositePrimaryKeys": {}, 80 + "uniqueConstraints": {}, 81 + "policies": {}, 82 + "checkConstraints": {}, 83 + "isRLSEnabled": false 84 + }, 85 + "public.albums": { 86 + "name": "albums", 87 + "schema": "", 88 + "columns": { 89 + "xata_id": { 90 + "name": "xata_id", 91 + "type": "text", 92 + "primaryKey": true, 93 + "notNull": true 94 + }, 95 + "title": { 96 + "name": "title", 97 + "type": "text", 98 + "primaryKey": false, 99 + "notNull": true 100 + }, 101 + "artist": { 102 + "name": "artist", 103 + "type": "text", 104 + "primaryKey": false, 105 + "notNull": true 106 + }, 107 + "release_date": { 108 + "name": "release_date", 109 + "type": "text", 110 + "primaryKey": false, 111 + "notNull": false 112 + }, 113 + "year": { 114 + "name": "year", 115 + "type": "integer", 116 + "primaryKey": false, 117 + "notNull": false 118 + }, 119 + "album_art": { 120 + "name": "album_art", 121 + "type": "text", 122 + "primaryKey": false, 123 + "notNull": false 124 + }, 125 + "uri": { 126 + "name": "uri", 127 + "type": "text", 128 + "primaryKey": false, 129 + "notNull": false 130 + }, 131 + "artist_uri": { 132 + "name": "artist_uri", 133 + "type": "text", 134 + "primaryKey": false, 135 + "notNull": false 136 + }, 137 + "apple_music_link": { 138 + "name": "apple_music_link", 139 + "type": "text", 140 + "primaryKey": false, 141 + "notNull": false 142 + }, 143 + "spotify_link": { 144 + "name": "spotify_link", 145 + "type": "text", 146 + "primaryKey": false, 147 + "notNull": false 148 + }, 149 + "tidal_link": { 150 + "name": "tidal_link", 151 + "type": "text", 152 + "primaryKey": false, 153 + "notNull": false 154 + }, 155 + "youtube_link": { 156 + "name": "youtube_link", 157 + "type": "text", 158 + "primaryKey": false, 159 + "notNull": false 160 + }, 161 + "sha256": { 162 + "name": "sha256", 163 + "type": "text", 164 + "primaryKey": false, 165 + "notNull": true 166 + }, 167 + "xata_createdat": { 168 + "name": "xata_createdat", 169 + "type": "timestamp", 170 + "primaryKey": false, 171 + "notNull": true, 172 + "default": "now()" 173 + }, 174 + "xata_updatedat": { 175 + "name": "xata_updatedat", 176 + "type": "timestamp", 177 + "primaryKey": false, 178 + "notNull": true, 179 + "default": "now()" 180 + }, 181 + "xata_version": { 182 + "name": "xata_version", 183 + "type": "integer", 184 + "primaryKey": false, 185 + "notNull": false 186 + } 187 + }, 188 + "indexes": {}, 189 + "foreignKeys": {}, 190 + "compositePrimaryKeys": {}, 191 + "uniqueConstraints": { 192 + "albums_uri_unique": { 193 + "name": "albums_uri_unique", 194 + "nullsNotDistinct": false, 195 + "columns": [ 196 + "uri" 197 + ] 198 + }, 199 + "albums_apple_music_link_unique": { 200 + "name": "albums_apple_music_link_unique", 201 + "nullsNotDistinct": false, 202 + "columns": [ 203 + "apple_music_link" 204 + ] 205 + }, 206 + "albums_spotify_link_unique": { 207 + "name": "albums_spotify_link_unique", 208 + "nullsNotDistinct": false, 209 + "columns": [ 210 + "spotify_link" 211 + ] 212 + }, 213 + "albums_tidal_link_unique": { 214 + "name": "albums_tidal_link_unique", 215 + "nullsNotDistinct": false, 216 + "columns": [ 217 + "tidal_link" 218 + ] 219 + }, 220 + "albums_youtube_link_unique": { 221 + "name": "albums_youtube_link_unique", 222 + "nullsNotDistinct": false, 223 + "columns": [ 224 + "youtube_link" 225 + ] 226 + }, 227 + "albums_sha256_unique": { 228 + "name": "albums_sha256_unique", 229 + "nullsNotDistinct": false, 230 + "columns": [ 231 + "sha256" 232 + ] 233 + } 234 + }, 235 + "policies": {}, 236 + "checkConstraints": {}, 237 + "isRLSEnabled": false 238 + }, 239 + "public.api_keys": { 240 + "name": "api_keys", 241 + "schema": "", 242 + "columns": { 243 + "xata_id": { 244 + "name": "xata_id", 245 + "type": "text", 246 + "primaryKey": true, 247 + "notNull": true 248 + }, 249 + "name": { 250 + "name": "name", 251 + "type": "text", 252 + "primaryKey": false, 253 + "notNull": true 254 + }, 255 + "api_key": { 256 + "name": "api_key", 257 + "type": "text", 258 + "primaryKey": false, 259 + "notNull": true 260 + }, 261 + "shared_secret": { 262 + "name": "shared_secret", 263 + "type": "text", 264 + "primaryKey": false, 265 + "notNull": true 266 + }, 267 + "description": { 268 + "name": "description", 269 + "type": "text", 270 + "primaryKey": false, 271 + "notNull": false 272 + }, 273 + "enabled": { 274 + "name": "enabled", 275 + "type": "boolean", 276 + "primaryKey": false, 277 + "notNull": true, 278 + "default": true 279 + }, 280 + "user_id": { 281 + "name": "user_id", 282 + "type": "text", 283 + "primaryKey": false, 284 + "notNull": true 285 + }, 286 + "xata_createdat": { 287 + "name": "xata_createdat", 288 + "type": "timestamp", 289 + "primaryKey": false, 290 + "notNull": true, 291 + "default": "now()" 292 + }, 293 + "xata_updatedat": { 294 + "name": "xata_updatedat", 295 + "type": "timestamp", 296 + "primaryKey": false, 297 + "notNull": true, 298 + "default": "now()" 299 + } 300 + }, 301 + "indexes": {}, 302 + "foreignKeys": { 303 + "api_keys_user_id_users_xata_id_fk": { 304 + "name": "api_keys_user_id_users_xata_id_fk", 305 + "tableFrom": "api_keys", 306 + "tableTo": "users", 307 + "columnsFrom": [ 308 + "user_id" 309 + ], 310 + "columnsTo": [ 311 + "xata_id" 312 + ], 313 + "onDelete": "no action", 314 + "onUpdate": "no action" 315 + } 316 + }, 317 + "compositePrimaryKeys": {}, 318 + "uniqueConstraints": {}, 319 + "policies": {}, 320 + "checkConstraints": {}, 321 + "isRLSEnabled": false 322 + }, 323 + "public.artist_albums": { 324 + "name": "artist_albums", 325 + "schema": "", 326 + "columns": { 327 + "xata_id": { 328 + "name": "xata_id", 329 + "type": "text", 330 + "primaryKey": true, 331 + "notNull": true 332 + }, 333 + "artist_id": { 334 + "name": "artist_id", 335 + "type": "text", 336 + "primaryKey": false, 337 + "notNull": true 338 + }, 339 + "album_id": { 340 + "name": "album_id", 341 + "type": "text", 342 + "primaryKey": false, 343 + "notNull": true 344 + }, 345 + "xata_createdat": { 346 + "name": "xata_createdat", 347 + "type": "timestamp", 348 + "primaryKey": false, 349 + "notNull": true, 350 + "default": "now()" 351 + }, 352 + "xata_updatedat": { 353 + "name": "xata_updatedat", 354 + "type": "timestamp", 355 + "primaryKey": false, 356 + "notNull": true, 357 + "default": "now()" 358 + }, 359 + "xata_version": { 360 + "name": "xata_version", 361 + "type": "integer", 362 + "primaryKey": false, 363 + "notNull": false 364 + } 365 + }, 366 + "indexes": {}, 367 + "foreignKeys": { 368 + "artist_albums_artist_id_artists_xata_id_fk": { 369 + "name": "artist_albums_artist_id_artists_xata_id_fk", 370 + "tableFrom": "artist_albums", 371 + "tableTo": "artists", 372 + "columnsFrom": [ 373 + "artist_id" 374 + ], 375 + "columnsTo": [ 376 + "xata_id" 377 + ], 378 + "onDelete": "no action", 379 + "onUpdate": "no action" 380 + }, 381 + "artist_albums_album_id_albums_xata_id_fk": { 382 + "name": "artist_albums_album_id_albums_xata_id_fk", 383 + "tableFrom": "artist_albums", 384 + "tableTo": "albums", 385 + "columnsFrom": [ 386 + "album_id" 387 + ], 388 + "columnsTo": [ 389 + "xata_id" 390 + ], 391 + "onDelete": "no action", 392 + "onUpdate": "no action" 393 + } 394 + }, 395 + "compositePrimaryKeys": {}, 396 + "uniqueConstraints": {}, 397 + "policies": {}, 398 + "checkConstraints": {}, 399 + "isRLSEnabled": false 400 + }, 401 + "public.artist_tracks": { 402 + "name": "artist_tracks", 403 + "schema": "", 404 + "columns": { 405 + "xata_id": { 406 + "name": "xata_id", 407 + "type": "text", 408 + "primaryKey": true, 409 + "notNull": true 410 + }, 411 + "artist_id": { 412 + "name": "artist_id", 413 + "type": "text", 414 + "primaryKey": false, 415 + "notNull": true 416 + }, 417 + "track_id": { 418 + "name": "track_id", 419 + "type": "text", 420 + "primaryKey": false, 421 + "notNull": true 422 + }, 423 + "xata_createdat": { 424 + "name": "xata_createdat", 425 + "type": "timestamp", 426 + "primaryKey": false, 427 + "notNull": true, 428 + "default": "now()" 429 + }, 430 + "xata_updatedat": { 431 + "name": "xata_updatedat", 432 + "type": "timestamp", 433 + "primaryKey": false, 434 + "notNull": true, 435 + "default": "now()" 436 + }, 437 + "xata_version": { 438 + "name": "xata_version", 439 + "type": "integer", 440 + "primaryKey": false, 441 + "notNull": false 442 + } 443 + }, 444 + "indexes": {}, 445 + "foreignKeys": { 446 + "artist_tracks_artist_id_artists_xata_id_fk": { 447 + "name": "artist_tracks_artist_id_artists_xata_id_fk", 448 + "tableFrom": "artist_tracks", 449 + "tableTo": "artists", 450 + "columnsFrom": [ 451 + "artist_id" 452 + ], 453 + "columnsTo": [ 454 + "xata_id" 455 + ], 456 + "onDelete": "no action", 457 + "onUpdate": "no action" 458 + }, 459 + "artist_tracks_track_id_tracks_xata_id_fk": { 460 + "name": "artist_tracks_track_id_tracks_xata_id_fk", 461 + "tableFrom": "artist_tracks", 462 + "tableTo": "tracks", 463 + "columnsFrom": [ 464 + "track_id" 465 + ], 466 + "columnsTo": [ 467 + "xata_id" 468 + ], 469 + "onDelete": "no action", 470 + "onUpdate": "no action" 471 + } 472 + }, 473 + "compositePrimaryKeys": {}, 474 + "uniqueConstraints": {}, 475 + "policies": {}, 476 + "checkConstraints": {}, 477 + "isRLSEnabled": false 478 + }, 479 + "public.artists": { 480 + "name": "artists", 481 + "schema": "", 482 + "columns": { 483 + "xata_id": { 484 + "name": "xata_id", 485 + "type": "text", 486 + "primaryKey": true, 487 + "notNull": true 488 + }, 489 + "name": { 490 + "name": "name", 491 + "type": "text", 492 + "primaryKey": false, 493 + "notNull": true 494 + }, 495 + "biography": { 496 + "name": "biography", 497 + "type": "text", 498 + "primaryKey": false, 499 + "notNull": false 500 + }, 501 + "born": { 502 + "name": "born", 503 + "type": "timestamp", 504 + "primaryKey": false, 505 + "notNull": false 506 + }, 507 + "born_in": { 508 + "name": "born_in", 509 + "type": "text", 510 + "primaryKey": false, 511 + "notNull": false 512 + }, 513 + "died": { 514 + "name": "died", 515 + "type": "timestamp", 516 + "primaryKey": false, 517 + "notNull": false 518 + }, 519 + "picture": { 520 + "name": "picture", 521 + "type": "text", 522 + "primaryKey": false, 523 + "notNull": false 524 + }, 525 + "sha256": { 526 + "name": "sha256", 527 + "type": "text", 528 + "primaryKey": false, 529 + "notNull": true 530 + }, 531 + "uri": { 532 + "name": "uri", 533 + "type": "text", 534 + "primaryKey": false, 535 + "notNull": false 536 + }, 537 + "apple_music_link": { 538 + "name": "apple_music_link", 539 + "type": "text", 540 + "primaryKey": false, 541 + "notNull": false 542 + }, 543 + "spotify_link": { 544 + "name": "spotify_link", 545 + "type": "text", 546 + "primaryKey": false, 547 + "notNull": false 548 + }, 549 + "tidal_link": { 550 + "name": "tidal_link", 551 + "type": "text", 552 + "primaryKey": false, 553 + "notNull": false 554 + }, 555 + "youtube_link": { 556 + "name": "youtube_link", 557 + "type": "text", 558 + "primaryKey": false, 559 + "notNull": false 560 + }, 561 + "genres": { 562 + "name": "genres", 563 + "type": "text[]", 564 + "primaryKey": false, 565 + "notNull": false 566 + }, 567 + "xata_createdat": { 568 + "name": "xata_createdat", 569 + "type": "timestamp", 570 + "primaryKey": false, 571 + "notNull": true, 572 + "default": "now()" 573 + }, 574 + "xata_updatedat": { 575 + "name": "xata_updatedat", 576 + "type": "timestamp", 577 + "primaryKey": false, 578 + "notNull": true, 579 + "default": "now()" 580 + }, 581 + "xata_version": { 582 + "name": "xata_version", 583 + "type": "integer", 584 + "primaryKey": false, 585 + "notNull": false 586 + } 587 + }, 588 + "indexes": {}, 589 + "foreignKeys": {}, 590 + "compositePrimaryKeys": {}, 591 + "uniqueConstraints": { 592 + "artists_sha256_unique": { 593 + "name": "artists_sha256_unique", 594 + "nullsNotDistinct": false, 595 + "columns": [ 596 + "sha256" 597 + ] 598 + }, 599 + "artists_uri_unique": { 600 + "name": "artists_uri_unique", 601 + "nullsNotDistinct": false, 602 + "columns": [ 603 + "uri" 604 + ] 605 + } 606 + }, 607 + "policies": {}, 608 + "checkConstraints": {}, 609 + "isRLSEnabled": false 610 + }, 611 + "public.dropbox_accounts": { 612 + "name": "dropbox_accounts", 613 + "schema": "", 614 + "columns": { 615 + "xata_id": { 616 + "name": "xata_id", 617 + "type": "text", 618 + "primaryKey": true, 619 + "notNull": true 620 + }, 621 + "email": { 622 + "name": "email", 623 + "type": "text", 624 + "primaryKey": false, 625 + "notNull": true 626 + }, 627 + "is_beta_user": { 628 + "name": "is_beta_user", 629 + "type": "boolean", 630 + "primaryKey": false, 631 + "notNull": true, 632 + "default": false 633 + }, 634 + "user_id": { 635 + "name": "user_id", 636 + "type": "text", 637 + "primaryKey": false, 638 + "notNull": true 639 + }, 640 + "xata_version": { 641 + "name": "xata_version", 642 + "type": "text", 643 + "primaryKey": false, 644 + "notNull": false 645 + }, 646 + "xata_createdat": { 647 + "name": "xata_createdat", 648 + "type": "timestamp", 649 + "primaryKey": false, 650 + "notNull": true, 651 + "default": "now()" 652 + }, 653 + "xata_updatedat": { 654 + "name": "xata_updatedat", 655 + "type": "timestamp", 656 + "primaryKey": false, 657 + "notNull": true, 658 + "default": "now()" 659 + } 660 + }, 661 + "indexes": {}, 662 + "foreignKeys": { 663 + "dropbox_accounts_user_id_users_xata_id_fk": { 664 + "name": "dropbox_accounts_user_id_users_xata_id_fk", 665 + "tableFrom": "dropbox_accounts", 666 + "tableTo": "users", 667 + "columnsFrom": [ 668 + "user_id" 669 + ], 670 + "columnsTo": [ 671 + "xata_id" 672 + ], 673 + "onDelete": "no action", 674 + "onUpdate": "no action" 675 + } 676 + }, 677 + "compositePrimaryKeys": {}, 678 + "uniqueConstraints": { 679 + "dropbox_accounts_email_unique": { 680 + "name": "dropbox_accounts_email_unique", 681 + "nullsNotDistinct": false, 682 + "columns": [ 683 + "email" 684 + ] 685 + } 686 + }, 687 + "policies": {}, 688 + "checkConstraints": {}, 689 + "isRLSEnabled": false 690 + }, 691 + "public.dropbox_directories": { 692 + "name": "dropbox_directories", 693 + "schema": "", 694 + "columns": { 695 + "xata_id": { 696 + "name": "xata_id", 697 + "type": "text", 698 + "primaryKey": true, 699 + "notNull": true 700 + }, 701 + "name": { 702 + "name": "name", 703 + "type": "text", 704 + "primaryKey": false, 705 + "notNull": true 706 + }, 707 + "path": { 708 + "name": "path", 709 + "type": "text", 710 + "primaryKey": false, 711 + "notNull": true 712 + }, 713 + "parent_id": { 714 + "name": "parent_id", 715 + "type": "text", 716 + "primaryKey": false, 717 + "notNull": false 718 + }, 719 + "dropbox_id": { 720 + "name": "dropbox_id", 721 + "type": "text", 722 + "primaryKey": false, 723 + "notNull": true 724 + }, 725 + "file_id": { 726 + "name": "file_id", 727 + "type": "text", 728 + "primaryKey": false, 729 + "notNull": true 730 + }, 731 + "xata_version": { 732 + "name": "xata_version", 733 + "type": "text", 734 + "primaryKey": false, 735 + "notNull": false 736 + }, 737 + "xata_createdat": { 738 + "name": "xata_createdat", 739 + "type": "timestamp", 740 + "primaryKey": false, 741 + "notNull": true, 742 + "default": "now()" 743 + }, 744 + "xata_updatedat": { 745 + "name": "xata_updatedat", 746 + "type": "timestamp", 747 + "primaryKey": false, 748 + "notNull": true, 749 + "default": "now()" 750 + } 751 + }, 752 + "indexes": {}, 753 + "foreignKeys": { 754 + "dropbox_directories_parent_id_dropbox_directories_xata_id_fk": { 755 + "name": "dropbox_directories_parent_id_dropbox_directories_xata_id_fk", 756 + "tableFrom": "dropbox_directories", 757 + "tableTo": "dropbox_directories", 758 + "columnsFrom": [ 759 + "parent_id" 760 + ], 761 + "columnsTo": [ 762 + "xata_id" 763 + ], 764 + "onDelete": "no action", 765 + "onUpdate": "no action" 766 + } 767 + }, 768 + "compositePrimaryKeys": {}, 769 + "uniqueConstraints": { 770 + "dropbox_directories_file_id_unique": { 771 + "name": "dropbox_directories_file_id_unique", 772 + "nullsNotDistinct": false, 773 + "columns": [ 774 + "file_id" 775 + ] 776 + } 777 + }, 778 + "policies": {}, 779 + "checkConstraints": {}, 780 + "isRLSEnabled": false 781 + }, 782 + "public.dropbox_paths": { 783 + "name": "dropbox_paths", 784 + "schema": "", 785 + "columns": { 786 + "xata_id": { 787 + "name": "xata_id", 788 + "type": "text", 789 + "primaryKey": true, 790 + "notNull": true 791 + }, 792 + "path": { 793 + "name": "path", 794 + "type": "text", 795 + "primaryKey": false, 796 + "notNull": true 797 + }, 798 + "name": { 799 + "name": "name", 800 + "type": "text", 801 + "primaryKey": false, 802 + "notNull": true 803 + }, 804 + "dropbox_id": { 805 + "name": "dropbox_id", 806 + "type": "text", 807 + "primaryKey": false, 808 + "notNull": true 809 + }, 810 + "track_id": { 811 + "name": "track_id", 812 + "type": "text", 813 + "primaryKey": false, 814 + "notNull": true 815 + }, 816 + "directory_id": { 817 + "name": "directory_id", 818 + "type": "text", 819 + "primaryKey": false, 820 + "notNull": false 821 + }, 822 + "file_id": { 823 + "name": "file_id", 824 + "type": "text", 825 + "primaryKey": false, 826 + "notNull": true 827 + }, 828 + "xata_version": { 829 + "name": "xata_version", 830 + "type": "text", 831 + "primaryKey": false, 832 + "notNull": false 833 + }, 834 + "xata_createdat": { 835 + "name": "xata_createdat", 836 + "type": "timestamp", 837 + "primaryKey": false, 838 + "notNull": true, 839 + "default": "now()" 840 + }, 841 + "xata_updatedat": { 842 + "name": "xata_updatedat", 843 + "type": "timestamp", 844 + "primaryKey": false, 845 + "notNull": true, 846 + "default": "now()" 847 + } 848 + }, 849 + "indexes": {}, 850 + "foreignKeys": { 851 + "dropbox_paths_directory_id_dropbox_directories_xata_id_fk": { 852 + "name": "dropbox_paths_directory_id_dropbox_directories_xata_id_fk", 853 + "tableFrom": "dropbox_paths", 854 + "tableTo": "dropbox_directories", 855 + "columnsFrom": [ 856 + "directory_id" 857 + ], 858 + "columnsTo": [ 859 + "xata_id" 860 + ], 861 + "onDelete": "no action", 862 + "onUpdate": "no action" 863 + } 864 + }, 865 + "compositePrimaryKeys": {}, 866 + "uniqueConstraints": { 867 + "dropbox_paths_file_id_unique": { 868 + "name": "dropbox_paths_file_id_unique", 869 + "nullsNotDistinct": false, 870 + "columns": [ 871 + "file_id" 872 + ] 873 + } 874 + }, 875 + "policies": {}, 876 + "checkConstraints": {}, 877 + "isRLSEnabled": false 878 + }, 879 + "public.dropbox_tokens": { 880 + "name": "dropbox_tokens", 881 + "schema": "", 882 + "columns": { 883 + "xata_id": { 884 + "name": "xata_id", 885 + "type": "text", 886 + "primaryKey": true, 887 + "notNull": true 888 + }, 889 + "refresh_token": { 890 + "name": "refresh_token", 891 + "type": "text", 892 + "primaryKey": false, 893 + "notNull": true 894 + }, 895 + "xata_createdat": { 896 + "name": "xata_createdat", 897 + "type": "timestamp", 898 + "primaryKey": false, 899 + "notNull": true, 900 + "default": "now()" 901 + }, 902 + "xata_updatedat": { 903 + "name": "xata_updatedat", 904 + "type": "timestamp", 905 + "primaryKey": false, 906 + "notNull": true, 907 + "default": "now()" 908 + } 909 + }, 910 + "indexes": {}, 911 + "foreignKeys": {}, 912 + "compositePrimaryKeys": {}, 913 + "uniqueConstraints": {}, 914 + "policies": {}, 915 + "checkConstraints": {}, 916 + "isRLSEnabled": false 917 + }, 918 + "public.dropbox": { 919 + "name": "dropbox", 920 + "schema": "", 921 + "columns": { 922 + "xata_id": { 923 + "name": "xata_id", 924 + "type": "text", 925 + "primaryKey": true, 926 + "notNull": true 927 + }, 928 + "user_id": { 929 + "name": "user_id", 930 + "type": "text", 931 + "primaryKey": false, 932 + "notNull": true 933 + }, 934 + "dropbox_token_id": { 935 + "name": "dropbox_token_id", 936 + "type": "text", 937 + "primaryKey": false, 938 + "notNull": true 939 + }, 940 + "xata_version": { 941 + "name": "xata_version", 942 + "type": "text", 943 + "primaryKey": false, 944 + "notNull": false 945 + }, 946 + "xata_createdat": { 947 + "name": "xata_createdat", 948 + "type": "timestamp", 949 + "primaryKey": false, 950 + "notNull": true, 951 + "default": "now()" 952 + }, 953 + "xata_updatedat": { 954 + "name": "xata_updatedat", 955 + "type": "timestamp", 956 + "primaryKey": false, 957 + "notNull": true, 958 + "default": "now()" 959 + } 960 + }, 961 + "indexes": {}, 962 + "foreignKeys": { 963 + "dropbox_user_id_users_xata_id_fk": { 964 + "name": "dropbox_user_id_users_xata_id_fk", 965 + "tableFrom": "dropbox", 966 + "tableTo": "users", 967 + "columnsFrom": [ 968 + "user_id" 969 + ], 970 + "columnsTo": [ 971 + "xata_id" 972 + ], 973 + "onDelete": "no action", 974 + "onUpdate": "no action" 975 + }, 976 + "dropbox_dropbox_token_id_dropbox_tokens_xata_id_fk": { 977 + "name": "dropbox_dropbox_token_id_dropbox_tokens_xata_id_fk", 978 + "tableFrom": "dropbox", 979 + "tableTo": "dropbox_tokens", 980 + "columnsFrom": [ 981 + "dropbox_token_id" 982 + ], 983 + "columnsTo": [ 984 + "xata_id" 985 + ], 986 + "onDelete": "no action", 987 + "onUpdate": "no action" 988 + } 989 + }, 990 + "compositePrimaryKeys": {}, 991 + "uniqueConstraints": {}, 992 + "policies": {}, 993 + "checkConstraints": {}, 994 + "isRLSEnabled": false 995 + }, 996 + "public.google_drive_accounts": { 997 + "name": "google_drive_accounts", 998 + "schema": "", 999 + "columns": { 1000 + "xata_id": { 1001 + "name": "xata_id", 1002 + "type": "text", 1003 + "primaryKey": true, 1004 + "notNull": true 1005 + }, 1006 + "email": { 1007 + "name": "email", 1008 + "type": "text", 1009 + "primaryKey": false, 1010 + "notNull": true 1011 + }, 1012 + "is_beta_user": { 1013 + "name": "is_beta_user", 1014 + "type": "boolean", 1015 + "primaryKey": false, 1016 + "notNull": true, 1017 + "default": false 1018 + }, 1019 + "user_id": { 1020 + "name": "user_id", 1021 + "type": "text", 1022 + "primaryKey": false, 1023 + "notNull": true 1024 + }, 1025 + "xata_version": { 1026 + "name": "xata_version", 1027 + "type": "text", 1028 + "primaryKey": false, 1029 + "notNull": false 1030 + }, 1031 + "xata_createdat": { 1032 + "name": "xata_createdat", 1033 + "type": "timestamp", 1034 + "primaryKey": false, 1035 + "notNull": true, 1036 + "default": "now()" 1037 + }, 1038 + "xata_updatedat": { 1039 + "name": "xata_updatedat", 1040 + "type": "timestamp", 1041 + "primaryKey": false, 1042 + "notNull": true, 1043 + "default": "now()" 1044 + } 1045 + }, 1046 + "indexes": {}, 1047 + "foreignKeys": { 1048 + "google_drive_accounts_user_id_users_xata_id_fk": { 1049 + "name": "google_drive_accounts_user_id_users_xata_id_fk", 1050 + "tableFrom": "google_drive_accounts", 1051 + "tableTo": "users", 1052 + "columnsFrom": [ 1053 + "user_id" 1054 + ], 1055 + "columnsTo": [ 1056 + "xata_id" 1057 + ], 1058 + "onDelete": "no action", 1059 + "onUpdate": "no action" 1060 + } 1061 + }, 1062 + "compositePrimaryKeys": {}, 1063 + "uniqueConstraints": { 1064 + "google_drive_accounts_email_unique": { 1065 + "name": "google_drive_accounts_email_unique", 1066 + "nullsNotDistinct": false, 1067 + "columns": [ 1068 + "email" 1069 + ] 1070 + } 1071 + }, 1072 + "policies": {}, 1073 + "checkConstraints": {}, 1074 + "isRLSEnabled": false 1075 + }, 1076 + "public.google_drive_directories": { 1077 + "name": "google_drive_directories", 1078 + "schema": "", 1079 + "columns": { 1080 + "xata_id": { 1081 + "name": "xata_id", 1082 + "type": "text", 1083 + "primaryKey": true, 1084 + "notNull": true 1085 + }, 1086 + "name": { 1087 + "name": "name", 1088 + "type": "text", 1089 + "primaryKey": false, 1090 + "notNull": true 1091 + }, 1092 + "path": { 1093 + "name": "path", 1094 + "type": "text", 1095 + "primaryKey": false, 1096 + "notNull": true 1097 + }, 1098 + "parent_id": { 1099 + "name": "parent_id", 1100 + "type": "text", 1101 + "primaryKey": false, 1102 + "notNull": false 1103 + }, 1104 + "google_drive_id": { 1105 + "name": "google_drive_id", 1106 + "type": "text", 1107 + "primaryKey": false, 1108 + "notNull": true 1109 + }, 1110 + "file_id": { 1111 + "name": "file_id", 1112 + "type": "text", 1113 + "primaryKey": false, 1114 + "notNull": true 1115 + }, 1116 + "xata_version": { 1117 + "name": "xata_version", 1118 + "type": "text", 1119 + "primaryKey": false, 1120 + "notNull": false 1121 + }, 1122 + "xata_createdat": { 1123 + "name": "xata_createdat", 1124 + "type": "timestamp", 1125 + "primaryKey": false, 1126 + "notNull": true, 1127 + "default": "now()" 1128 + }, 1129 + "xata_updatedat": { 1130 + "name": "xata_updatedat", 1131 + "type": "timestamp", 1132 + "primaryKey": false, 1133 + "notNull": true, 1134 + "default": "now()" 1135 + } 1136 + }, 1137 + "indexes": {}, 1138 + "foreignKeys": { 1139 + "google_drive_directories_parent_id_google_drive_directories_xata_id_fk": { 1140 + "name": "google_drive_directories_parent_id_google_drive_directories_xata_id_fk", 1141 + "tableFrom": "google_drive_directories", 1142 + "tableTo": "google_drive_directories", 1143 + "columnsFrom": [ 1144 + "parent_id" 1145 + ], 1146 + "columnsTo": [ 1147 + "xata_id" 1148 + ], 1149 + "onDelete": "no action", 1150 + "onUpdate": "no action" 1151 + } 1152 + }, 1153 + "compositePrimaryKeys": {}, 1154 + "uniqueConstraints": { 1155 + "google_drive_directories_file_id_unique": { 1156 + "name": "google_drive_directories_file_id_unique", 1157 + "nullsNotDistinct": false, 1158 + "columns": [ 1159 + "file_id" 1160 + ] 1161 + } 1162 + }, 1163 + "policies": {}, 1164 + "checkConstraints": {}, 1165 + "isRLSEnabled": false 1166 + }, 1167 + "public.google_drive_paths": { 1168 + "name": "google_drive_paths", 1169 + "schema": "", 1170 + "columns": { 1171 + "xata_id": { 1172 + "name": "xata_id", 1173 + "type": "text", 1174 + "primaryKey": true, 1175 + "notNull": true 1176 + }, 1177 + "google_drive_id": { 1178 + "name": "google_drive_id", 1179 + "type": "text", 1180 + "primaryKey": false, 1181 + "notNull": true 1182 + }, 1183 + "track_id": { 1184 + "name": "track_id", 1185 + "type": "text", 1186 + "primaryKey": false, 1187 + "notNull": true 1188 + }, 1189 + "name": { 1190 + "name": "name", 1191 + "type": "text", 1192 + "primaryKey": false, 1193 + "notNull": true 1194 + }, 1195 + "directory_id": { 1196 + "name": "directory_id", 1197 + "type": "text", 1198 + "primaryKey": false, 1199 + "notNull": false 1200 + }, 1201 + "file_id": { 1202 + "name": "file_id", 1203 + "type": "text", 1204 + "primaryKey": false, 1205 + "notNull": true 1206 + }, 1207 + "xata_version": { 1208 + "name": "xata_version", 1209 + "type": "text", 1210 + "primaryKey": false, 1211 + "notNull": false 1212 + }, 1213 + "xata_createdat": { 1214 + "name": "xata_createdat", 1215 + "type": "timestamp", 1216 + "primaryKey": false, 1217 + "notNull": true, 1218 + "default": "now()" 1219 + }, 1220 + "xata_updatedat": { 1221 + "name": "xata_updatedat", 1222 + "type": "timestamp", 1223 + "primaryKey": false, 1224 + "notNull": true, 1225 + "default": "now()" 1226 + } 1227 + }, 1228 + "indexes": {}, 1229 + "foreignKeys": { 1230 + "google_drive_paths_directory_id_google_drive_directories_xata_id_fk": { 1231 + "name": "google_drive_paths_directory_id_google_drive_directories_xata_id_fk", 1232 + "tableFrom": "google_drive_paths", 1233 + "tableTo": "google_drive_directories", 1234 + "columnsFrom": [ 1235 + "directory_id" 1236 + ], 1237 + "columnsTo": [ 1238 + "xata_id" 1239 + ], 1240 + "onDelete": "no action", 1241 + "onUpdate": "no action" 1242 + } 1243 + }, 1244 + "compositePrimaryKeys": {}, 1245 + "uniqueConstraints": { 1246 + "google_drive_paths_file_id_unique": { 1247 + "name": "google_drive_paths_file_id_unique", 1248 + "nullsNotDistinct": false, 1249 + "columns": [ 1250 + "file_id" 1251 + ] 1252 + } 1253 + }, 1254 + "policies": {}, 1255 + "checkConstraints": {}, 1256 + "isRLSEnabled": false 1257 + }, 1258 + "public.google_drive_tokens": { 1259 + "name": "google_drive_tokens", 1260 + "schema": "", 1261 + "columns": { 1262 + "xata_id": { 1263 + "name": "xata_id", 1264 + "type": "text", 1265 + "primaryKey": true, 1266 + "notNull": true 1267 + }, 1268 + "refresh_token": { 1269 + "name": "refresh_token", 1270 + "type": "text", 1271 + "primaryKey": false, 1272 + "notNull": true 1273 + }, 1274 + "xata_createdat": { 1275 + "name": "xata_createdat", 1276 + "type": "timestamp", 1277 + "primaryKey": false, 1278 + "notNull": true, 1279 + "default": "now()" 1280 + }, 1281 + "xata_updatedat": { 1282 + "name": "xata_updatedat", 1283 + "type": "timestamp", 1284 + "primaryKey": false, 1285 + "notNull": true, 1286 + "default": "now()" 1287 + } 1288 + }, 1289 + "indexes": {}, 1290 + "foreignKeys": {}, 1291 + "compositePrimaryKeys": {}, 1292 + "uniqueConstraints": {}, 1293 + "policies": {}, 1294 + "checkConstraints": {}, 1295 + "isRLSEnabled": false 1296 + }, 1297 + "public.google_drive": { 1298 + "name": "google_drive", 1299 + "schema": "", 1300 + "columns": { 1301 + "xata_id": { 1302 + "name": "xata_id", 1303 + "type": "text", 1304 + "primaryKey": true, 1305 + "notNull": true 1306 + }, 1307 + "google_drive_token_id": { 1308 + "name": "google_drive_token_id", 1309 + "type": "text", 1310 + "primaryKey": false, 1311 + "notNull": true 1312 + }, 1313 + "user_id": { 1314 + "name": "user_id", 1315 + "type": "text", 1316 + "primaryKey": false, 1317 + "notNull": true 1318 + }, 1319 + "xata_version": { 1320 + "name": "xata_version", 1321 + "type": "text", 1322 + "primaryKey": false, 1323 + "notNull": false 1324 + }, 1325 + "xata_createdat": { 1326 + "name": "xata_createdat", 1327 + "type": "timestamp", 1328 + "primaryKey": false, 1329 + "notNull": true, 1330 + "default": "now()" 1331 + }, 1332 + "xata_updatedat": { 1333 + "name": "xata_updatedat", 1334 + "type": "timestamp", 1335 + "primaryKey": false, 1336 + "notNull": true, 1337 + "default": "now()" 1338 + } 1339 + }, 1340 + "indexes": {}, 1341 + "foreignKeys": { 1342 + "google_drive_google_drive_token_id_google_drive_tokens_xata_id_fk": { 1343 + "name": "google_drive_google_drive_token_id_google_drive_tokens_xata_id_fk", 1344 + "tableFrom": "google_drive", 1345 + "tableTo": "google_drive_tokens", 1346 + "columnsFrom": [ 1347 + "google_drive_token_id" 1348 + ], 1349 + "columnsTo": [ 1350 + "xata_id" 1351 + ], 1352 + "onDelete": "no action", 1353 + "onUpdate": "no action" 1354 + }, 1355 + "google_drive_user_id_users_xata_id_fk": { 1356 + "name": "google_drive_user_id_users_xata_id_fk", 1357 + "tableFrom": "google_drive", 1358 + "tableTo": "users", 1359 + "columnsFrom": [ 1360 + "user_id" 1361 + ], 1362 + "columnsTo": [ 1363 + "xata_id" 1364 + ], 1365 + "onDelete": "no action", 1366 + "onUpdate": "no action" 1367 + } 1368 + }, 1369 + "compositePrimaryKeys": {}, 1370 + "uniqueConstraints": {}, 1371 + "policies": {}, 1372 + "checkConstraints": {}, 1373 + "isRLSEnabled": false 1374 + }, 1375 + "public.loved_tracks": { 1376 + "name": "loved_tracks", 1377 + "schema": "", 1378 + "columns": { 1379 + "xata_id": { 1380 + "name": "xata_id", 1381 + "type": "text", 1382 + "primaryKey": true, 1383 + "notNull": true 1384 + }, 1385 + "user_id": { 1386 + "name": "user_id", 1387 + "type": "text", 1388 + "primaryKey": false, 1389 + "notNull": true 1390 + }, 1391 + "track_id": { 1392 + "name": "track_id", 1393 + "type": "text", 1394 + "primaryKey": false, 1395 + "notNull": true 1396 + }, 1397 + "uri": { 1398 + "name": "uri", 1399 + "type": "text", 1400 + "primaryKey": false, 1401 + "notNull": false 1402 + }, 1403 + "xata_createdat": { 1404 + "name": "xata_createdat", 1405 + "type": "timestamp", 1406 + "primaryKey": false, 1407 + "notNull": true, 1408 + "default": "now()" 1409 + } 1410 + }, 1411 + "indexes": {}, 1412 + "foreignKeys": { 1413 + "loved_tracks_user_id_users_xata_id_fk": { 1414 + "name": "loved_tracks_user_id_users_xata_id_fk", 1415 + "tableFrom": "loved_tracks", 1416 + "tableTo": "users", 1417 + "columnsFrom": [ 1418 + "user_id" 1419 + ], 1420 + "columnsTo": [ 1421 + "xata_id" 1422 + ], 1423 + "onDelete": "no action", 1424 + "onUpdate": "no action" 1425 + }, 1426 + "loved_tracks_track_id_tracks_xata_id_fk": { 1427 + "name": "loved_tracks_track_id_tracks_xata_id_fk", 1428 + "tableFrom": "loved_tracks", 1429 + "tableTo": "tracks", 1430 + "columnsFrom": [ 1431 + "track_id" 1432 + ], 1433 + "columnsTo": [ 1434 + "xata_id" 1435 + ], 1436 + "onDelete": "no action", 1437 + "onUpdate": "no action" 1438 + } 1439 + }, 1440 + "compositePrimaryKeys": {}, 1441 + "uniqueConstraints": { 1442 + "loved_tracks_uri_unique": { 1443 + "name": "loved_tracks_uri_unique", 1444 + "nullsNotDistinct": false, 1445 + "columns": [ 1446 + "uri" 1447 + ] 1448 + } 1449 + }, 1450 + "policies": {}, 1451 + "checkConstraints": {}, 1452 + "isRLSEnabled": false 1453 + }, 1454 + "public.playlist_tracks": { 1455 + "name": "playlist_tracks", 1456 + "schema": "", 1457 + "columns": { 1458 + "xata_id": { 1459 + "name": "xata_id", 1460 + "type": "text", 1461 + "primaryKey": true, 1462 + "notNull": true 1463 + }, 1464 + "playlist_id": { 1465 + "name": "playlist_id", 1466 + "type": "text", 1467 + "primaryKey": false, 1468 + "notNull": true 1469 + }, 1470 + "track_id": { 1471 + "name": "track_id", 1472 + "type": "text", 1473 + "primaryKey": false, 1474 + "notNull": true 1475 + }, 1476 + "xata_createdat": { 1477 + "name": "xata_createdat", 1478 + "type": "timestamp", 1479 + "primaryKey": false, 1480 + "notNull": true, 1481 + "default": "now()" 1482 + } 1483 + }, 1484 + "indexes": {}, 1485 + "foreignKeys": { 1486 + "playlist_tracks_playlist_id_playlists_xata_id_fk": { 1487 + "name": "playlist_tracks_playlist_id_playlists_xata_id_fk", 1488 + "tableFrom": "playlist_tracks", 1489 + "tableTo": "playlists", 1490 + "columnsFrom": [ 1491 + "playlist_id" 1492 + ], 1493 + "columnsTo": [ 1494 + "xata_id" 1495 + ], 1496 + "onDelete": "no action", 1497 + "onUpdate": "no action" 1498 + }, 1499 + "playlist_tracks_track_id_tracks_xata_id_fk": { 1500 + "name": "playlist_tracks_track_id_tracks_xata_id_fk", 1501 + "tableFrom": "playlist_tracks", 1502 + "tableTo": "tracks", 1503 + "columnsFrom": [ 1504 + "track_id" 1505 + ], 1506 + "columnsTo": [ 1507 + "xata_id" 1508 + ], 1509 + "onDelete": "no action", 1510 + "onUpdate": "no action" 1511 + } 1512 + }, 1513 + "compositePrimaryKeys": {}, 1514 + "uniqueConstraints": {}, 1515 + "policies": {}, 1516 + "checkConstraints": {}, 1517 + "isRLSEnabled": false 1518 + }, 1519 + "public.playlists": { 1520 + "name": "playlists", 1521 + "schema": "", 1522 + "columns": { 1523 + "xata_id": { 1524 + "name": "xata_id", 1525 + "type": "text", 1526 + "primaryKey": true, 1527 + "notNull": true 1528 + }, 1529 + "name": { 1530 + "name": "name", 1531 + "type": "text", 1532 + "primaryKey": false, 1533 + "notNull": true 1534 + }, 1535 + "picture": { 1536 + "name": "picture", 1537 + "type": "text", 1538 + "primaryKey": false, 1539 + "notNull": false 1540 + }, 1541 + "description": { 1542 + "name": "description", 1543 + "type": "text", 1544 + "primaryKey": false, 1545 + "notNull": false 1546 + }, 1547 + "uri": { 1548 + "name": "uri", 1549 + "type": "text", 1550 + "primaryKey": false, 1551 + "notNull": false 1552 + }, 1553 + "spotify_link": { 1554 + "name": "spotify_link", 1555 + "type": "text", 1556 + "primaryKey": false, 1557 + "notNull": false 1558 + }, 1559 + "tidal_link": { 1560 + "name": "tidal_link", 1561 + "type": "text", 1562 + "primaryKey": false, 1563 + "notNull": false 1564 + }, 1565 + "apple_music_link": { 1566 + "name": "apple_music_link", 1567 + "type": "text", 1568 + "primaryKey": false, 1569 + "notNull": false 1570 + }, 1571 + "created_by": { 1572 + "name": "created_by", 1573 + "type": "text", 1574 + "primaryKey": false, 1575 + "notNull": true 1576 + }, 1577 + "xata_createdat": { 1578 + "name": "xata_createdat", 1579 + "type": "timestamp", 1580 + "primaryKey": false, 1581 + "notNull": true, 1582 + "default": "now()" 1583 + }, 1584 + "xata_updatedat": { 1585 + "name": "xata_updatedat", 1586 + "type": "timestamp", 1587 + "primaryKey": false, 1588 + "notNull": true, 1589 + "default": "now()" 1590 + } 1591 + }, 1592 + "indexes": {}, 1593 + "foreignKeys": { 1594 + "playlists_created_by_users_xata_id_fk": { 1595 + "name": "playlists_created_by_users_xata_id_fk", 1596 + "tableFrom": "playlists", 1597 + "tableTo": "users", 1598 + "columnsFrom": [ 1599 + "created_by" 1600 + ], 1601 + "columnsTo": [ 1602 + "xata_id" 1603 + ], 1604 + "onDelete": "no action", 1605 + "onUpdate": "no action" 1606 + } 1607 + }, 1608 + "compositePrimaryKeys": {}, 1609 + "uniqueConstraints": { 1610 + "playlists_uri_unique": { 1611 + "name": "playlists_uri_unique", 1612 + "nullsNotDistinct": false, 1613 + "columns": [ 1614 + "uri" 1615 + ] 1616 + } 1617 + }, 1618 + "policies": {}, 1619 + "checkConstraints": {}, 1620 + "isRLSEnabled": false 1621 + }, 1622 + "public.profile_shouts": { 1623 + "name": "profile_shouts", 1624 + "schema": "", 1625 + "columns": { 1626 + "xata_id": { 1627 + "name": "xata_id", 1628 + "type": "text", 1629 + "primaryKey": true, 1630 + "notNull": true 1631 + }, 1632 + "user_id": { 1633 + "name": "user_id", 1634 + "type": "text", 1635 + "primaryKey": false, 1636 + "notNull": true 1637 + }, 1638 + "shout_id": { 1639 + "name": "shout_id", 1640 + "type": "text", 1641 + "primaryKey": false, 1642 + "notNull": true 1643 + }, 1644 + "xata_createdat": { 1645 + "name": "xata_createdat", 1646 + "type": "timestamp", 1647 + "primaryKey": false, 1648 + "notNull": true, 1649 + "default": "now()" 1650 + } 1651 + }, 1652 + "indexes": {}, 1653 + "foreignKeys": { 1654 + "profile_shouts_user_id_users_xata_id_fk": { 1655 + "name": "profile_shouts_user_id_users_xata_id_fk", 1656 + "tableFrom": "profile_shouts", 1657 + "tableTo": "users", 1658 + "columnsFrom": [ 1659 + "user_id" 1660 + ], 1661 + "columnsTo": [ 1662 + "xata_id" 1663 + ], 1664 + "onDelete": "no action", 1665 + "onUpdate": "no action" 1666 + }, 1667 + "profile_shouts_shout_id_shouts_xata_id_fk": { 1668 + "name": "profile_shouts_shout_id_shouts_xata_id_fk", 1669 + "tableFrom": "profile_shouts", 1670 + "tableTo": "shouts", 1671 + "columnsFrom": [ 1672 + "shout_id" 1673 + ], 1674 + "columnsTo": [ 1675 + "xata_id" 1676 + ], 1677 + "onDelete": "no action", 1678 + "onUpdate": "no action" 1679 + } 1680 + }, 1681 + "compositePrimaryKeys": {}, 1682 + "uniqueConstraints": {}, 1683 + "policies": {}, 1684 + "checkConstraints": {}, 1685 + "isRLSEnabled": false 1686 + }, 1687 + "public.queue_tracks": { 1688 + "name": "queue_tracks", 1689 + "schema": "", 1690 + "columns": { 1691 + "xata_id": { 1692 + "name": "xata_id", 1693 + "type": "text", 1694 + "primaryKey": true, 1695 + "notNull": true 1696 + }, 1697 + "user_id": { 1698 + "name": "user_id", 1699 + "type": "text", 1700 + "primaryKey": false, 1701 + "notNull": true 1702 + }, 1703 + "track_id": { 1704 + "name": "track_id", 1705 + "type": "text", 1706 + "primaryKey": false, 1707 + "notNull": true 1708 + }, 1709 + "position": { 1710 + "name": "position", 1711 + "type": "integer", 1712 + "primaryKey": false, 1713 + "notNull": true 1714 + }, 1715 + "file_uri": { 1716 + "name": "file_uri", 1717 + "type": "text", 1718 + "primaryKey": false, 1719 + "notNull": true 1720 + }, 1721 + "xata_version": { 1722 + "name": "xata_version", 1723 + "type": "integer", 1724 + "primaryKey": false, 1725 + "notNull": true, 1726 + "default": 0 1727 + }, 1728 + "xata_createdat": { 1729 + "name": "xata_createdat", 1730 + "type": "timestamp", 1731 + "primaryKey": false, 1732 + "notNull": true, 1733 + "default": "now()" 1734 + }, 1735 + "xata_updatedat": { 1736 + "name": "xata_updatedat", 1737 + "type": "timestamp", 1738 + "primaryKey": false, 1739 + "notNull": true, 1740 + "default": "now()" 1741 + } 1742 + }, 1743 + "indexes": {}, 1744 + "foreignKeys": { 1745 + "queue_tracks_user_id_users_xata_id_fk": { 1746 + "name": "queue_tracks_user_id_users_xata_id_fk", 1747 + "tableFrom": "queue_tracks", 1748 + "tableTo": "users", 1749 + "columnsFrom": [ 1750 + "user_id" 1751 + ], 1752 + "columnsTo": [ 1753 + "xata_id" 1754 + ], 1755 + "onDelete": "no action", 1756 + "onUpdate": "no action" 1757 + }, 1758 + "queue_tracks_track_id_tracks_xata_id_fk": { 1759 + "name": "queue_tracks_track_id_tracks_xata_id_fk", 1760 + "tableFrom": "queue_tracks", 1761 + "tableTo": "tracks", 1762 + "columnsFrom": [ 1763 + "track_id" 1764 + ], 1765 + "columnsTo": [ 1766 + "xata_id" 1767 + ], 1768 + "onDelete": "no action", 1769 + "onUpdate": "no action" 1770 + } 1771 + }, 1772 + "compositePrimaryKeys": {}, 1773 + "uniqueConstraints": {}, 1774 + "policies": {}, 1775 + "checkConstraints": {}, 1776 + "isRLSEnabled": false 1777 + }, 1778 + "public.scrobbles": { 1779 + "name": "scrobbles", 1780 + "schema": "", 1781 + "columns": { 1782 + "xata_id": { 1783 + "name": "xata_id", 1784 + "type": "text", 1785 + "primaryKey": true, 1786 + "notNull": true 1787 + }, 1788 + "user_id": { 1789 + "name": "user_id", 1790 + "type": "text", 1791 + "primaryKey": false, 1792 + "notNull": false 1793 + }, 1794 + "track_id": { 1795 + "name": "track_id", 1796 + "type": "text", 1797 + "primaryKey": false, 1798 + "notNull": false 1799 + }, 1800 + "album_id": { 1801 + "name": "album_id", 1802 + "type": "text", 1803 + "primaryKey": false, 1804 + "notNull": false 1805 + }, 1806 + "artist_id": { 1807 + "name": "artist_id", 1808 + "type": "text", 1809 + "primaryKey": false, 1810 + "notNull": false 1811 + }, 1812 + "uri": { 1813 + "name": "uri", 1814 + "type": "text", 1815 + "primaryKey": false, 1816 + "notNull": false 1817 + }, 1818 + "xata_createdat": { 1819 + "name": "xata_createdat", 1820 + "type": "timestamp", 1821 + "primaryKey": false, 1822 + "notNull": true, 1823 + "default": "now()" 1824 + }, 1825 + "xata_updatedat": { 1826 + "name": "xata_updatedat", 1827 + "type": "timestamp", 1828 + "primaryKey": false, 1829 + "notNull": true, 1830 + "default": "now()" 1831 + }, 1832 + "xata_version": { 1833 + "name": "xata_version", 1834 + "type": "integer", 1835 + "primaryKey": false, 1836 + "notNull": false 1837 + }, 1838 + "timestamp": { 1839 + "name": "timestamp", 1840 + "type": "timestamp", 1841 + "primaryKey": false, 1842 + "notNull": true, 1843 + "default": "now()" 1844 + } 1845 + }, 1846 + "indexes": {}, 1847 + "foreignKeys": { 1848 + "scrobbles_user_id_users_xata_id_fk": { 1849 + "name": "scrobbles_user_id_users_xata_id_fk", 1850 + "tableFrom": "scrobbles", 1851 + "tableTo": "users", 1852 + "columnsFrom": [ 1853 + "user_id" 1854 + ], 1855 + "columnsTo": [ 1856 + "xata_id" 1857 + ], 1858 + "onDelete": "no action", 1859 + "onUpdate": "no action" 1860 + }, 1861 + "scrobbles_track_id_tracks_xata_id_fk": { 1862 + "name": "scrobbles_track_id_tracks_xata_id_fk", 1863 + "tableFrom": "scrobbles", 1864 + "tableTo": "tracks", 1865 + "columnsFrom": [ 1866 + "track_id" 1867 + ], 1868 + "columnsTo": [ 1869 + "xata_id" 1870 + ], 1871 + "onDelete": "no action", 1872 + "onUpdate": "no action" 1873 + }, 1874 + "scrobbles_album_id_albums_xata_id_fk": { 1875 + "name": "scrobbles_album_id_albums_xata_id_fk", 1876 + "tableFrom": "scrobbles", 1877 + "tableTo": "albums", 1878 + "columnsFrom": [ 1879 + "album_id" 1880 + ], 1881 + "columnsTo": [ 1882 + "xata_id" 1883 + ], 1884 + "onDelete": "no action", 1885 + "onUpdate": "no action" 1886 + }, 1887 + "scrobbles_artist_id_artists_xata_id_fk": { 1888 + "name": "scrobbles_artist_id_artists_xata_id_fk", 1889 + "tableFrom": "scrobbles", 1890 + "tableTo": "artists", 1891 + "columnsFrom": [ 1892 + "artist_id" 1893 + ], 1894 + "columnsTo": [ 1895 + "xata_id" 1896 + ], 1897 + "onDelete": "no action", 1898 + "onUpdate": "no action" 1899 + } 1900 + }, 1901 + "compositePrimaryKeys": {}, 1902 + "uniqueConstraints": { 1903 + "scrobbles_uri_unique": { 1904 + "name": "scrobbles_uri_unique", 1905 + "nullsNotDistinct": false, 1906 + "columns": [ 1907 + "uri" 1908 + ] 1909 + } 1910 + }, 1911 + "policies": {}, 1912 + "checkConstraints": {}, 1913 + "isRLSEnabled": false 1914 + }, 1915 + "public.shout_likes": { 1916 + "name": "shout_likes", 1917 + "schema": "", 1918 + "columns": { 1919 + "xata_id": { 1920 + "name": "xata_id", 1921 + "type": "text", 1922 + "primaryKey": true, 1923 + "notNull": true 1924 + }, 1925 + "user_id": { 1926 + "name": "user_id", 1927 + "type": "text", 1928 + "primaryKey": false, 1929 + "notNull": true 1930 + }, 1931 + "shout_id": { 1932 + "name": "shout_id", 1933 + "type": "text", 1934 + "primaryKey": false, 1935 + "notNull": true 1936 + }, 1937 + "xata_createdat": { 1938 + "name": "xata_createdat", 1939 + "type": "timestamp", 1940 + "primaryKey": false, 1941 + "notNull": true, 1942 + "default": "now()" 1943 + }, 1944 + "uri": { 1945 + "name": "uri", 1946 + "type": "text", 1947 + "primaryKey": false, 1948 + "notNull": true 1949 + } 1950 + }, 1951 + "indexes": {}, 1952 + "foreignKeys": { 1953 + "shout_likes_user_id_users_xata_id_fk": { 1954 + "name": "shout_likes_user_id_users_xata_id_fk", 1955 + "tableFrom": "shout_likes", 1956 + "tableTo": "users", 1957 + "columnsFrom": [ 1958 + "user_id" 1959 + ], 1960 + "columnsTo": [ 1961 + "xata_id" 1962 + ], 1963 + "onDelete": "no action", 1964 + "onUpdate": "no action" 1965 + }, 1966 + "shout_likes_shout_id_shouts_xata_id_fk": { 1967 + "name": "shout_likes_shout_id_shouts_xata_id_fk", 1968 + "tableFrom": "shout_likes", 1969 + "tableTo": "shouts", 1970 + "columnsFrom": [ 1971 + "shout_id" 1972 + ], 1973 + "columnsTo": [ 1974 + "xata_id" 1975 + ], 1976 + "onDelete": "no action", 1977 + "onUpdate": "no action" 1978 + } 1979 + }, 1980 + "compositePrimaryKeys": {}, 1981 + "uniqueConstraints": { 1982 + "shout_likes_uri_unique": { 1983 + "name": "shout_likes_uri_unique", 1984 + "nullsNotDistinct": false, 1985 + "columns": [ 1986 + "uri" 1987 + ] 1988 + } 1989 + }, 1990 + "policies": {}, 1991 + "checkConstraints": {}, 1992 + "isRLSEnabled": false 1993 + }, 1994 + "public.shout_reports": { 1995 + "name": "shout_reports", 1996 + "schema": "", 1997 + "columns": { 1998 + "xata_id": { 1999 + "name": "xata_id", 2000 + "type": "text", 2001 + "primaryKey": true, 2002 + "notNull": true 2003 + }, 2004 + "user_id": { 2005 + "name": "user_id", 2006 + "type": "text", 2007 + "primaryKey": false, 2008 + "notNull": true 2009 + }, 2010 + "shout_id": { 2011 + "name": "shout_id", 2012 + "type": "text", 2013 + "primaryKey": false, 2014 + "notNull": true 2015 + }, 2016 + "xata_createdat": { 2017 + "name": "xata_createdat", 2018 + "type": "timestamp", 2019 + "primaryKey": false, 2020 + "notNull": true, 2021 + "default": "now()" 2022 + } 2023 + }, 2024 + "indexes": {}, 2025 + "foreignKeys": { 2026 + "shout_reports_user_id_users_xata_id_fk": { 2027 + "name": "shout_reports_user_id_users_xata_id_fk", 2028 + "tableFrom": "shout_reports", 2029 + "tableTo": "users", 2030 + "columnsFrom": [ 2031 + "user_id" 2032 + ], 2033 + "columnsTo": [ 2034 + "xata_id" 2035 + ], 2036 + "onDelete": "no action", 2037 + "onUpdate": "no action" 2038 + }, 2039 + "shout_reports_shout_id_shouts_xata_id_fk": { 2040 + "name": "shout_reports_shout_id_shouts_xata_id_fk", 2041 + "tableFrom": "shout_reports", 2042 + "tableTo": "shouts", 2043 + "columnsFrom": [ 2044 + "shout_id" 2045 + ], 2046 + "columnsTo": [ 2047 + "xata_id" 2048 + ], 2049 + "onDelete": "no action", 2050 + "onUpdate": "no action" 2051 + } 2052 + }, 2053 + "compositePrimaryKeys": {}, 2054 + "uniqueConstraints": {}, 2055 + "policies": {}, 2056 + "checkConstraints": {}, 2057 + "isRLSEnabled": false 2058 + }, 2059 + "public.shouts": { 2060 + "name": "shouts", 2061 + "schema": "", 2062 + "columns": { 2063 + "xata_id": { 2064 + "name": "xata_id", 2065 + "type": "text", 2066 + "primaryKey": true, 2067 + "notNull": true 2068 + }, 2069 + "content": { 2070 + "name": "content", 2071 + "type": "text", 2072 + "primaryKey": false, 2073 + "notNull": true 2074 + }, 2075 + "track_id": { 2076 + "name": "track_id", 2077 + "type": "text", 2078 + "primaryKey": false, 2079 + "notNull": false 2080 + }, 2081 + "artist_id": { 2082 + "name": "artist_id", 2083 + "type": "text", 2084 + "primaryKey": false, 2085 + "notNull": false 2086 + }, 2087 + "album_id": { 2088 + "name": "album_id", 2089 + "type": "text", 2090 + "primaryKey": false, 2091 + "notNull": false 2092 + }, 2093 + "scrobble_id": { 2094 + "name": "scrobble_id", 2095 + "type": "text", 2096 + "primaryKey": false, 2097 + "notNull": false 2098 + }, 2099 + "uri": { 2100 + "name": "uri", 2101 + "type": "text", 2102 + "primaryKey": false, 2103 + "notNull": true 2104 + }, 2105 + "author_id": { 2106 + "name": "author_id", 2107 + "type": "text", 2108 + "primaryKey": false, 2109 + "notNull": true 2110 + }, 2111 + "parent_id": { 2112 + "name": "parent_id", 2113 + "type": "text", 2114 + "primaryKey": false, 2115 + "notNull": false 2116 + }, 2117 + "xata_createdat": { 2118 + "name": "xata_createdat", 2119 + "type": "timestamp", 2120 + "primaryKey": false, 2121 + "notNull": true, 2122 + "default": "now()" 2123 + }, 2124 + "xata_updatedat": { 2125 + "name": "xata_updatedat", 2126 + "type": "timestamp", 2127 + "primaryKey": false, 2128 + "notNull": true, 2129 + "default": "now()" 2130 + } 2131 + }, 2132 + "indexes": {}, 2133 + "foreignKeys": { 2134 + "shouts_track_id_tracks_xata_id_fk": { 2135 + "name": "shouts_track_id_tracks_xata_id_fk", 2136 + "tableFrom": "shouts", 2137 + "tableTo": "tracks", 2138 + "columnsFrom": [ 2139 + "track_id" 2140 + ], 2141 + "columnsTo": [ 2142 + "xata_id" 2143 + ], 2144 + "onDelete": "no action", 2145 + "onUpdate": "no action" 2146 + }, 2147 + "shouts_artist_id_users_xata_id_fk": { 2148 + "name": "shouts_artist_id_users_xata_id_fk", 2149 + "tableFrom": "shouts", 2150 + "tableTo": "users", 2151 + "columnsFrom": [ 2152 + "artist_id" 2153 + ], 2154 + "columnsTo": [ 2155 + "xata_id" 2156 + ], 2157 + "onDelete": "no action", 2158 + "onUpdate": "no action" 2159 + }, 2160 + "shouts_album_id_albums_xata_id_fk": { 2161 + "name": "shouts_album_id_albums_xata_id_fk", 2162 + "tableFrom": "shouts", 2163 + "tableTo": "albums", 2164 + "columnsFrom": [ 2165 + "album_id" 2166 + ], 2167 + "columnsTo": [ 2168 + "xata_id" 2169 + ], 2170 + "onDelete": "no action", 2171 + "onUpdate": "no action" 2172 + }, 2173 + "shouts_scrobble_id_scrobbles_xata_id_fk": { 2174 + "name": "shouts_scrobble_id_scrobbles_xata_id_fk", 2175 + "tableFrom": "shouts", 2176 + "tableTo": "scrobbles", 2177 + "columnsFrom": [ 2178 + "scrobble_id" 2179 + ], 2180 + "columnsTo": [ 2181 + "xata_id" 2182 + ], 2183 + "onDelete": "no action", 2184 + "onUpdate": "no action" 2185 + }, 2186 + "shouts_author_id_users_xata_id_fk": { 2187 + "name": "shouts_author_id_users_xata_id_fk", 2188 + "tableFrom": "shouts", 2189 + "tableTo": "users", 2190 + "columnsFrom": [ 2191 + "author_id" 2192 + ], 2193 + "columnsTo": [ 2194 + "xata_id" 2195 + ], 2196 + "onDelete": "no action", 2197 + "onUpdate": "no action" 2198 + }, 2199 + "shouts_parent_id_shouts_xata_id_fk": { 2200 + "name": "shouts_parent_id_shouts_xata_id_fk", 2201 + "tableFrom": "shouts", 2202 + "tableTo": "shouts", 2203 + "columnsFrom": [ 2204 + "parent_id" 2205 + ], 2206 + "columnsTo": [ 2207 + "xata_id" 2208 + ], 2209 + "onDelete": "no action", 2210 + "onUpdate": "no action" 2211 + } 2212 + }, 2213 + "compositePrimaryKeys": {}, 2214 + "uniqueConstraints": { 2215 + "shouts_uri_unique": { 2216 + "name": "shouts_uri_unique", 2217 + "nullsNotDistinct": false, 2218 + "columns": [ 2219 + "uri" 2220 + ] 2221 + } 2222 + }, 2223 + "policies": {}, 2224 + "checkConstraints": {}, 2225 + "isRLSEnabled": false 2226 + }, 2227 + "public.spotify_accounts": { 2228 + "name": "spotify_accounts", 2229 + "schema": "", 2230 + "columns": { 2231 + "xata_id": { 2232 + "name": "xata_id", 2233 + "type": "text", 2234 + "primaryKey": true, 2235 + "notNull": true 2236 + }, 2237 + "xata_version": { 2238 + "name": "xata_version", 2239 + "type": "integer", 2240 + "primaryKey": false, 2241 + "notNull": false 2242 + }, 2243 + "email": { 2244 + "name": "email", 2245 + "type": "text", 2246 + "primaryKey": false, 2247 + "notNull": true 2248 + }, 2249 + "user_id": { 2250 + "name": "user_id", 2251 + "type": "text", 2252 + "primaryKey": false, 2253 + "notNull": true 2254 + }, 2255 + "is_beta_user": { 2256 + "name": "is_beta_user", 2257 + "type": "boolean", 2258 + "primaryKey": false, 2259 + "notNull": true, 2260 + "default": false 2261 + }, 2262 + "xata_createdat": { 2263 + "name": "xata_createdat", 2264 + "type": "timestamp", 2265 + "primaryKey": false, 2266 + "notNull": true, 2267 + "default": "now()" 2268 + }, 2269 + "xata_updatedat": { 2270 + "name": "xata_updatedat", 2271 + "type": "timestamp", 2272 + "primaryKey": false, 2273 + "notNull": true, 2274 + "default": "now()" 2275 + } 2276 + }, 2277 + "indexes": {}, 2278 + "foreignKeys": { 2279 + "spotify_accounts_user_id_users_xata_id_fk": { 2280 + "name": "spotify_accounts_user_id_users_xata_id_fk", 2281 + "tableFrom": "spotify_accounts", 2282 + "tableTo": "users", 2283 + "columnsFrom": [ 2284 + "user_id" 2285 + ], 2286 + "columnsTo": [ 2287 + "xata_id" 2288 + ], 2289 + "onDelete": "no action", 2290 + "onUpdate": "no action" 2291 + } 2292 + }, 2293 + "compositePrimaryKeys": {}, 2294 + "uniqueConstraints": {}, 2295 + "policies": {}, 2296 + "checkConstraints": {}, 2297 + "isRLSEnabled": false 2298 + }, 2299 + "public.spotify_tokens": { 2300 + "name": "spotify_tokens", 2301 + "schema": "", 2302 + "columns": { 2303 + "xata_id": { 2304 + "name": "xata_id", 2305 + "type": "text", 2306 + "primaryKey": true, 2307 + "notNull": true 2308 + }, 2309 + "xata_version": { 2310 + "name": "xata_version", 2311 + "type": "integer", 2312 + "primaryKey": false, 2313 + "notNull": false 2314 + }, 2315 + "access_token": { 2316 + "name": "access_token", 2317 + "type": "text", 2318 + "primaryKey": false, 2319 + "notNull": true 2320 + }, 2321 + "refresh_token": { 2322 + "name": "refresh_token", 2323 + "type": "text", 2324 + "primaryKey": false, 2325 + "notNull": true 2326 + }, 2327 + "user_id": { 2328 + "name": "user_id", 2329 + "type": "text", 2330 + "primaryKey": false, 2331 + "notNull": true 2332 + }, 2333 + "xata_createdat": { 2334 + "name": "xata_createdat", 2335 + "type": "timestamp", 2336 + "primaryKey": false, 2337 + "notNull": true, 2338 + "default": "now()" 2339 + }, 2340 + "xata_updatedat": { 2341 + "name": "xata_updatedat", 2342 + "type": "timestamp", 2343 + "primaryKey": false, 2344 + "notNull": true, 2345 + "default": "now()" 2346 + } 2347 + }, 2348 + "indexes": {}, 2349 + "foreignKeys": { 2350 + "spotify_tokens_user_id_users_xata_id_fk": { 2351 + "name": "spotify_tokens_user_id_users_xata_id_fk", 2352 + "tableFrom": "spotify_tokens", 2353 + "tableTo": "users", 2354 + "columnsFrom": [ 2355 + "user_id" 2356 + ], 2357 + "columnsTo": [ 2358 + "xata_id" 2359 + ], 2360 + "onDelete": "no action", 2361 + "onUpdate": "no action" 2362 + } 2363 + }, 2364 + "compositePrimaryKeys": {}, 2365 + "uniqueConstraints": {}, 2366 + "policies": {}, 2367 + "checkConstraints": {}, 2368 + "isRLSEnabled": false 2369 + }, 2370 + "public.tracks": { 2371 + "name": "tracks", 2372 + "schema": "", 2373 + "columns": { 2374 + "xata_id": { 2375 + "name": "xata_id", 2376 + "type": "text", 2377 + "primaryKey": true, 2378 + "notNull": true 2379 + }, 2380 + "title": { 2381 + "name": "title", 2382 + "type": "text", 2383 + "primaryKey": false, 2384 + "notNull": true 2385 + }, 2386 + "artist": { 2387 + "name": "artist", 2388 + "type": "text", 2389 + "primaryKey": false, 2390 + "notNull": true 2391 + }, 2392 + "album_artist": { 2393 + "name": "album_artist", 2394 + "type": "text", 2395 + "primaryKey": false, 2396 + "notNull": true 2397 + }, 2398 + "album_art": { 2399 + "name": "album_art", 2400 + "type": "text", 2401 + "primaryKey": false, 2402 + "notNull": false 2403 + }, 2404 + "album": { 2405 + "name": "album", 2406 + "type": "text", 2407 + "primaryKey": false, 2408 + "notNull": true 2409 + }, 2410 + "track_number": { 2411 + "name": "track_number", 2412 + "type": "integer", 2413 + "primaryKey": false, 2414 + "notNull": false 2415 + }, 2416 + "duration": { 2417 + "name": "duration", 2418 + "type": "integer", 2419 + "primaryKey": false, 2420 + "notNull": true 2421 + }, 2422 + "mb_id": { 2423 + "name": "mb_id", 2424 + "type": "text", 2425 + "primaryKey": false, 2426 + "notNull": false 2427 + }, 2428 + "youtube_link": { 2429 + "name": "youtube_link", 2430 + "type": "text", 2431 + "primaryKey": false, 2432 + "notNull": false 2433 + }, 2434 + "spotify_link": { 2435 + "name": "spotify_link", 2436 + "type": "text", 2437 + "primaryKey": false, 2438 + "notNull": false 2439 + }, 2440 + "apple_music_link": { 2441 + "name": "apple_music_link", 2442 + "type": "text", 2443 + "primaryKey": false, 2444 + "notNull": false 2445 + }, 2446 + "tidal_link": { 2447 + "name": "tidal_link", 2448 + "type": "text", 2449 + "primaryKey": false, 2450 + "notNull": false 2451 + }, 2452 + "sha256": { 2453 + "name": "sha256", 2454 + "type": "text", 2455 + "primaryKey": false, 2456 + "notNull": true 2457 + }, 2458 + "disc_number": { 2459 + "name": "disc_number", 2460 + "type": "integer", 2461 + "primaryKey": false, 2462 + "notNull": false 2463 + }, 2464 + "lyrics": { 2465 + "name": "lyrics", 2466 + "type": "text", 2467 + "primaryKey": false, 2468 + "notNull": false 2469 + }, 2470 + "composer": { 2471 + "name": "composer", 2472 + "type": "text", 2473 + "primaryKey": false, 2474 + "notNull": false 2475 + }, 2476 + "genre": { 2477 + "name": "genre", 2478 + "type": "text", 2479 + "primaryKey": false, 2480 + "notNull": false 2481 + }, 2482 + "label": { 2483 + "name": "label", 2484 + "type": "text", 2485 + "primaryKey": false, 2486 + "notNull": false 2487 + }, 2488 + "copyright_message": { 2489 + "name": "copyright_message", 2490 + "type": "text", 2491 + "primaryKey": false, 2492 + "notNull": false 2493 + }, 2494 + "uri": { 2495 + "name": "uri", 2496 + "type": "text", 2497 + "primaryKey": false, 2498 + "notNull": false 2499 + }, 2500 + "album_uri": { 2501 + "name": "album_uri", 2502 + "type": "text", 2503 + "primaryKey": false, 2504 + "notNull": false 2505 + }, 2506 + "artist_uri": { 2507 + "name": "artist_uri", 2508 + "type": "text", 2509 + "primaryKey": false, 2510 + "notNull": false 2511 + }, 2512 + "xata_createdat": { 2513 + "name": "xata_createdat", 2514 + "type": "timestamp", 2515 + "primaryKey": false, 2516 + "notNull": true, 2517 + "default": "now()" 2518 + }, 2519 + "xata_updatedat": { 2520 + "name": "xata_updatedat", 2521 + "type": "timestamp", 2522 + "primaryKey": false, 2523 + "notNull": true, 2524 + "default": "now()" 2525 + }, 2526 + "xata_version": { 2527 + "name": "xata_version", 2528 + "type": "integer", 2529 + "primaryKey": false, 2530 + "notNull": false 2531 + } 2532 + }, 2533 + "indexes": {}, 2534 + "foreignKeys": {}, 2535 + "compositePrimaryKeys": {}, 2536 + "uniqueConstraints": { 2537 + "tracks_mb_id_unique": { 2538 + "name": "tracks_mb_id_unique", 2539 + "nullsNotDistinct": false, 2540 + "columns": [ 2541 + "mb_id" 2542 + ] 2543 + }, 2544 + "tracks_youtube_link_unique": { 2545 + "name": "tracks_youtube_link_unique", 2546 + "nullsNotDistinct": false, 2547 + "columns": [ 2548 + "youtube_link" 2549 + ] 2550 + }, 2551 + "tracks_spotify_link_unique": { 2552 + "name": "tracks_spotify_link_unique", 2553 + "nullsNotDistinct": false, 2554 + "columns": [ 2555 + "spotify_link" 2556 + ] 2557 + }, 2558 + "tracks_apple_music_link_unique": { 2559 + "name": "tracks_apple_music_link_unique", 2560 + "nullsNotDistinct": false, 2561 + "columns": [ 2562 + "apple_music_link" 2563 + ] 2564 + }, 2565 + "tracks_tidal_link_unique": { 2566 + "name": "tracks_tidal_link_unique", 2567 + "nullsNotDistinct": false, 2568 + "columns": [ 2569 + "tidal_link" 2570 + ] 2571 + }, 2572 + "tracks_sha256_unique": { 2573 + "name": "tracks_sha256_unique", 2574 + "nullsNotDistinct": false, 2575 + "columns": [ 2576 + "sha256" 2577 + ] 2578 + }, 2579 + "tracks_uri_unique": { 2580 + "name": "tracks_uri_unique", 2581 + "nullsNotDistinct": false, 2582 + "columns": [ 2583 + "uri" 2584 + ] 2585 + } 2586 + }, 2587 + "policies": {}, 2588 + "checkConstraints": {}, 2589 + "isRLSEnabled": false 2590 + }, 2591 + "public.user_albums": { 2592 + "name": "user_albums", 2593 + "schema": "", 2594 + "columns": { 2595 + "xata_id": { 2596 + "name": "xata_id", 2597 + "type": "text", 2598 + "primaryKey": true, 2599 + "notNull": true 2600 + }, 2601 + "user_id": { 2602 + "name": "user_id", 2603 + "type": "text", 2604 + "primaryKey": false, 2605 + "notNull": true 2606 + }, 2607 + "album_id": { 2608 + "name": "album_id", 2609 + "type": "text", 2610 + "primaryKey": false, 2611 + "notNull": true 2612 + }, 2613 + "xata_createdat": { 2614 + "name": "xata_createdat", 2615 + "type": "timestamp", 2616 + "primaryKey": false, 2617 + "notNull": true, 2618 + "default": "now()" 2619 + }, 2620 + "xata_updatedat": { 2621 + "name": "xata_updatedat", 2622 + "type": "timestamp", 2623 + "primaryKey": false, 2624 + "notNull": true, 2625 + "default": "now()" 2626 + }, 2627 + "xata_version": { 2628 + "name": "xata_version", 2629 + "type": "integer", 2630 + "primaryKey": false, 2631 + "notNull": false 2632 + }, 2633 + "scrobbles": { 2634 + "name": "scrobbles", 2635 + "type": "integer", 2636 + "primaryKey": false, 2637 + "notNull": false 2638 + }, 2639 + "uri": { 2640 + "name": "uri", 2641 + "type": "text", 2642 + "primaryKey": false, 2643 + "notNull": true 2644 + } 2645 + }, 2646 + "indexes": {}, 2647 + "foreignKeys": { 2648 + "user_albums_user_id_users_xata_id_fk": { 2649 + "name": "user_albums_user_id_users_xata_id_fk", 2650 + "tableFrom": "user_albums", 2651 + "tableTo": "users", 2652 + "columnsFrom": [ 2653 + "user_id" 2654 + ], 2655 + "columnsTo": [ 2656 + "xata_id" 2657 + ], 2658 + "onDelete": "no action", 2659 + "onUpdate": "no action" 2660 + }, 2661 + "user_albums_album_id_albums_xata_id_fk": { 2662 + "name": "user_albums_album_id_albums_xata_id_fk", 2663 + "tableFrom": "user_albums", 2664 + "tableTo": "albums", 2665 + "columnsFrom": [ 2666 + "album_id" 2667 + ], 2668 + "columnsTo": [ 2669 + "xata_id" 2670 + ], 2671 + "onDelete": "no action", 2672 + "onUpdate": "no action" 2673 + } 2674 + }, 2675 + "compositePrimaryKeys": {}, 2676 + "uniqueConstraints": { 2677 + "user_albums_uri_unique": { 2678 + "name": "user_albums_uri_unique", 2679 + "nullsNotDistinct": false, 2680 + "columns": [ 2681 + "uri" 2682 + ] 2683 + } 2684 + }, 2685 + "policies": {}, 2686 + "checkConstraints": {}, 2687 + "isRLSEnabled": false 2688 + }, 2689 + "public.user_artists": { 2690 + "name": "user_artists", 2691 + "schema": "", 2692 + "columns": { 2693 + "xata_id": { 2694 + "name": "xata_id", 2695 + "type": "text", 2696 + "primaryKey": true, 2697 + "notNull": true 2698 + }, 2699 + "user_id": { 2700 + "name": "user_id", 2701 + "type": "text", 2702 + "primaryKey": false, 2703 + "notNull": true 2704 + }, 2705 + "artist_id": { 2706 + "name": "artist_id", 2707 + "type": "text", 2708 + "primaryKey": false, 2709 + "notNull": true 2710 + }, 2711 + "xata_createdat": { 2712 + "name": "xata_createdat", 2713 + "type": "timestamp", 2714 + "primaryKey": false, 2715 + "notNull": true, 2716 + "default": "now()" 2717 + }, 2718 + "xata_updatedat": { 2719 + "name": "xata_updatedat", 2720 + "type": "timestamp", 2721 + "primaryKey": false, 2722 + "notNull": true, 2723 + "default": "now()" 2724 + }, 2725 + "xata_version": { 2726 + "name": "xata_version", 2727 + "type": "integer", 2728 + "primaryKey": false, 2729 + "notNull": false 2730 + }, 2731 + "scrobbles": { 2732 + "name": "scrobbles", 2733 + "type": "integer", 2734 + "primaryKey": false, 2735 + "notNull": false 2736 + }, 2737 + "uri": { 2738 + "name": "uri", 2739 + "type": "text", 2740 + "primaryKey": false, 2741 + "notNull": true 2742 + } 2743 + }, 2744 + "indexes": {}, 2745 + "foreignKeys": { 2746 + "user_artists_user_id_users_xata_id_fk": { 2747 + "name": "user_artists_user_id_users_xata_id_fk", 2748 + "tableFrom": "user_artists", 2749 + "tableTo": "users", 2750 + "columnsFrom": [ 2751 + "user_id" 2752 + ], 2753 + "columnsTo": [ 2754 + "xata_id" 2755 + ], 2756 + "onDelete": "no action", 2757 + "onUpdate": "no action" 2758 + }, 2759 + "user_artists_artist_id_artists_xata_id_fk": { 2760 + "name": "user_artists_artist_id_artists_xata_id_fk", 2761 + "tableFrom": "user_artists", 2762 + "tableTo": "artists", 2763 + "columnsFrom": [ 2764 + "artist_id" 2765 + ], 2766 + "columnsTo": [ 2767 + "xata_id" 2768 + ], 2769 + "onDelete": "no action", 2770 + "onUpdate": "no action" 2771 + } 2772 + }, 2773 + "compositePrimaryKeys": {}, 2774 + "uniqueConstraints": { 2775 + "user_artists_uri_unique": { 2776 + "name": "user_artists_uri_unique", 2777 + "nullsNotDistinct": false, 2778 + "columns": [ 2779 + "uri" 2780 + ] 2781 + } 2782 + }, 2783 + "policies": {}, 2784 + "checkConstraints": {}, 2785 + "isRLSEnabled": false 2786 + }, 2787 + "public.user_playlists": { 2788 + "name": "user_playlists", 2789 + "schema": "", 2790 + "columns": { 2791 + "xata_id": { 2792 + "name": "xata_id", 2793 + "type": "text", 2794 + "primaryKey": true, 2795 + "notNull": true 2796 + }, 2797 + "user_id": { 2798 + "name": "user_id", 2799 + "type": "text", 2800 + "primaryKey": false, 2801 + "notNull": true 2802 + }, 2803 + "playlist_id": { 2804 + "name": "playlist_id", 2805 + "type": "text", 2806 + "primaryKey": false, 2807 + "notNull": true 2808 + }, 2809 + "xata_createdat": { 2810 + "name": "xata_createdat", 2811 + "type": "timestamp", 2812 + "primaryKey": false, 2813 + "notNull": true, 2814 + "default": "now()" 2815 + }, 2816 + "uri": { 2817 + "name": "uri", 2818 + "type": "text", 2819 + "primaryKey": false, 2820 + "notNull": false 2821 + } 2822 + }, 2823 + "indexes": {}, 2824 + "foreignKeys": { 2825 + "user_playlists_user_id_users_xata_id_fk": { 2826 + "name": "user_playlists_user_id_users_xata_id_fk", 2827 + "tableFrom": "user_playlists", 2828 + "tableTo": "users", 2829 + "columnsFrom": [ 2830 + "user_id" 2831 + ], 2832 + "columnsTo": [ 2833 + "xata_id" 2834 + ], 2835 + "onDelete": "no action", 2836 + "onUpdate": "no action" 2837 + }, 2838 + "user_playlists_playlist_id_tracks_xata_id_fk": { 2839 + "name": "user_playlists_playlist_id_tracks_xata_id_fk", 2840 + "tableFrom": "user_playlists", 2841 + "tableTo": "tracks", 2842 + "columnsFrom": [ 2843 + "playlist_id" 2844 + ], 2845 + "columnsTo": [ 2846 + "xata_id" 2847 + ], 2848 + "onDelete": "no action", 2849 + "onUpdate": "no action" 2850 + } 2851 + }, 2852 + "compositePrimaryKeys": {}, 2853 + "uniqueConstraints": { 2854 + "user_playlists_uri_unique": { 2855 + "name": "user_playlists_uri_unique", 2856 + "nullsNotDistinct": false, 2857 + "columns": [ 2858 + "uri" 2859 + ] 2860 + } 2861 + }, 2862 + "policies": {}, 2863 + "checkConstraints": {}, 2864 + "isRLSEnabled": false 2865 + }, 2866 + "public.user_tracks": { 2867 + "name": "user_tracks", 2868 + "schema": "", 2869 + "columns": { 2870 + "xata_id": { 2871 + "name": "xata_id", 2872 + "type": "text", 2873 + "primaryKey": true, 2874 + "notNull": true 2875 + }, 2876 + "user_id": { 2877 + "name": "user_id", 2878 + "type": "text", 2879 + "primaryKey": false, 2880 + "notNull": true 2881 + }, 2882 + "track_id": { 2883 + "name": "track_id", 2884 + "type": "text", 2885 + "primaryKey": false, 2886 + "notNull": true 2887 + }, 2888 + "xata_createdat": { 2889 + "name": "xata_createdat", 2890 + "type": "timestamp", 2891 + "primaryKey": false, 2892 + "notNull": true, 2893 + "default": "now()" 2894 + }, 2895 + "xata_updatedat": { 2896 + "name": "xata_updatedat", 2897 + "type": "timestamp", 2898 + "primaryKey": false, 2899 + "notNull": true, 2900 + "default": "now()" 2901 + }, 2902 + "xata_version": { 2903 + "name": "xata_version", 2904 + "type": "integer", 2905 + "primaryKey": false, 2906 + "notNull": false 2907 + }, 2908 + "uri": { 2909 + "name": "uri", 2910 + "type": "text", 2911 + "primaryKey": false, 2912 + "notNull": true 2913 + }, 2914 + "scrobbles": { 2915 + "name": "scrobbles", 2916 + "type": "integer", 2917 + "primaryKey": false, 2918 + "notNull": false 2919 + } 2920 + }, 2921 + "indexes": {}, 2922 + "foreignKeys": { 2923 + "user_tracks_user_id_users_xata_id_fk": { 2924 + "name": "user_tracks_user_id_users_xata_id_fk", 2925 + "tableFrom": "user_tracks", 2926 + "tableTo": "users", 2927 + "columnsFrom": [ 2928 + "user_id" 2929 + ], 2930 + "columnsTo": [ 2931 + "xata_id" 2932 + ], 2933 + "onDelete": "no action", 2934 + "onUpdate": "no action" 2935 + }, 2936 + "user_tracks_track_id_tracks_xata_id_fk": { 2937 + "name": "user_tracks_track_id_tracks_xata_id_fk", 2938 + "tableFrom": "user_tracks", 2939 + "tableTo": "tracks", 2940 + "columnsFrom": [ 2941 + "track_id" 2942 + ], 2943 + "columnsTo": [ 2944 + "xata_id" 2945 + ], 2946 + "onDelete": "no action", 2947 + "onUpdate": "no action" 2948 + } 2949 + }, 2950 + "compositePrimaryKeys": {}, 2951 + "uniqueConstraints": { 2952 + "user_tracks_uri_unique": { 2953 + "name": "user_tracks_uri_unique", 2954 + "nullsNotDistinct": false, 2955 + "columns": [ 2956 + "uri" 2957 + ] 2958 + } 2959 + }, 2960 + "policies": {}, 2961 + "checkConstraints": {}, 2962 + "isRLSEnabled": false 2963 + }, 2964 + "public.users": { 2965 + "name": "users", 2966 + "schema": "", 2967 + "columns": { 2968 + "xata_id": { 2969 + "name": "xata_id", 2970 + "type": "text", 2971 + "primaryKey": true, 2972 + "notNull": true 2973 + }, 2974 + "did": { 2975 + "name": "did", 2976 + "type": "text", 2977 + "primaryKey": false, 2978 + "notNull": true 2979 + }, 2980 + "display_name": { 2981 + "name": "display_name", 2982 + "type": "text", 2983 + "primaryKey": false, 2984 + "notNull": false 2985 + }, 2986 + "handle": { 2987 + "name": "handle", 2988 + "type": "text", 2989 + "primaryKey": false, 2990 + "notNull": true 2991 + }, 2992 + "avatar": { 2993 + "name": "avatar", 2994 + "type": "text", 2995 + "primaryKey": false, 2996 + "notNull": true 2997 + }, 2998 + "xata_createdat": { 2999 + "name": "xata_createdat", 3000 + "type": "timestamp", 3001 + "primaryKey": false, 3002 + "notNull": true, 3003 + "default": "now()" 3004 + }, 3005 + "xata_updatedat": { 3006 + "name": "xata_updatedat", 3007 + "type": "timestamp", 3008 + "primaryKey": false, 3009 + "notNull": true, 3010 + "default": "now()" 3011 + }, 3012 + "xata_version": { 3013 + "name": "xata_version", 3014 + "type": "integer", 3015 + "primaryKey": false, 3016 + "notNull": false 3017 + } 3018 + }, 3019 + "indexes": {}, 3020 + "foreignKeys": {}, 3021 + "compositePrimaryKeys": {}, 3022 + "uniqueConstraints": { 3023 + "users_did_unique": { 3024 + "name": "users_did_unique", 3025 + "nullsNotDistinct": false, 3026 + "columns": [ 3027 + "did" 3028 + ] 3029 + }, 3030 + "users_handle_unique": { 3031 + "name": "users_handle_unique", 3032 + "nullsNotDistinct": false, 3033 + "columns": [ 3034 + "handle" 3035 + ] 3036 + } 3037 + }, 3038 + "policies": {}, 3039 + "checkConstraints": {}, 3040 + "isRLSEnabled": false 3041 + }, 3042 + "public.webscrobblers": { 3043 + "name": "webscrobblers", 3044 + "schema": "", 3045 + "columns": { 3046 + "xata_id": { 3047 + "name": "xata_id", 3048 + "type": "text", 3049 + "primaryKey": true, 3050 + "notNull": true 3051 + }, 3052 + "name": { 3053 + "name": "name", 3054 + "type": "text", 3055 + "primaryKey": false, 3056 + "notNull": true 3057 + }, 3058 + "uuid": { 3059 + "name": "uuid", 3060 + "type": "text", 3061 + "primaryKey": false, 3062 + "notNull": true 3063 + }, 3064 + "description": { 3065 + "name": "description", 3066 + "type": "text", 3067 + "primaryKey": false, 3068 + "notNull": false 3069 + }, 3070 + "enabled": { 3071 + "name": "enabled", 3072 + "type": "boolean", 3073 + "primaryKey": false, 3074 + "notNull": true, 3075 + "default": true 3076 + }, 3077 + "user_id": { 3078 + "name": "user_id", 3079 + "type": "text", 3080 + "primaryKey": false, 3081 + "notNull": true 3082 + }, 3083 + "xata_createdat": { 3084 + "name": "xata_createdat", 3085 + "type": "timestamp", 3086 + "primaryKey": false, 3087 + "notNull": true, 3088 + "default": "now()" 3089 + }, 3090 + "xata_updatedat": { 3091 + "name": "xata_updatedat", 3092 + "type": "timestamp", 3093 + "primaryKey": false, 3094 + "notNull": true, 3095 + "default": "now()" 3096 + } 3097 + }, 3098 + "indexes": {}, 3099 + "foreignKeys": { 3100 + "webscrobblers_user_id_users_xata_id_fk": { 3101 + "name": "webscrobblers_user_id_users_xata_id_fk", 3102 + "tableFrom": "webscrobblers", 3103 + "tableTo": "users", 3104 + "columnsFrom": [ 3105 + "user_id" 3106 + ], 3107 + "columnsTo": [ 3108 + "xata_id" 3109 + ], 3110 + "onDelete": "no action", 3111 + "onUpdate": "no action" 3112 + } 3113 + }, 3114 + "compositePrimaryKeys": {}, 3115 + "uniqueConstraints": {}, 3116 + "policies": {}, 3117 + "checkConstraints": {}, 3118 + "isRLSEnabled": false 3119 + } 3120 + }, 3121 + "enums": {}, 3122 + "schemas": {}, 3123 + "sequences": {}, 3124 + "roles": {}, 3125 + "policies": {}, 3126 + "views": {}, 3127 + "_meta": { 3128 + "columns": {}, 3129 + "schemas": {}, 3130 + "tables": {} 3131 + } 3132 + }
+3132
apps/api/drizzle/meta/0002_snapshot.json
··· 1 + { 2 + "id": "3ef49661-fdf0-4245-8943-ff69567a09b9", 3 + "prevId": "6ebb9775-b900-418c-bbd8-b704571a20d5", 4 + "version": "7", 5 + "dialect": "postgresql", 6 + "tables": { 7 + "public.album_tracks": { 8 + "name": "album_tracks", 9 + "schema": "", 10 + "columns": { 11 + "xata_id": { 12 + "name": "xata_id", 13 + "type": "text", 14 + "primaryKey": true, 15 + "notNull": true 16 + }, 17 + "album_id": { 18 + "name": "album_id", 19 + "type": "text", 20 + "primaryKey": false, 21 + "notNull": true 22 + }, 23 + "track_id": { 24 + "name": "track_id", 25 + "type": "text", 26 + "primaryKey": false, 27 + "notNull": true 28 + }, 29 + "xata_createdat": { 30 + "name": "xata_createdat", 31 + "type": "timestamp", 32 + "primaryKey": false, 33 + "notNull": true, 34 + "default": "now()" 35 + }, 36 + "xata_updatedat": { 37 + "name": "xata_updatedat", 38 + "type": "timestamp", 39 + "primaryKey": false, 40 + "notNull": true, 41 + "default": "now()" 42 + }, 43 + "xata_version": { 44 + "name": "xata_version", 45 + "type": "integer", 46 + "primaryKey": false, 47 + "notNull": false 48 + } 49 + }, 50 + "indexes": {}, 51 + "foreignKeys": { 52 + "album_tracks_album_id_albums_xata_id_fk": { 53 + "name": "album_tracks_album_id_albums_xata_id_fk", 54 + "tableFrom": "album_tracks", 55 + "tableTo": "albums", 56 + "columnsFrom": [ 57 + "album_id" 58 + ], 59 + "columnsTo": [ 60 + "xata_id" 61 + ], 62 + "onDelete": "no action", 63 + "onUpdate": "no action" 64 + }, 65 + "album_tracks_track_id_tracks_xata_id_fk": { 66 + "name": "album_tracks_track_id_tracks_xata_id_fk", 67 + "tableFrom": "album_tracks", 68 + "tableTo": "tracks", 69 + "columnsFrom": [ 70 + "track_id" 71 + ], 72 + "columnsTo": [ 73 + "xata_id" 74 + ], 75 + "onDelete": "no action", 76 + "onUpdate": "no action" 77 + } 78 + }, 79 + "compositePrimaryKeys": {}, 80 + "uniqueConstraints": {}, 81 + "policies": {}, 82 + "checkConstraints": {}, 83 + "isRLSEnabled": false 84 + }, 85 + "public.albums": { 86 + "name": "albums", 87 + "schema": "", 88 + "columns": { 89 + "xata_id": { 90 + "name": "xata_id", 91 + "type": "text", 92 + "primaryKey": true, 93 + "notNull": true 94 + }, 95 + "title": { 96 + "name": "title", 97 + "type": "text", 98 + "primaryKey": false, 99 + "notNull": true 100 + }, 101 + "artist": { 102 + "name": "artist", 103 + "type": "text", 104 + "primaryKey": false, 105 + "notNull": true 106 + }, 107 + "release_date": { 108 + "name": "release_date", 109 + "type": "text", 110 + "primaryKey": false, 111 + "notNull": false 112 + }, 113 + "year": { 114 + "name": "year", 115 + "type": "integer", 116 + "primaryKey": false, 117 + "notNull": false 118 + }, 119 + "album_art": { 120 + "name": "album_art", 121 + "type": "text", 122 + "primaryKey": false, 123 + "notNull": false 124 + }, 125 + "uri": { 126 + "name": "uri", 127 + "type": "text", 128 + "primaryKey": false, 129 + "notNull": false 130 + }, 131 + "artist_uri": { 132 + "name": "artist_uri", 133 + "type": "text", 134 + "primaryKey": false, 135 + "notNull": false 136 + }, 137 + "apple_music_link": { 138 + "name": "apple_music_link", 139 + "type": "text", 140 + "primaryKey": false, 141 + "notNull": false 142 + }, 143 + "spotify_link": { 144 + "name": "spotify_link", 145 + "type": "text", 146 + "primaryKey": false, 147 + "notNull": false 148 + }, 149 + "tidal_link": { 150 + "name": "tidal_link", 151 + "type": "text", 152 + "primaryKey": false, 153 + "notNull": false 154 + }, 155 + "youtube_link": { 156 + "name": "youtube_link", 157 + "type": "text", 158 + "primaryKey": false, 159 + "notNull": false 160 + }, 161 + "sha256": { 162 + "name": "sha256", 163 + "type": "text", 164 + "primaryKey": false, 165 + "notNull": true 166 + }, 167 + "xata_createdat": { 168 + "name": "xata_createdat", 169 + "type": "timestamp", 170 + "primaryKey": false, 171 + "notNull": true, 172 + "default": "now()" 173 + }, 174 + "xata_updatedat": { 175 + "name": "xata_updatedat", 176 + "type": "timestamp", 177 + "primaryKey": false, 178 + "notNull": true, 179 + "default": "now()" 180 + }, 181 + "xata_version": { 182 + "name": "xata_version", 183 + "type": "integer", 184 + "primaryKey": false, 185 + "notNull": false 186 + } 187 + }, 188 + "indexes": {}, 189 + "foreignKeys": {}, 190 + "compositePrimaryKeys": {}, 191 + "uniqueConstraints": { 192 + "albums_uri_unique": { 193 + "name": "albums_uri_unique", 194 + "nullsNotDistinct": false, 195 + "columns": [ 196 + "uri" 197 + ] 198 + }, 199 + "albums_apple_music_link_unique": { 200 + "name": "albums_apple_music_link_unique", 201 + "nullsNotDistinct": false, 202 + "columns": [ 203 + "apple_music_link" 204 + ] 205 + }, 206 + "albums_spotify_link_unique": { 207 + "name": "albums_spotify_link_unique", 208 + "nullsNotDistinct": false, 209 + "columns": [ 210 + "spotify_link" 211 + ] 212 + }, 213 + "albums_tidal_link_unique": { 214 + "name": "albums_tidal_link_unique", 215 + "nullsNotDistinct": false, 216 + "columns": [ 217 + "tidal_link" 218 + ] 219 + }, 220 + "albums_youtube_link_unique": { 221 + "name": "albums_youtube_link_unique", 222 + "nullsNotDistinct": false, 223 + "columns": [ 224 + "youtube_link" 225 + ] 226 + }, 227 + "albums_sha256_unique": { 228 + "name": "albums_sha256_unique", 229 + "nullsNotDistinct": false, 230 + "columns": [ 231 + "sha256" 232 + ] 233 + } 234 + }, 235 + "policies": {}, 236 + "checkConstraints": {}, 237 + "isRLSEnabled": false 238 + }, 239 + "public.api_keys": { 240 + "name": "api_keys", 241 + "schema": "", 242 + "columns": { 243 + "xata_id": { 244 + "name": "xata_id", 245 + "type": "text", 246 + "primaryKey": true, 247 + "notNull": true 248 + }, 249 + "name": { 250 + "name": "name", 251 + "type": "text", 252 + "primaryKey": false, 253 + "notNull": true 254 + }, 255 + "api_key": { 256 + "name": "api_key", 257 + "type": "text", 258 + "primaryKey": false, 259 + "notNull": true 260 + }, 261 + "shared_secret": { 262 + "name": "shared_secret", 263 + "type": "text", 264 + "primaryKey": false, 265 + "notNull": true 266 + }, 267 + "description": { 268 + "name": "description", 269 + "type": "text", 270 + "primaryKey": false, 271 + "notNull": false 272 + }, 273 + "enabled": { 274 + "name": "enabled", 275 + "type": "boolean", 276 + "primaryKey": false, 277 + "notNull": true, 278 + "default": true 279 + }, 280 + "user_id": { 281 + "name": "user_id", 282 + "type": "text", 283 + "primaryKey": false, 284 + "notNull": true 285 + }, 286 + "xata_createdat": { 287 + "name": "xata_createdat", 288 + "type": "timestamp", 289 + "primaryKey": false, 290 + "notNull": true, 291 + "default": "now()" 292 + }, 293 + "xata_updatedat": { 294 + "name": "xata_updatedat", 295 + "type": "timestamp", 296 + "primaryKey": false, 297 + "notNull": true, 298 + "default": "now()" 299 + } 300 + }, 301 + "indexes": {}, 302 + "foreignKeys": { 303 + "api_keys_user_id_users_xata_id_fk": { 304 + "name": "api_keys_user_id_users_xata_id_fk", 305 + "tableFrom": "api_keys", 306 + "tableTo": "users", 307 + "columnsFrom": [ 308 + "user_id" 309 + ], 310 + "columnsTo": [ 311 + "xata_id" 312 + ], 313 + "onDelete": "no action", 314 + "onUpdate": "no action" 315 + } 316 + }, 317 + "compositePrimaryKeys": {}, 318 + "uniqueConstraints": {}, 319 + "policies": {}, 320 + "checkConstraints": {}, 321 + "isRLSEnabled": false 322 + }, 323 + "public.artist_albums": { 324 + "name": "artist_albums", 325 + "schema": "", 326 + "columns": { 327 + "xata_id": { 328 + "name": "xata_id", 329 + "type": "text", 330 + "primaryKey": true, 331 + "notNull": true 332 + }, 333 + "artist_id": { 334 + "name": "artist_id", 335 + "type": "text", 336 + "primaryKey": false, 337 + "notNull": true 338 + }, 339 + "album_id": { 340 + "name": "album_id", 341 + "type": "text", 342 + "primaryKey": false, 343 + "notNull": true 344 + }, 345 + "xata_createdat": { 346 + "name": "xata_createdat", 347 + "type": "timestamp", 348 + "primaryKey": false, 349 + "notNull": true, 350 + "default": "now()" 351 + }, 352 + "xata_updatedat": { 353 + "name": "xata_updatedat", 354 + "type": "timestamp", 355 + "primaryKey": false, 356 + "notNull": true, 357 + "default": "now()" 358 + }, 359 + "xata_version": { 360 + "name": "xata_version", 361 + "type": "integer", 362 + "primaryKey": false, 363 + "notNull": false 364 + } 365 + }, 366 + "indexes": {}, 367 + "foreignKeys": { 368 + "artist_albums_artist_id_artists_xata_id_fk": { 369 + "name": "artist_albums_artist_id_artists_xata_id_fk", 370 + "tableFrom": "artist_albums", 371 + "tableTo": "artists", 372 + "columnsFrom": [ 373 + "artist_id" 374 + ], 375 + "columnsTo": [ 376 + "xata_id" 377 + ], 378 + "onDelete": "no action", 379 + "onUpdate": "no action" 380 + }, 381 + "artist_albums_album_id_albums_xata_id_fk": { 382 + "name": "artist_albums_album_id_albums_xata_id_fk", 383 + "tableFrom": "artist_albums", 384 + "tableTo": "albums", 385 + "columnsFrom": [ 386 + "album_id" 387 + ], 388 + "columnsTo": [ 389 + "xata_id" 390 + ], 391 + "onDelete": "no action", 392 + "onUpdate": "no action" 393 + } 394 + }, 395 + "compositePrimaryKeys": {}, 396 + "uniqueConstraints": {}, 397 + "policies": {}, 398 + "checkConstraints": {}, 399 + "isRLSEnabled": false 400 + }, 401 + "public.artist_tracks": { 402 + "name": "artist_tracks", 403 + "schema": "", 404 + "columns": { 405 + "xata_id": { 406 + "name": "xata_id", 407 + "type": "text", 408 + "primaryKey": true, 409 + "notNull": true 410 + }, 411 + "artist_id": { 412 + "name": "artist_id", 413 + "type": "text", 414 + "primaryKey": false, 415 + "notNull": true 416 + }, 417 + "track_id": { 418 + "name": "track_id", 419 + "type": "text", 420 + "primaryKey": false, 421 + "notNull": true 422 + }, 423 + "xata_createdat": { 424 + "name": "xata_createdat", 425 + "type": "timestamp", 426 + "primaryKey": false, 427 + "notNull": true, 428 + "default": "now()" 429 + }, 430 + "xata_updatedat": { 431 + "name": "xata_updatedat", 432 + "type": "timestamp", 433 + "primaryKey": false, 434 + "notNull": true, 435 + "default": "now()" 436 + }, 437 + "xata_version": { 438 + "name": "xata_version", 439 + "type": "integer", 440 + "primaryKey": false, 441 + "notNull": false 442 + } 443 + }, 444 + "indexes": {}, 445 + "foreignKeys": { 446 + "artist_tracks_artist_id_artists_xata_id_fk": { 447 + "name": "artist_tracks_artist_id_artists_xata_id_fk", 448 + "tableFrom": "artist_tracks", 449 + "tableTo": "artists", 450 + "columnsFrom": [ 451 + "artist_id" 452 + ], 453 + "columnsTo": [ 454 + "xata_id" 455 + ], 456 + "onDelete": "no action", 457 + "onUpdate": "no action" 458 + }, 459 + "artist_tracks_track_id_tracks_xata_id_fk": { 460 + "name": "artist_tracks_track_id_tracks_xata_id_fk", 461 + "tableFrom": "artist_tracks", 462 + "tableTo": "tracks", 463 + "columnsFrom": [ 464 + "track_id" 465 + ], 466 + "columnsTo": [ 467 + "xata_id" 468 + ], 469 + "onDelete": "no action", 470 + "onUpdate": "no action" 471 + } 472 + }, 473 + "compositePrimaryKeys": {}, 474 + "uniqueConstraints": {}, 475 + "policies": {}, 476 + "checkConstraints": {}, 477 + "isRLSEnabled": false 478 + }, 479 + "public.artists": { 480 + "name": "artists", 481 + "schema": "", 482 + "columns": { 483 + "xata_id": { 484 + "name": "xata_id", 485 + "type": "text", 486 + "primaryKey": true, 487 + "notNull": true 488 + }, 489 + "name": { 490 + "name": "name", 491 + "type": "text", 492 + "primaryKey": false, 493 + "notNull": true 494 + }, 495 + "biography": { 496 + "name": "biography", 497 + "type": "text", 498 + "primaryKey": false, 499 + "notNull": false 500 + }, 501 + "born": { 502 + "name": "born", 503 + "type": "timestamp", 504 + "primaryKey": false, 505 + "notNull": false 506 + }, 507 + "born_in": { 508 + "name": "born_in", 509 + "type": "text", 510 + "primaryKey": false, 511 + "notNull": false 512 + }, 513 + "died": { 514 + "name": "died", 515 + "type": "timestamp", 516 + "primaryKey": false, 517 + "notNull": false 518 + }, 519 + "picture": { 520 + "name": "picture", 521 + "type": "text", 522 + "primaryKey": false, 523 + "notNull": false 524 + }, 525 + "sha256": { 526 + "name": "sha256", 527 + "type": "text", 528 + "primaryKey": false, 529 + "notNull": true 530 + }, 531 + "uri": { 532 + "name": "uri", 533 + "type": "text", 534 + "primaryKey": false, 535 + "notNull": false 536 + }, 537 + "apple_music_link": { 538 + "name": "apple_music_link", 539 + "type": "text", 540 + "primaryKey": false, 541 + "notNull": false 542 + }, 543 + "spotify_link": { 544 + "name": "spotify_link", 545 + "type": "text", 546 + "primaryKey": false, 547 + "notNull": false 548 + }, 549 + "tidal_link": { 550 + "name": "tidal_link", 551 + "type": "text", 552 + "primaryKey": false, 553 + "notNull": false 554 + }, 555 + "youtube_link": { 556 + "name": "youtube_link", 557 + "type": "text", 558 + "primaryKey": false, 559 + "notNull": false 560 + }, 561 + "genres": { 562 + "name": "genres", 563 + "type": "text[]", 564 + "primaryKey": false, 565 + "notNull": false 566 + }, 567 + "xata_createdat": { 568 + "name": "xata_createdat", 569 + "type": "timestamp", 570 + "primaryKey": false, 571 + "notNull": true, 572 + "default": "now()" 573 + }, 574 + "xata_updatedat": { 575 + "name": "xata_updatedat", 576 + "type": "timestamp", 577 + "primaryKey": false, 578 + "notNull": true, 579 + "default": "now()" 580 + }, 581 + "xata_version": { 582 + "name": "xata_version", 583 + "type": "integer", 584 + "primaryKey": false, 585 + "notNull": false 586 + } 587 + }, 588 + "indexes": {}, 589 + "foreignKeys": {}, 590 + "compositePrimaryKeys": {}, 591 + "uniqueConstraints": { 592 + "artists_sha256_unique": { 593 + "name": "artists_sha256_unique", 594 + "nullsNotDistinct": false, 595 + "columns": [ 596 + "sha256" 597 + ] 598 + }, 599 + "artists_uri_unique": { 600 + "name": "artists_uri_unique", 601 + "nullsNotDistinct": false, 602 + "columns": [ 603 + "uri" 604 + ] 605 + } 606 + }, 607 + "policies": {}, 608 + "checkConstraints": {}, 609 + "isRLSEnabled": false 610 + }, 611 + "public.dropbox_accounts": { 612 + "name": "dropbox_accounts", 613 + "schema": "", 614 + "columns": { 615 + "xata_id": { 616 + "name": "xata_id", 617 + "type": "text", 618 + "primaryKey": true, 619 + "notNull": true 620 + }, 621 + "email": { 622 + "name": "email", 623 + "type": "text", 624 + "primaryKey": false, 625 + "notNull": true 626 + }, 627 + "is_beta_user": { 628 + "name": "is_beta_user", 629 + "type": "boolean", 630 + "primaryKey": false, 631 + "notNull": true, 632 + "default": false 633 + }, 634 + "user_id": { 635 + "name": "user_id", 636 + "type": "text", 637 + "primaryKey": false, 638 + "notNull": true 639 + }, 640 + "xata_version": { 641 + "name": "xata_version", 642 + "type": "text", 643 + "primaryKey": false, 644 + "notNull": false 645 + }, 646 + "xata_createdat": { 647 + "name": "xata_createdat", 648 + "type": "timestamp", 649 + "primaryKey": false, 650 + "notNull": true, 651 + "default": "now()" 652 + }, 653 + "xata_updatedat": { 654 + "name": "xata_updatedat", 655 + "type": "timestamp", 656 + "primaryKey": false, 657 + "notNull": true, 658 + "default": "now()" 659 + } 660 + }, 661 + "indexes": {}, 662 + "foreignKeys": { 663 + "dropbox_accounts_user_id_users_xata_id_fk": { 664 + "name": "dropbox_accounts_user_id_users_xata_id_fk", 665 + "tableFrom": "dropbox_accounts", 666 + "tableTo": "users", 667 + "columnsFrom": [ 668 + "user_id" 669 + ], 670 + "columnsTo": [ 671 + "xata_id" 672 + ], 673 + "onDelete": "no action", 674 + "onUpdate": "no action" 675 + } 676 + }, 677 + "compositePrimaryKeys": {}, 678 + "uniqueConstraints": { 679 + "dropbox_accounts_email_unique": { 680 + "name": "dropbox_accounts_email_unique", 681 + "nullsNotDistinct": false, 682 + "columns": [ 683 + "email" 684 + ] 685 + } 686 + }, 687 + "policies": {}, 688 + "checkConstraints": {}, 689 + "isRLSEnabled": false 690 + }, 691 + "public.dropbox_directories": { 692 + "name": "dropbox_directories", 693 + "schema": "", 694 + "columns": { 695 + "xata_id": { 696 + "name": "xata_id", 697 + "type": "text", 698 + "primaryKey": true, 699 + "notNull": true 700 + }, 701 + "name": { 702 + "name": "name", 703 + "type": "text", 704 + "primaryKey": false, 705 + "notNull": true 706 + }, 707 + "path": { 708 + "name": "path", 709 + "type": "text", 710 + "primaryKey": false, 711 + "notNull": true 712 + }, 713 + "parent_id": { 714 + "name": "parent_id", 715 + "type": "text", 716 + "primaryKey": false, 717 + "notNull": false 718 + }, 719 + "dropbox_id": { 720 + "name": "dropbox_id", 721 + "type": "text", 722 + "primaryKey": false, 723 + "notNull": true 724 + }, 725 + "file_id": { 726 + "name": "file_id", 727 + "type": "text", 728 + "primaryKey": false, 729 + "notNull": true 730 + }, 731 + "xata_version": { 732 + "name": "xata_version", 733 + "type": "text", 734 + "primaryKey": false, 735 + "notNull": false 736 + }, 737 + "xata_createdat": { 738 + "name": "xata_createdat", 739 + "type": "timestamp", 740 + "primaryKey": false, 741 + "notNull": true, 742 + "default": "now()" 743 + }, 744 + "xata_updatedat": { 745 + "name": "xata_updatedat", 746 + "type": "timestamp", 747 + "primaryKey": false, 748 + "notNull": true, 749 + "default": "now()" 750 + } 751 + }, 752 + "indexes": {}, 753 + "foreignKeys": { 754 + "dropbox_directories_parent_id_dropbox_directories_xata_id_fk": { 755 + "name": "dropbox_directories_parent_id_dropbox_directories_xata_id_fk", 756 + "tableFrom": "dropbox_directories", 757 + "tableTo": "dropbox_directories", 758 + "columnsFrom": [ 759 + "parent_id" 760 + ], 761 + "columnsTo": [ 762 + "xata_id" 763 + ], 764 + "onDelete": "no action", 765 + "onUpdate": "no action" 766 + } 767 + }, 768 + "compositePrimaryKeys": {}, 769 + "uniqueConstraints": { 770 + "dropbox_directories_file_id_unique": { 771 + "name": "dropbox_directories_file_id_unique", 772 + "nullsNotDistinct": false, 773 + "columns": [ 774 + "file_id" 775 + ] 776 + } 777 + }, 778 + "policies": {}, 779 + "checkConstraints": {}, 780 + "isRLSEnabled": false 781 + }, 782 + "public.dropbox_paths": { 783 + "name": "dropbox_paths", 784 + "schema": "", 785 + "columns": { 786 + "xata_id": { 787 + "name": "xata_id", 788 + "type": "text", 789 + "primaryKey": true, 790 + "notNull": true 791 + }, 792 + "path": { 793 + "name": "path", 794 + "type": "text", 795 + "primaryKey": false, 796 + "notNull": true 797 + }, 798 + "name": { 799 + "name": "name", 800 + "type": "text", 801 + "primaryKey": false, 802 + "notNull": true 803 + }, 804 + "dropbox_id": { 805 + "name": "dropbox_id", 806 + "type": "text", 807 + "primaryKey": false, 808 + "notNull": true 809 + }, 810 + "track_id": { 811 + "name": "track_id", 812 + "type": "text", 813 + "primaryKey": false, 814 + "notNull": true 815 + }, 816 + "directory_id": { 817 + "name": "directory_id", 818 + "type": "text", 819 + "primaryKey": false, 820 + "notNull": false 821 + }, 822 + "file_id": { 823 + "name": "file_id", 824 + "type": "text", 825 + "primaryKey": false, 826 + "notNull": true 827 + }, 828 + "xata_version": { 829 + "name": "xata_version", 830 + "type": "text", 831 + "primaryKey": false, 832 + "notNull": false 833 + }, 834 + "xata_createdat": { 835 + "name": "xata_createdat", 836 + "type": "timestamp", 837 + "primaryKey": false, 838 + "notNull": true, 839 + "default": "now()" 840 + }, 841 + "xata_updatedat": { 842 + "name": "xata_updatedat", 843 + "type": "timestamp", 844 + "primaryKey": false, 845 + "notNull": true, 846 + "default": "now()" 847 + } 848 + }, 849 + "indexes": {}, 850 + "foreignKeys": { 851 + "dropbox_paths_directory_id_dropbox_directories_xata_id_fk": { 852 + "name": "dropbox_paths_directory_id_dropbox_directories_xata_id_fk", 853 + "tableFrom": "dropbox_paths", 854 + "tableTo": "dropbox_directories", 855 + "columnsFrom": [ 856 + "directory_id" 857 + ], 858 + "columnsTo": [ 859 + "xata_id" 860 + ], 861 + "onDelete": "no action", 862 + "onUpdate": "no action" 863 + } 864 + }, 865 + "compositePrimaryKeys": {}, 866 + "uniqueConstraints": { 867 + "dropbox_paths_file_id_unique": { 868 + "name": "dropbox_paths_file_id_unique", 869 + "nullsNotDistinct": false, 870 + "columns": [ 871 + "file_id" 872 + ] 873 + } 874 + }, 875 + "policies": {}, 876 + "checkConstraints": {}, 877 + "isRLSEnabled": false 878 + }, 879 + "public.dropbox_tokens": { 880 + "name": "dropbox_tokens", 881 + "schema": "", 882 + "columns": { 883 + "xata_id": { 884 + "name": "xata_id", 885 + "type": "text", 886 + "primaryKey": true, 887 + "notNull": true 888 + }, 889 + "refresh_token": { 890 + "name": "refresh_token", 891 + "type": "text", 892 + "primaryKey": false, 893 + "notNull": true 894 + }, 895 + "xata_createdat": { 896 + "name": "xata_createdat", 897 + "type": "timestamp", 898 + "primaryKey": false, 899 + "notNull": true, 900 + "default": "now()" 901 + }, 902 + "xata_updatedat": { 903 + "name": "xata_updatedat", 904 + "type": "timestamp", 905 + "primaryKey": false, 906 + "notNull": true, 907 + "default": "now()" 908 + } 909 + }, 910 + "indexes": {}, 911 + "foreignKeys": {}, 912 + "compositePrimaryKeys": {}, 913 + "uniqueConstraints": {}, 914 + "policies": {}, 915 + "checkConstraints": {}, 916 + "isRLSEnabled": false 917 + }, 918 + "public.dropbox": { 919 + "name": "dropbox", 920 + "schema": "", 921 + "columns": { 922 + "xata_id": { 923 + "name": "xata_id", 924 + "type": "text", 925 + "primaryKey": true, 926 + "notNull": true 927 + }, 928 + "user_id": { 929 + "name": "user_id", 930 + "type": "text", 931 + "primaryKey": false, 932 + "notNull": true 933 + }, 934 + "dropbox_token_id": { 935 + "name": "dropbox_token_id", 936 + "type": "text", 937 + "primaryKey": false, 938 + "notNull": true 939 + }, 940 + "xata_version": { 941 + "name": "xata_version", 942 + "type": "text", 943 + "primaryKey": false, 944 + "notNull": false 945 + }, 946 + "xata_createdat": { 947 + "name": "xata_createdat", 948 + "type": "timestamp", 949 + "primaryKey": false, 950 + "notNull": true, 951 + "default": "now()" 952 + }, 953 + "xata_updatedat": { 954 + "name": "xata_updatedat", 955 + "type": "timestamp", 956 + "primaryKey": false, 957 + "notNull": true, 958 + "default": "now()" 959 + } 960 + }, 961 + "indexes": {}, 962 + "foreignKeys": { 963 + "dropbox_user_id_users_xata_id_fk": { 964 + "name": "dropbox_user_id_users_xata_id_fk", 965 + "tableFrom": "dropbox", 966 + "tableTo": "users", 967 + "columnsFrom": [ 968 + "user_id" 969 + ], 970 + "columnsTo": [ 971 + "xata_id" 972 + ], 973 + "onDelete": "no action", 974 + "onUpdate": "no action" 975 + }, 976 + "dropbox_dropbox_token_id_dropbox_tokens_xata_id_fk": { 977 + "name": "dropbox_dropbox_token_id_dropbox_tokens_xata_id_fk", 978 + "tableFrom": "dropbox", 979 + "tableTo": "dropbox_tokens", 980 + "columnsFrom": [ 981 + "dropbox_token_id" 982 + ], 983 + "columnsTo": [ 984 + "xata_id" 985 + ], 986 + "onDelete": "no action", 987 + "onUpdate": "no action" 988 + } 989 + }, 990 + "compositePrimaryKeys": {}, 991 + "uniqueConstraints": {}, 992 + "policies": {}, 993 + "checkConstraints": {}, 994 + "isRLSEnabled": false 995 + }, 996 + "public.google_drive_accounts": { 997 + "name": "google_drive_accounts", 998 + "schema": "", 999 + "columns": { 1000 + "xata_id": { 1001 + "name": "xata_id", 1002 + "type": "text", 1003 + "primaryKey": true, 1004 + "notNull": true 1005 + }, 1006 + "email": { 1007 + "name": "email", 1008 + "type": "text", 1009 + "primaryKey": false, 1010 + "notNull": true 1011 + }, 1012 + "is_beta_user": { 1013 + "name": "is_beta_user", 1014 + "type": "boolean", 1015 + "primaryKey": false, 1016 + "notNull": true, 1017 + "default": false 1018 + }, 1019 + "user_id": { 1020 + "name": "user_id", 1021 + "type": "text", 1022 + "primaryKey": false, 1023 + "notNull": true 1024 + }, 1025 + "xata_version": { 1026 + "name": "xata_version", 1027 + "type": "text", 1028 + "primaryKey": false, 1029 + "notNull": false 1030 + }, 1031 + "xata_createdat": { 1032 + "name": "xata_createdat", 1033 + "type": "timestamp", 1034 + "primaryKey": false, 1035 + "notNull": true, 1036 + "default": "now()" 1037 + }, 1038 + "xata_updatedat": { 1039 + "name": "xata_updatedat", 1040 + "type": "timestamp", 1041 + "primaryKey": false, 1042 + "notNull": true, 1043 + "default": "now()" 1044 + } 1045 + }, 1046 + "indexes": {}, 1047 + "foreignKeys": { 1048 + "google_drive_accounts_user_id_users_xata_id_fk": { 1049 + "name": "google_drive_accounts_user_id_users_xata_id_fk", 1050 + "tableFrom": "google_drive_accounts", 1051 + "tableTo": "users", 1052 + "columnsFrom": [ 1053 + "user_id" 1054 + ], 1055 + "columnsTo": [ 1056 + "xata_id" 1057 + ], 1058 + "onDelete": "no action", 1059 + "onUpdate": "no action" 1060 + } 1061 + }, 1062 + "compositePrimaryKeys": {}, 1063 + "uniqueConstraints": { 1064 + "google_drive_accounts_email_unique": { 1065 + "name": "google_drive_accounts_email_unique", 1066 + "nullsNotDistinct": false, 1067 + "columns": [ 1068 + "email" 1069 + ] 1070 + } 1071 + }, 1072 + "policies": {}, 1073 + "checkConstraints": {}, 1074 + "isRLSEnabled": false 1075 + }, 1076 + "public.google_drive_directories": { 1077 + "name": "google_drive_directories", 1078 + "schema": "", 1079 + "columns": { 1080 + "xata_id": { 1081 + "name": "xata_id", 1082 + "type": "text", 1083 + "primaryKey": true, 1084 + "notNull": true 1085 + }, 1086 + "name": { 1087 + "name": "name", 1088 + "type": "text", 1089 + "primaryKey": false, 1090 + "notNull": true 1091 + }, 1092 + "path": { 1093 + "name": "path", 1094 + "type": "text", 1095 + "primaryKey": false, 1096 + "notNull": true 1097 + }, 1098 + "parent_id": { 1099 + "name": "parent_id", 1100 + "type": "text", 1101 + "primaryKey": false, 1102 + "notNull": false 1103 + }, 1104 + "google_drive_id": { 1105 + "name": "google_drive_id", 1106 + "type": "text", 1107 + "primaryKey": false, 1108 + "notNull": true 1109 + }, 1110 + "file_id": { 1111 + "name": "file_id", 1112 + "type": "text", 1113 + "primaryKey": false, 1114 + "notNull": true 1115 + }, 1116 + "xata_version": { 1117 + "name": "xata_version", 1118 + "type": "text", 1119 + "primaryKey": false, 1120 + "notNull": false 1121 + }, 1122 + "xata_createdat": { 1123 + "name": "xata_createdat", 1124 + "type": "timestamp", 1125 + "primaryKey": false, 1126 + "notNull": true, 1127 + "default": "now()" 1128 + }, 1129 + "xata_updatedat": { 1130 + "name": "xata_updatedat", 1131 + "type": "timestamp", 1132 + "primaryKey": false, 1133 + "notNull": true, 1134 + "default": "now()" 1135 + } 1136 + }, 1137 + "indexes": {}, 1138 + "foreignKeys": { 1139 + "google_drive_directories_parent_id_google_drive_directories_xata_id_fk": { 1140 + "name": "google_drive_directories_parent_id_google_drive_directories_xata_id_fk", 1141 + "tableFrom": "google_drive_directories", 1142 + "tableTo": "google_drive_directories", 1143 + "columnsFrom": [ 1144 + "parent_id" 1145 + ], 1146 + "columnsTo": [ 1147 + "xata_id" 1148 + ], 1149 + "onDelete": "no action", 1150 + "onUpdate": "no action" 1151 + } 1152 + }, 1153 + "compositePrimaryKeys": {}, 1154 + "uniqueConstraints": { 1155 + "google_drive_directories_file_id_unique": { 1156 + "name": "google_drive_directories_file_id_unique", 1157 + "nullsNotDistinct": false, 1158 + "columns": [ 1159 + "file_id" 1160 + ] 1161 + } 1162 + }, 1163 + "policies": {}, 1164 + "checkConstraints": {}, 1165 + "isRLSEnabled": false 1166 + }, 1167 + "public.google_drive_paths": { 1168 + "name": "google_drive_paths", 1169 + "schema": "", 1170 + "columns": { 1171 + "xata_id": { 1172 + "name": "xata_id", 1173 + "type": "text", 1174 + "primaryKey": true, 1175 + "notNull": true 1176 + }, 1177 + "google_drive_id": { 1178 + "name": "google_drive_id", 1179 + "type": "text", 1180 + "primaryKey": false, 1181 + "notNull": true 1182 + }, 1183 + "track_id": { 1184 + "name": "track_id", 1185 + "type": "text", 1186 + "primaryKey": false, 1187 + "notNull": true 1188 + }, 1189 + "name": { 1190 + "name": "name", 1191 + "type": "text", 1192 + "primaryKey": false, 1193 + "notNull": true 1194 + }, 1195 + "directory_id": { 1196 + "name": "directory_id", 1197 + "type": "text", 1198 + "primaryKey": false, 1199 + "notNull": false 1200 + }, 1201 + "file_id": { 1202 + "name": "file_id", 1203 + "type": "text", 1204 + "primaryKey": false, 1205 + "notNull": true 1206 + }, 1207 + "xata_version": { 1208 + "name": "xata_version", 1209 + "type": "text", 1210 + "primaryKey": false, 1211 + "notNull": false 1212 + }, 1213 + "xata_createdat": { 1214 + "name": "xata_createdat", 1215 + "type": "timestamp", 1216 + "primaryKey": false, 1217 + "notNull": true, 1218 + "default": "now()" 1219 + }, 1220 + "xata_updatedat": { 1221 + "name": "xata_updatedat", 1222 + "type": "timestamp", 1223 + "primaryKey": false, 1224 + "notNull": true, 1225 + "default": "now()" 1226 + } 1227 + }, 1228 + "indexes": {}, 1229 + "foreignKeys": { 1230 + "google_drive_paths_directory_id_google_drive_directories_xata_id_fk": { 1231 + "name": "google_drive_paths_directory_id_google_drive_directories_xata_id_fk", 1232 + "tableFrom": "google_drive_paths", 1233 + "tableTo": "google_drive_directories", 1234 + "columnsFrom": [ 1235 + "directory_id" 1236 + ], 1237 + "columnsTo": [ 1238 + "xata_id" 1239 + ], 1240 + "onDelete": "no action", 1241 + "onUpdate": "no action" 1242 + } 1243 + }, 1244 + "compositePrimaryKeys": {}, 1245 + "uniqueConstraints": { 1246 + "google_drive_paths_file_id_unique": { 1247 + "name": "google_drive_paths_file_id_unique", 1248 + "nullsNotDistinct": false, 1249 + "columns": [ 1250 + "file_id" 1251 + ] 1252 + } 1253 + }, 1254 + "policies": {}, 1255 + "checkConstraints": {}, 1256 + "isRLSEnabled": false 1257 + }, 1258 + "public.google_drive_tokens": { 1259 + "name": "google_drive_tokens", 1260 + "schema": "", 1261 + "columns": { 1262 + "xata_id": { 1263 + "name": "xata_id", 1264 + "type": "text", 1265 + "primaryKey": true, 1266 + "notNull": true 1267 + }, 1268 + "refresh_token": { 1269 + "name": "refresh_token", 1270 + "type": "text", 1271 + "primaryKey": false, 1272 + "notNull": true 1273 + }, 1274 + "xata_createdat": { 1275 + "name": "xata_createdat", 1276 + "type": "timestamp", 1277 + "primaryKey": false, 1278 + "notNull": true, 1279 + "default": "now()" 1280 + }, 1281 + "xata_updatedat": { 1282 + "name": "xata_updatedat", 1283 + "type": "timestamp", 1284 + "primaryKey": false, 1285 + "notNull": true, 1286 + "default": "now()" 1287 + } 1288 + }, 1289 + "indexes": {}, 1290 + "foreignKeys": {}, 1291 + "compositePrimaryKeys": {}, 1292 + "uniqueConstraints": {}, 1293 + "policies": {}, 1294 + "checkConstraints": {}, 1295 + "isRLSEnabled": false 1296 + }, 1297 + "public.google_drive": { 1298 + "name": "google_drive", 1299 + "schema": "", 1300 + "columns": { 1301 + "xata_id": { 1302 + "name": "xata_id", 1303 + "type": "text", 1304 + "primaryKey": true, 1305 + "notNull": true 1306 + }, 1307 + "google_drive_token_id": { 1308 + "name": "google_drive_token_id", 1309 + "type": "text", 1310 + "primaryKey": false, 1311 + "notNull": true 1312 + }, 1313 + "user_id": { 1314 + "name": "user_id", 1315 + "type": "text", 1316 + "primaryKey": false, 1317 + "notNull": true 1318 + }, 1319 + "xata_version": { 1320 + "name": "xata_version", 1321 + "type": "text", 1322 + "primaryKey": false, 1323 + "notNull": false 1324 + }, 1325 + "xata_createdat": { 1326 + "name": "xata_createdat", 1327 + "type": "timestamp", 1328 + "primaryKey": false, 1329 + "notNull": true, 1330 + "default": "now()" 1331 + }, 1332 + "xata_updatedat": { 1333 + "name": "xata_updatedat", 1334 + "type": "timestamp", 1335 + "primaryKey": false, 1336 + "notNull": true, 1337 + "default": "now()" 1338 + } 1339 + }, 1340 + "indexes": {}, 1341 + "foreignKeys": { 1342 + "google_drive_google_drive_token_id_google_drive_tokens_xata_id_fk": { 1343 + "name": "google_drive_google_drive_token_id_google_drive_tokens_xata_id_fk", 1344 + "tableFrom": "google_drive", 1345 + "tableTo": "google_drive_tokens", 1346 + "columnsFrom": [ 1347 + "google_drive_token_id" 1348 + ], 1349 + "columnsTo": [ 1350 + "xata_id" 1351 + ], 1352 + "onDelete": "no action", 1353 + "onUpdate": "no action" 1354 + }, 1355 + "google_drive_user_id_users_xata_id_fk": { 1356 + "name": "google_drive_user_id_users_xata_id_fk", 1357 + "tableFrom": "google_drive", 1358 + "tableTo": "users", 1359 + "columnsFrom": [ 1360 + "user_id" 1361 + ], 1362 + "columnsTo": [ 1363 + "xata_id" 1364 + ], 1365 + "onDelete": "no action", 1366 + "onUpdate": "no action" 1367 + } 1368 + }, 1369 + "compositePrimaryKeys": {}, 1370 + "uniqueConstraints": {}, 1371 + "policies": {}, 1372 + "checkConstraints": {}, 1373 + "isRLSEnabled": false 1374 + }, 1375 + "public.loved_tracks": { 1376 + "name": "loved_tracks", 1377 + "schema": "", 1378 + "columns": { 1379 + "xata_id": { 1380 + "name": "xata_id", 1381 + "type": "text", 1382 + "primaryKey": true, 1383 + "notNull": true 1384 + }, 1385 + "user_id": { 1386 + "name": "user_id", 1387 + "type": "text", 1388 + "primaryKey": false, 1389 + "notNull": true 1390 + }, 1391 + "track_id": { 1392 + "name": "track_id", 1393 + "type": "text", 1394 + "primaryKey": false, 1395 + "notNull": true 1396 + }, 1397 + "uri": { 1398 + "name": "uri", 1399 + "type": "text", 1400 + "primaryKey": false, 1401 + "notNull": false 1402 + }, 1403 + "xata_createdat": { 1404 + "name": "xata_createdat", 1405 + "type": "timestamp", 1406 + "primaryKey": false, 1407 + "notNull": true, 1408 + "default": "now()" 1409 + } 1410 + }, 1411 + "indexes": {}, 1412 + "foreignKeys": { 1413 + "loved_tracks_user_id_users_xata_id_fk": { 1414 + "name": "loved_tracks_user_id_users_xata_id_fk", 1415 + "tableFrom": "loved_tracks", 1416 + "tableTo": "users", 1417 + "columnsFrom": [ 1418 + "user_id" 1419 + ], 1420 + "columnsTo": [ 1421 + "xata_id" 1422 + ], 1423 + "onDelete": "no action", 1424 + "onUpdate": "no action" 1425 + }, 1426 + "loved_tracks_track_id_tracks_xata_id_fk": { 1427 + "name": "loved_tracks_track_id_tracks_xata_id_fk", 1428 + "tableFrom": "loved_tracks", 1429 + "tableTo": "tracks", 1430 + "columnsFrom": [ 1431 + "track_id" 1432 + ], 1433 + "columnsTo": [ 1434 + "xata_id" 1435 + ], 1436 + "onDelete": "no action", 1437 + "onUpdate": "no action" 1438 + } 1439 + }, 1440 + "compositePrimaryKeys": {}, 1441 + "uniqueConstraints": { 1442 + "loved_tracks_uri_unique": { 1443 + "name": "loved_tracks_uri_unique", 1444 + "nullsNotDistinct": false, 1445 + "columns": [ 1446 + "uri" 1447 + ] 1448 + } 1449 + }, 1450 + "policies": {}, 1451 + "checkConstraints": {}, 1452 + "isRLSEnabled": false 1453 + }, 1454 + "public.playlist_tracks": { 1455 + "name": "playlist_tracks", 1456 + "schema": "", 1457 + "columns": { 1458 + "xata_id": { 1459 + "name": "xata_id", 1460 + "type": "text", 1461 + "primaryKey": true, 1462 + "notNull": true 1463 + }, 1464 + "playlist_id": { 1465 + "name": "playlist_id", 1466 + "type": "text", 1467 + "primaryKey": false, 1468 + "notNull": true 1469 + }, 1470 + "track_id": { 1471 + "name": "track_id", 1472 + "type": "text", 1473 + "primaryKey": false, 1474 + "notNull": true 1475 + }, 1476 + "xata_createdat": { 1477 + "name": "xata_createdat", 1478 + "type": "timestamp", 1479 + "primaryKey": false, 1480 + "notNull": true, 1481 + "default": "now()" 1482 + } 1483 + }, 1484 + "indexes": {}, 1485 + "foreignKeys": { 1486 + "playlist_tracks_playlist_id_playlists_xata_id_fk": { 1487 + "name": "playlist_tracks_playlist_id_playlists_xata_id_fk", 1488 + "tableFrom": "playlist_tracks", 1489 + "tableTo": "playlists", 1490 + "columnsFrom": [ 1491 + "playlist_id" 1492 + ], 1493 + "columnsTo": [ 1494 + "xata_id" 1495 + ], 1496 + "onDelete": "no action", 1497 + "onUpdate": "no action" 1498 + }, 1499 + "playlist_tracks_track_id_tracks_xata_id_fk": { 1500 + "name": "playlist_tracks_track_id_tracks_xata_id_fk", 1501 + "tableFrom": "playlist_tracks", 1502 + "tableTo": "tracks", 1503 + "columnsFrom": [ 1504 + "track_id" 1505 + ], 1506 + "columnsTo": [ 1507 + "xata_id" 1508 + ], 1509 + "onDelete": "no action", 1510 + "onUpdate": "no action" 1511 + } 1512 + }, 1513 + "compositePrimaryKeys": {}, 1514 + "uniqueConstraints": {}, 1515 + "policies": {}, 1516 + "checkConstraints": {}, 1517 + "isRLSEnabled": false 1518 + }, 1519 + "public.playlists": { 1520 + "name": "playlists", 1521 + "schema": "", 1522 + "columns": { 1523 + "xata_id": { 1524 + "name": "xata_id", 1525 + "type": "text", 1526 + "primaryKey": true, 1527 + "notNull": true 1528 + }, 1529 + "name": { 1530 + "name": "name", 1531 + "type": "text", 1532 + "primaryKey": false, 1533 + "notNull": true 1534 + }, 1535 + "picture": { 1536 + "name": "picture", 1537 + "type": "text", 1538 + "primaryKey": false, 1539 + "notNull": false 1540 + }, 1541 + "description": { 1542 + "name": "description", 1543 + "type": "text", 1544 + "primaryKey": false, 1545 + "notNull": false 1546 + }, 1547 + "uri": { 1548 + "name": "uri", 1549 + "type": "text", 1550 + "primaryKey": false, 1551 + "notNull": false 1552 + }, 1553 + "spotify_link": { 1554 + "name": "spotify_link", 1555 + "type": "text", 1556 + "primaryKey": false, 1557 + "notNull": false 1558 + }, 1559 + "tidal_link": { 1560 + "name": "tidal_link", 1561 + "type": "text", 1562 + "primaryKey": false, 1563 + "notNull": false 1564 + }, 1565 + "apple_music_link": { 1566 + "name": "apple_music_link", 1567 + "type": "text", 1568 + "primaryKey": false, 1569 + "notNull": false 1570 + }, 1571 + "created_by": { 1572 + "name": "created_by", 1573 + "type": "text", 1574 + "primaryKey": false, 1575 + "notNull": true 1576 + }, 1577 + "xata_createdat": { 1578 + "name": "xata_createdat", 1579 + "type": "timestamp", 1580 + "primaryKey": false, 1581 + "notNull": true, 1582 + "default": "now()" 1583 + }, 1584 + "xata_updatedat": { 1585 + "name": "xata_updatedat", 1586 + "type": "timestamp", 1587 + "primaryKey": false, 1588 + "notNull": true, 1589 + "default": "now()" 1590 + } 1591 + }, 1592 + "indexes": {}, 1593 + "foreignKeys": { 1594 + "playlists_created_by_users_xata_id_fk": { 1595 + "name": "playlists_created_by_users_xata_id_fk", 1596 + "tableFrom": "playlists", 1597 + "tableTo": "users", 1598 + "columnsFrom": [ 1599 + "created_by" 1600 + ], 1601 + "columnsTo": [ 1602 + "xata_id" 1603 + ], 1604 + "onDelete": "no action", 1605 + "onUpdate": "no action" 1606 + } 1607 + }, 1608 + "compositePrimaryKeys": {}, 1609 + "uniqueConstraints": { 1610 + "playlists_uri_unique": { 1611 + "name": "playlists_uri_unique", 1612 + "nullsNotDistinct": false, 1613 + "columns": [ 1614 + "uri" 1615 + ] 1616 + } 1617 + }, 1618 + "policies": {}, 1619 + "checkConstraints": {}, 1620 + "isRLSEnabled": false 1621 + }, 1622 + "public.profile_shouts": { 1623 + "name": "profile_shouts", 1624 + "schema": "", 1625 + "columns": { 1626 + "xata_id": { 1627 + "name": "xata_id", 1628 + "type": "text", 1629 + "primaryKey": true, 1630 + "notNull": true 1631 + }, 1632 + "user_id": { 1633 + "name": "user_id", 1634 + "type": "text", 1635 + "primaryKey": false, 1636 + "notNull": true 1637 + }, 1638 + "shout_id": { 1639 + "name": "shout_id", 1640 + "type": "text", 1641 + "primaryKey": false, 1642 + "notNull": true 1643 + }, 1644 + "xata_createdat": { 1645 + "name": "xata_createdat", 1646 + "type": "timestamp", 1647 + "primaryKey": false, 1648 + "notNull": true, 1649 + "default": "now()" 1650 + } 1651 + }, 1652 + "indexes": {}, 1653 + "foreignKeys": { 1654 + "profile_shouts_user_id_users_xata_id_fk": { 1655 + "name": "profile_shouts_user_id_users_xata_id_fk", 1656 + "tableFrom": "profile_shouts", 1657 + "tableTo": "users", 1658 + "columnsFrom": [ 1659 + "user_id" 1660 + ], 1661 + "columnsTo": [ 1662 + "xata_id" 1663 + ], 1664 + "onDelete": "no action", 1665 + "onUpdate": "no action" 1666 + }, 1667 + "profile_shouts_shout_id_shouts_xata_id_fk": { 1668 + "name": "profile_shouts_shout_id_shouts_xata_id_fk", 1669 + "tableFrom": "profile_shouts", 1670 + "tableTo": "shouts", 1671 + "columnsFrom": [ 1672 + "shout_id" 1673 + ], 1674 + "columnsTo": [ 1675 + "xata_id" 1676 + ], 1677 + "onDelete": "no action", 1678 + "onUpdate": "no action" 1679 + } 1680 + }, 1681 + "compositePrimaryKeys": {}, 1682 + "uniqueConstraints": {}, 1683 + "policies": {}, 1684 + "checkConstraints": {}, 1685 + "isRLSEnabled": false 1686 + }, 1687 + "public.queue_tracks": { 1688 + "name": "queue_tracks", 1689 + "schema": "", 1690 + "columns": { 1691 + "xata_id": { 1692 + "name": "xata_id", 1693 + "type": "text", 1694 + "primaryKey": true, 1695 + "notNull": true 1696 + }, 1697 + "user_id": { 1698 + "name": "user_id", 1699 + "type": "text", 1700 + "primaryKey": false, 1701 + "notNull": true 1702 + }, 1703 + "track_id": { 1704 + "name": "track_id", 1705 + "type": "text", 1706 + "primaryKey": false, 1707 + "notNull": true 1708 + }, 1709 + "position": { 1710 + "name": "position", 1711 + "type": "integer", 1712 + "primaryKey": false, 1713 + "notNull": true 1714 + }, 1715 + "file_uri": { 1716 + "name": "file_uri", 1717 + "type": "text", 1718 + "primaryKey": false, 1719 + "notNull": true 1720 + }, 1721 + "xata_version": { 1722 + "name": "xata_version", 1723 + "type": "integer", 1724 + "primaryKey": false, 1725 + "notNull": true, 1726 + "default": 0 1727 + }, 1728 + "xata_createdat": { 1729 + "name": "xata_createdat", 1730 + "type": "timestamp", 1731 + "primaryKey": false, 1732 + "notNull": true, 1733 + "default": "now()" 1734 + }, 1735 + "xata_updatedat": { 1736 + "name": "xata_updatedat", 1737 + "type": "timestamp", 1738 + "primaryKey": false, 1739 + "notNull": true, 1740 + "default": "now()" 1741 + } 1742 + }, 1743 + "indexes": {}, 1744 + "foreignKeys": { 1745 + "queue_tracks_user_id_users_xata_id_fk": { 1746 + "name": "queue_tracks_user_id_users_xata_id_fk", 1747 + "tableFrom": "queue_tracks", 1748 + "tableTo": "users", 1749 + "columnsFrom": [ 1750 + "user_id" 1751 + ], 1752 + "columnsTo": [ 1753 + "xata_id" 1754 + ], 1755 + "onDelete": "no action", 1756 + "onUpdate": "no action" 1757 + }, 1758 + "queue_tracks_track_id_tracks_xata_id_fk": { 1759 + "name": "queue_tracks_track_id_tracks_xata_id_fk", 1760 + "tableFrom": "queue_tracks", 1761 + "tableTo": "tracks", 1762 + "columnsFrom": [ 1763 + "track_id" 1764 + ], 1765 + "columnsTo": [ 1766 + "xata_id" 1767 + ], 1768 + "onDelete": "no action", 1769 + "onUpdate": "no action" 1770 + } 1771 + }, 1772 + "compositePrimaryKeys": {}, 1773 + "uniqueConstraints": {}, 1774 + "policies": {}, 1775 + "checkConstraints": {}, 1776 + "isRLSEnabled": false 1777 + }, 1778 + "public.scrobbles": { 1779 + "name": "scrobbles", 1780 + "schema": "", 1781 + "columns": { 1782 + "xata_id": { 1783 + "name": "xata_id", 1784 + "type": "text", 1785 + "primaryKey": true, 1786 + "notNull": true 1787 + }, 1788 + "user_id": { 1789 + "name": "user_id", 1790 + "type": "text", 1791 + "primaryKey": false, 1792 + "notNull": false 1793 + }, 1794 + "track_id": { 1795 + "name": "track_id", 1796 + "type": "text", 1797 + "primaryKey": false, 1798 + "notNull": false 1799 + }, 1800 + "album_id": { 1801 + "name": "album_id", 1802 + "type": "text", 1803 + "primaryKey": false, 1804 + "notNull": false 1805 + }, 1806 + "artist_id": { 1807 + "name": "artist_id", 1808 + "type": "text", 1809 + "primaryKey": false, 1810 + "notNull": false 1811 + }, 1812 + "uri": { 1813 + "name": "uri", 1814 + "type": "text", 1815 + "primaryKey": false, 1816 + "notNull": false 1817 + }, 1818 + "xata_createdat": { 1819 + "name": "xata_createdat", 1820 + "type": "timestamp", 1821 + "primaryKey": false, 1822 + "notNull": true, 1823 + "default": "now()" 1824 + }, 1825 + "xata_updatedat": { 1826 + "name": "xata_updatedat", 1827 + "type": "timestamp", 1828 + "primaryKey": false, 1829 + "notNull": true, 1830 + "default": "now()" 1831 + }, 1832 + "xata_version": { 1833 + "name": "xata_version", 1834 + "type": "integer", 1835 + "primaryKey": false, 1836 + "notNull": false 1837 + }, 1838 + "timestamp": { 1839 + "name": "timestamp", 1840 + "type": "timestamp", 1841 + "primaryKey": false, 1842 + "notNull": true, 1843 + "default": "now()" 1844 + } 1845 + }, 1846 + "indexes": {}, 1847 + "foreignKeys": { 1848 + "scrobbles_user_id_users_xata_id_fk": { 1849 + "name": "scrobbles_user_id_users_xata_id_fk", 1850 + "tableFrom": "scrobbles", 1851 + "tableTo": "users", 1852 + "columnsFrom": [ 1853 + "user_id" 1854 + ], 1855 + "columnsTo": [ 1856 + "xata_id" 1857 + ], 1858 + "onDelete": "no action", 1859 + "onUpdate": "no action" 1860 + }, 1861 + "scrobbles_track_id_tracks_xata_id_fk": { 1862 + "name": "scrobbles_track_id_tracks_xata_id_fk", 1863 + "tableFrom": "scrobbles", 1864 + "tableTo": "tracks", 1865 + "columnsFrom": [ 1866 + "track_id" 1867 + ], 1868 + "columnsTo": [ 1869 + "xata_id" 1870 + ], 1871 + "onDelete": "no action", 1872 + "onUpdate": "no action" 1873 + }, 1874 + "scrobbles_album_id_albums_xata_id_fk": { 1875 + "name": "scrobbles_album_id_albums_xata_id_fk", 1876 + "tableFrom": "scrobbles", 1877 + "tableTo": "albums", 1878 + "columnsFrom": [ 1879 + "album_id" 1880 + ], 1881 + "columnsTo": [ 1882 + "xata_id" 1883 + ], 1884 + "onDelete": "no action", 1885 + "onUpdate": "no action" 1886 + }, 1887 + "scrobbles_artist_id_artists_xata_id_fk": { 1888 + "name": "scrobbles_artist_id_artists_xata_id_fk", 1889 + "tableFrom": "scrobbles", 1890 + "tableTo": "artists", 1891 + "columnsFrom": [ 1892 + "artist_id" 1893 + ], 1894 + "columnsTo": [ 1895 + "xata_id" 1896 + ], 1897 + "onDelete": "no action", 1898 + "onUpdate": "no action" 1899 + } 1900 + }, 1901 + "compositePrimaryKeys": {}, 1902 + "uniqueConstraints": { 1903 + "scrobbles_uri_unique": { 1904 + "name": "scrobbles_uri_unique", 1905 + "nullsNotDistinct": false, 1906 + "columns": [ 1907 + "uri" 1908 + ] 1909 + } 1910 + }, 1911 + "policies": {}, 1912 + "checkConstraints": {}, 1913 + "isRLSEnabled": false 1914 + }, 1915 + "public.shout_likes": { 1916 + "name": "shout_likes", 1917 + "schema": "", 1918 + "columns": { 1919 + "xata_id": { 1920 + "name": "xata_id", 1921 + "type": "text", 1922 + "primaryKey": true, 1923 + "notNull": true 1924 + }, 1925 + "user_id": { 1926 + "name": "user_id", 1927 + "type": "text", 1928 + "primaryKey": false, 1929 + "notNull": true 1930 + }, 1931 + "shout_id": { 1932 + "name": "shout_id", 1933 + "type": "text", 1934 + "primaryKey": false, 1935 + "notNull": true 1936 + }, 1937 + "xata_createdat": { 1938 + "name": "xata_createdat", 1939 + "type": "timestamp", 1940 + "primaryKey": false, 1941 + "notNull": true, 1942 + "default": "now()" 1943 + }, 1944 + "uri": { 1945 + "name": "uri", 1946 + "type": "text", 1947 + "primaryKey": false, 1948 + "notNull": true 1949 + } 1950 + }, 1951 + "indexes": {}, 1952 + "foreignKeys": { 1953 + "shout_likes_user_id_users_xata_id_fk": { 1954 + "name": "shout_likes_user_id_users_xata_id_fk", 1955 + "tableFrom": "shout_likes", 1956 + "tableTo": "users", 1957 + "columnsFrom": [ 1958 + "user_id" 1959 + ], 1960 + "columnsTo": [ 1961 + "xata_id" 1962 + ], 1963 + "onDelete": "no action", 1964 + "onUpdate": "no action" 1965 + }, 1966 + "shout_likes_shout_id_shouts_xata_id_fk": { 1967 + "name": "shout_likes_shout_id_shouts_xata_id_fk", 1968 + "tableFrom": "shout_likes", 1969 + "tableTo": "shouts", 1970 + "columnsFrom": [ 1971 + "shout_id" 1972 + ], 1973 + "columnsTo": [ 1974 + "xata_id" 1975 + ], 1976 + "onDelete": "no action", 1977 + "onUpdate": "no action" 1978 + } 1979 + }, 1980 + "compositePrimaryKeys": {}, 1981 + "uniqueConstraints": { 1982 + "shout_likes_uri_unique": { 1983 + "name": "shout_likes_uri_unique", 1984 + "nullsNotDistinct": false, 1985 + "columns": [ 1986 + "uri" 1987 + ] 1988 + } 1989 + }, 1990 + "policies": {}, 1991 + "checkConstraints": {}, 1992 + "isRLSEnabled": false 1993 + }, 1994 + "public.shout_reports": { 1995 + "name": "shout_reports", 1996 + "schema": "", 1997 + "columns": { 1998 + "xata_id": { 1999 + "name": "xata_id", 2000 + "type": "text", 2001 + "primaryKey": true, 2002 + "notNull": true 2003 + }, 2004 + "user_id": { 2005 + "name": "user_id", 2006 + "type": "text", 2007 + "primaryKey": false, 2008 + "notNull": true 2009 + }, 2010 + "shout_id": { 2011 + "name": "shout_id", 2012 + "type": "text", 2013 + "primaryKey": false, 2014 + "notNull": true 2015 + }, 2016 + "xata_createdat": { 2017 + "name": "xata_createdat", 2018 + "type": "timestamp", 2019 + "primaryKey": false, 2020 + "notNull": true, 2021 + "default": "now()" 2022 + } 2023 + }, 2024 + "indexes": {}, 2025 + "foreignKeys": { 2026 + "shout_reports_user_id_users_xata_id_fk": { 2027 + "name": "shout_reports_user_id_users_xata_id_fk", 2028 + "tableFrom": "shout_reports", 2029 + "tableTo": "users", 2030 + "columnsFrom": [ 2031 + "user_id" 2032 + ], 2033 + "columnsTo": [ 2034 + "xata_id" 2035 + ], 2036 + "onDelete": "no action", 2037 + "onUpdate": "no action" 2038 + }, 2039 + "shout_reports_shout_id_shouts_xata_id_fk": { 2040 + "name": "shout_reports_shout_id_shouts_xata_id_fk", 2041 + "tableFrom": "shout_reports", 2042 + "tableTo": "shouts", 2043 + "columnsFrom": [ 2044 + "shout_id" 2045 + ], 2046 + "columnsTo": [ 2047 + "xata_id" 2048 + ], 2049 + "onDelete": "no action", 2050 + "onUpdate": "no action" 2051 + } 2052 + }, 2053 + "compositePrimaryKeys": {}, 2054 + "uniqueConstraints": {}, 2055 + "policies": {}, 2056 + "checkConstraints": {}, 2057 + "isRLSEnabled": false 2058 + }, 2059 + "public.shouts": { 2060 + "name": "shouts", 2061 + "schema": "", 2062 + "columns": { 2063 + "xata_id": { 2064 + "name": "xata_id", 2065 + "type": "text", 2066 + "primaryKey": true, 2067 + "notNull": true 2068 + }, 2069 + "content": { 2070 + "name": "content", 2071 + "type": "text", 2072 + "primaryKey": false, 2073 + "notNull": true 2074 + }, 2075 + "track_id": { 2076 + "name": "track_id", 2077 + "type": "text", 2078 + "primaryKey": false, 2079 + "notNull": false 2080 + }, 2081 + "artist_id": { 2082 + "name": "artist_id", 2083 + "type": "text", 2084 + "primaryKey": false, 2085 + "notNull": false 2086 + }, 2087 + "album_id": { 2088 + "name": "album_id", 2089 + "type": "text", 2090 + "primaryKey": false, 2091 + "notNull": false 2092 + }, 2093 + "scrobble_id": { 2094 + "name": "scrobble_id", 2095 + "type": "text", 2096 + "primaryKey": false, 2097 + "notNull": false 2098 + }, 2099 + "uri": { 2100 + "name": "uri", 2101 + "type": "text", 2102 + "primaryKey": false, 2103 + "notNull": true 2104 + }, 2105 + "author_id": { 2106 + "name": "author_id", 2107 + "type": "text", 2108 + "primaryKey": false, 2109 + "notNull": true 2110 + }, 2111 + "parent_id": { 2112 + "name": "parent_id", 2113 + "type": "text", 2114 + "primaryKey": false, 2115 + "notNull": false 2116 + }, 2117 + "xata_createdat": { 2118 + "name": "xata_createdat", 2119 + "type": "timestamp", 2120 + "primaryKey": false, 2121 + "notNull": true, 2122 + "default": "now()" 2123 + }, 2124 + "xata_updatedat": { 2125 + "name": "xata_updatedat", 2126 + "type": "timestamp", 2127 + "primaryKey": false, 2128 + "notNull": true, 2129 + "default": "now()" 2130 + } 2131 + }, 2132 + "indexes": {}, 2133 + "foreignKeys": { 2134 + "shouts_track_id_tracks_xata_id_fk": { 2135 + "name": "shouts_track_id_tracks_xata_id_fk", 2136 + "tableFrom": "shouts", 2137 + "tableTo": "tracks", 2138 + "columnsFrom": [ 2139 + "track_id" 2140 + ], 2141 + "columnsTo": [ 2142 + "xata_id" 2143 + ], 2144 + "onDelete": "no action", 2145 + "onUpdate": "no action" 2146 + }, 2147 + "shouts_artist_id_users_xata_id_fk": { 2148 + "name": "shouts_artist_id_users_xata_id_fk", 2149 + "tableFrom": "shouts", 2150 + "tableTo": "users", 2151 + "columnsFrom": [ 2152 + "artist_id" 2153 + ], 2154 + "columnsTo": [ 2155 + "xata_id" 2156 + ], 2157 + "onDelete": "no action", 2158 + "onUpdate": "no action" 2159 + }, 2160 + "shouts_album_id_albums_xata_id_fk": { 2161 + "name": "shouts_album_id_albums_xata_id_fk", 2162 + "tableFrom": "shouts", 2163 + "tableTo": "albums", 2164 + "columnsFrom": [ 2165 + "album_id" 2166 + ], 2167 + "columnsTo": [ 2168 + "xata_id" 2169 + ], 2170 + "onDelete": "no action", 2171 + "onUpdate": "no action" 2172 + }, 2173 + "shouts_scrobble_id_scrobbles_xata_id_fk": { 2174 + "name": "shouts_scrobble_id_scrobbles_xata_id_fk", 2175 + "tableFrom": "shouts", 2176 + "tableTo": "scrobbles", 2177 + "columnsFrom": [ 2178 + "scrobble_id" 2179 + ], 2180 + "columnsTo": [ 2181 + "xata_id" 2182 + ], 2183 + "onDelete": "no action", 2184 + "onUpdate": "no action" 2185 + }, 2186 + "shouts_author_id_users_xata_id_fk": { 2187 + "name": "shouts_author_id_users_xata_id_fk", 2188 + "tableFrom": "shouts", 2189 + "tableTo": "users", 2190 + "columnsFrom": [ 2191 + "author_id" 2192 + ], 2193 + "columnsTo": [ 2194 + "xata_id" 2195 + ], 2196 + "onDelete": "no action", 2197 + "onUpdate": "no action" 2198 + }, 2199 + "shouts_parent_id_shouts_xata_id_fk": { 2200 + "name": "shouts_parent_id_shouts_xata_id_fk", 2201 + "tableFrom": "shouts", 2202 + "tableTo": "shouts", 2203 + "columnsFrom": [ 2204 + "parent_id" 2205 + ], 2206 + "columnsTo": [ 2207 + "xata_id" 2208 + ], 2209 + "onDelete": "no action", 2210 + "onUpdate": "no action" 2211 + } 2212 + }, 2213 + "compositePrimaryKeys": {}, 2214 + "uniqueConstraints": { 2215 + "shouts_uri_unique": { 2216 + "name": "shouts_uri_unique", 2217 + "nullsNotDistinct": false, 2218 + "columns": [ 2219 + "uri" 2220 + ] 2221 + } 2222 + }, 2223 + "policies": {}, 2224 + "checkConstraints": {}, 2225 + "isRLSEnabled": false 2226 + }, 2227 + "public.spotify_accounts": { 2228 + "name": "spotify_accounts", 2229 + "schema": "", 2230 + "columns": { 2231 + "xata_id": { 2232 + "name": "xata_id", 2233 + "type": "text", 2234 + "primaryKey": true, 2235 + "notNull": true 2236 + }, 2237 + "xata_version": { 2238 + "name": "xata_version", 2239 + "type": "integer", 2240 + "primaryKey": false, 2241 + "notNull": false 2242 + }, 2243 + "email": { 2244 + "name": "email", 2245 + "type": "text", 2246 + "primaryKey": false, 2247 + "notNull": true 2248 + }, 2249 + "user_id": { 2250 + "name": "user_id", 2251 + "type": "text", 2252 + "primaryKey": false, 2253 + "notNull": true 2254 + }, 2255 + "is_beta_user": { 2256 + "name": "is_beta_user", 2257 + "type": "boolean", 2258 + "primaryKey": false, 2259 + "notNull": true, 2260 + "default": false 2261 + }, 2262 + "xata_createdat": { 2263 + "name": "xata_createdat", 2264 + "type": "timestamp", 2265 + "primaryKey": false, 2266 + "notNull": true, 2267 + "default": "now()" 2268 + }, 2269 + "xata_updatedat": { 2270 + "name": "xata_updatedat", 2271 + "type": "timestamp", 2272 + "primaryKey": false, 2273 + "notNull": true, 2274 + "default": "now()" 2275 + } 2276 + }, 2277 + "indexes": {}, 2278 + "foreignKeys": { 2279 + "spotify_accounts_user_id_users_xata_id_fk": { 2280 + "name": "spotify_accounts_user_id_users_xata_id_fk", 2281 + "tableFrom": "spotify_accounts", 2282 + "tableTo": "users", 2283 + "columnsFrom": [ 2284 + "user_id" 2285 + ], 2286 + "columnsTo": [ 2287 + "xata_id" 2288 + ], 2289 + "onDelete": "no action", 2290 + "onUpdate": "no action" 2291 + } 2292 + }, 2293 + "compositePrimaryKeys": {}, 2294 + "uniqueConstraints": {}, 2295 + "policies": {}, 2296 + "checkConstraints": {}, 2297 + "isRLSEnabled": false 2298 + }, 2299 + "public.spotify_tokens": { 2300 + "name": "spotify_tokens", 2301 + "schema": "", 2302 + "columns": { 2303 + "xata_id": { 2304 + "name": "xata_id", 2305 + "type": "text", 2306 + "primaryKey": true, 2307 + "notNull": true 2308 + }, 2309 + "xata_version": { 2310 + "name": "xata_version", 2311 + "type": "integer", 2312 + "primaryKey": false, 2313 + "notNull": false 2314 + }, 2315 + "access_token": { 2316 + "name": "access_token", 2317 + "type": "text", 2318 + "primaryKey": false, 2319 + "notNull": true 2320 + }, 2321 + "refresh_token": { 2322 + "name": "refresh_token", 2323 + "type": "text", 2324 + "primaryKey": false, 2325 + "notNull": true 2326 + }, 2327 + "user_id": { 2328 + "name": "user_id", 2329 + "type": "text", 2330 + "primaryKey": false, 2331 + "notNull": true 2332 + }, 2333 + "xata_createdat": { 2334 + "name": "xata_createdat", 2335 + "type": "timestamp", 2336 + "primaryKey": false, 2337 + "notNull": true, 2338 + "default": "now()" 2339 + }, 2340 + "xata_updatedat": { 2341 + "name": "xata_updatedat", 2342 + "type": "timestamp", 2343 + "primaryKey": false, 2344 + "notNull": true, 2345 + "default": "now()" 2346 + } 2347 + }, 2348 + "indexes": {}, 2349 + "foreignKeys": { 2350 + "spotify_tokens_user_id_users_xata_id_fk": { 2351 + "name": "spotify_tokens_user_id_users_xata_id_fk", 2352 + "tableFrom": "spotify_tokens", 2353 + "tableTo": "users", 2354 + "columnsFrom": [ 2355 + "user_id" 2356 + ], 2357 + "columnsTo": [ 2358 + "xata_id" 2359 + ], 2360 + "onDelete": "no action", 2361 + "onUpdate": "no action" 2362 + } 2363 + }, 2364 + "compositePrimaryKeys": {}, 2365 + "uniqueConstraints": {}, 2366 + "policies": {}, 2367 + "checkConstraints": {}, 2368 + "isRLSEnabled": false 2369 + }, 2370 + "public.tracks": { 2371 + "name": "tracks", 2372 + "schema": "", 2373 + "columns": { 2374 + "xata_id": { 2375 + "name": "xata_id", 2376 + "type": "text", 2377 + "primaryKey": true, 2378 + "notNull": true 2379 + }, 2380 + "title": { 2381 + "name": "title", 2382 + "type": "text", 2383 + "primaryKey": false, 2384 + "notNull": true 2385 + }, 2386 + "artist": { 2387 + "name": "artist", 2388 + "type": "text", 2389 + "primaryKey": false, 2390 + "notNull": true 2391 + }, 2392 + "album_artist": { 2393 + "name": "album_artist", 2394 + "type": "text", 2395 + "primaryKey": false, 2396 + "notNull": true 2397 + }, 2398 + "album_art": { 2399 + "name": "album_art", 2400 + "type": "text", 2401 + "primaryKey": false, 2402 + "notNull": false 2403 + }, 2404 + "album": { 2405 + "name": "album", 2406 + "type": "text", 2407 + "primaryKey": false, 2408 + "notNull": true 2409 + }, 2410 + "track_number": { 2411 + "name": "track_number", 2412 + "type": "integer", 2413 + "primaryKey": false, 2414 + "notNull": false 2415 + }, 2416 + "duration": { 2417 + "name": "duration", 2418 + "type": "integer", 2419 + "primaryKey": false, 2420 + "notNull": true 2421 + }, 2422 + "mb_id": { 2423 + "name": "mb_id", 2424 + "type": "text", 2425 + "primaryKey": false, 2426 + "notNull": false 2427 + }, 2428 + "youtube_link": { 2429 + "name": "youtube_link", 2430 + "type": "text", 2431 + "primaryKey": false, 2432 + "notNull": false 2433 + }, 2434 + "spotify_link": { 2435 + "name": "spotify_link", 2436 + "type": "text", 2437 + "primaryKey": false, 2438 + "notNull": false 2439 + }, 2440 + "apple_music_link": { 2441 + "name": "apple_music_link", 2442 + "type": "text", 2443 + "primaryKey": false, 2444 + "notNull": false 2445 + }, 2446 + "tidal_link": { 2447 + "name": "tidal_link", 2448 + "type": "text", 2449 + "primaryKey": false, 2450 + "notNull": false 2451 + }, 2452 + "sha256": { 2453 + "name": "sha256", 2454 + "type": "text", 2455 + "primaryKey": false, 2456 + "notNull": true 2457 + }, 2458 + "disc_number": { 2459 + "name": "disc_number", 2460 + "type": "integer", 2461 + "primaryKey": false, 2462 + "notNull": false 2463 + }, 2464 + "lyrics": { 2465 + "name": "lyrics", 2466 + "type": "text", 2467 + "primaryKey": false, 2468 + "notNull": false 2469 + }, 2470 + "composer": { 2471 + "name": "composer", 2472 + "type": "text", 2473 + "primaryKey": false, 2474 + "notNull": false 2475 + }, 2476 + "genre": { 2477 + "name": "genre", 2478 + "type": "text", 2479 + "primaryKey": false, 2480 + "notNull": false 2481 + }, 2482 + "label": { 2483 + "name": "label", 2484 + "type": "text", 2485 + "primaryKey": false, 2486 + "notNull": false 2487 + }, 2488 + "copyright_message": { 2489 + "name": "copyright_message", 2490 + "type": "text", 2491 + "primaryKey": false, 2492 + "notNull": false 2493 + }, 2494 + "uri": { 2495 + "name": "uri", 2496 + "type": "text", 2497 + "primaryKey": false, 2498 + "notNull": false 2499 + }, 2500 + "album_uri": { 2501 + "name": "album_uri", 2502 + "type": "text", 2503 + "primaryKey": false, 2504 + "notNull": false 2505 + }, 2506 + "artist_uri": { 2507 + "name": "artist_uri", 2508 + "type": "text", 2509 + "primaryKey": false, 2510 + "notNull": false 2511 + }, 2512 + "xata_createdat": { 2513 + "name": "xata_createdat", 2514 + "type": "timestamp", 2515 + "primaryKey": false, 2516 + "notNull": true, 2517 + "default": "now()" 2518 + }, 2519 + "xata_updatedat": { 2520 + "name": "xata_updatedat", 2521 + "type": "timestamp", 2522 + "primaryKey": false, 2523 + "notNull": true, 2524 + "default": "now()" 2525 + }, 2526 + "xata_version": { 2527 + "name": "xata_version", 2528 + "type": "integer", 2529 + "primaryKey": false, 2530 + "notNull": false 2531 + } 2532 + }, 2533 + "indexes": {}, 2534 + "foreignKeys": {}, 2535 + "compositePrimaryKeys": {}, 2536 + "uniqueConstraints": { 2537 + "tracks_mb_id_unique": { 2538 + "name": "tracks_mb_id_unique", 2539 + "nullsNotDistinct": false, 2540 + "columns": [ 2541 + "mb_id" 2542 + ] 2543 + }, 2544 + "tracks_youtube_link_unique": { 2545 + "name": "tracks_youtube_link_unique", 2546 + "nullsNotDistinct": false, 2547 + "columns": [ 2548 + "youtube_link" 2549 + ] 2550 + }, 2551 + "tracks_spotify_link_unique": { 2552 + "name": "tracks_spotify_link_unique", 2553 + "nullsNotDistinct": false, 2554 + "columns": [ 2555 + "spotify_link" 2556 + ] 2557 + }, 2558 + "tracks_apple_music_link_unique": { 2559 + "name": "tracks_apple_music_link_unique", 2560 + "nullsNotDistinct": false, 2561 + "columns": [ 2562 + "apple_music_link" 2563 + ] 2564 + }, 2565 + "tracks_tidal_link_unique": { 2566 + "name": "tracks_tidal_link_unique", 2567 + "nullsNotDistinct": false, 2568 + "columns": [ 2569 + "tidal_link" 2570 + ] 2571 + }, 2572 + "tracks_sha256_unique": { 2573 + "name": "tracks_sha256_unique", 2574 + "nullsNotDistinct": false, 2575 + "columns": [ 2576 + "sha256" 2577 + ] 2578 + }, 2579 + "tracks_uri_unique": { 2580 + "name": "tracks_uri_unique", 2581 + "nullsNotDistinct": false, 2582 + "columns": [ 2583 + "uri" 2584 + ] 2585 + } 2586 + }, 2587 + "policies": {}, 2588 + "checkConstraints": {}, 2589 + "isRLSEnabled": false 2590 + }, 2591 + "public.user_albums": { 2592 + "name": "user_albums", 2593 + "schema": "", 2594 + "columns": { 2595 + "xata_id": { 2596 + "name": "xata_id", 2597 + "type": "text", 2598 + "primaryKey": true, 2599 + "notNull": true 2600 + }, 2601 + "user_id": { 2602 + "name": "user_id", 2603 + "type": "text", 2604 + "primaryKey": false, 2605 + "notNull": true 2606 + }, 2607 + "album_id": { 2608 + "name": "album_id", 2609 + "type": "text", 2610 + "primaryKey": false, 2611 + "notNull": true 2612 + }, 2613 + "xata_createdat": { 2614 + "name": "xata_createdat", 2615 + "type": "timestamp", 2616 + "primaryKey": false, 2617 + "notNull": true, 2618 + "default": "now()" 2619 + }, 2620 + "xata_updatedat": { 2621 + "name": "xata_updatedat", 2622 + "type": "timestamp", 2623 + "primaryKey": false, 2624 + "notNull": true, 2625 + "default": "now()" 2626 + }, 2627 + "xata_version": { 2628 + "name": "xata_version", 2629 + "type": "integer", 2630 + "primaryKey": false, 2631 + "notNull": false 2632 + }, 2633 + "scrobbles": { 2634 + "name": "scrobbles", 2635 + "type": "integer", 2636 + "primaryKey": false, 2637 + "notNull": false 2638 + }, 2639 + "uri": { 2640 + "name": "uri", 2641 + "type": "text", 2642 + "primaryKey": false, 2643 + "notNull": true 2644 + } 2645 + }, 2646 + "indexes": {}, 2647 + "foreignKeys": { 2648 + "user_albums_user_id_users_xata_id_fk": { 2649 + "name": "user_albums_user_id_users_xata_id_fk", 2650 + "tableFrom": "user_albums", 2651 + "tableTo": "users", 2652 + "columnsFrom": [ 2653 + "user_id" 2654 + ], 2655 + "columnsTo": [ 2656 + "xata_id" 2657 + ], 2658 + "onDelete": "no action", 2659 + "onUpdate": "no action" 2660 + }, 2661 + "user_albums_album_id_albums_xata_id_fk": { 2662 + "name": "user_albums_album_id_albums_xata_id_fk", 2663 + "tableFrom": "user_albums", 2664 + "tableTo": "albums", 2665 + "columnsFrom": [ 2666 + "album_id" 2667 + ], 2668 + "columnsTo": [ 2669 + "xata_id" 2670 + ], 2671 + "onDelete": "no action", 2672 + "onUpdate": "no action" 2673 + } 2674 + }, 2675 + "compositePrimaryKeys": {}, 2676 + "uniqueConstraints": { 2677 + "user_albums_uri_unique": { 2678 + "name": "user_albums_uri_unique", 2679 + "nullsNotDistinct": false, 2680 + "columns": [ 2681 + "uri" 2682 + ] 2683 + } 2684 + }, 2685 + "policies": {}, 2686 + "checkConstraints": {}, 2687 + "isRLSEnabled": false 2688 + }, 2689 + "public.user_artists": { 2690 + "name": "user_artists", 2691 + "schema": "", 2692 + "columns": { 2693 + "xata_id": { 2694 + "name": "xata_id", 2695 + "type": "text", 2696 + "primaryKey": true, 2697 + "notNull": true 2698 + }, 2699 + "user_id": { 2700 + "name": "user_id", 2701 + "type": "text", 2702 + "primaryKey": false, 2703 + "notNull": true 2704 + }, 2705 + "artist_id": { 2706 + "name": "artist_id", 2707 + "type": "text", 2708 + "primaryKey": false, 2709 + "notNull": true 2710 + }, 2711 + "xata_createdat": { 2712 + "name": "xata_createdat", 2713 + "type": "timestamp", 2714 + "primaryKey": false, 2715 + "notNull": true, 2716 + "default": "now()" 2717 + }, 2718 + "xata_updatedat": { 2719 + "name": "xata_updatedat", 2720 + "type": "timestamp", 2721 + "primaryKey": false, 2722 + "notNull": true, 2723 + "default": "now()" 2724 + }, 2725 + "xata_version": { 2726 + "name": "xata_version", 2727 + "type": "integer", 2728 + "primaryKey": false, 2729 + "notNull": false 2730 + }, 2731 + "scrobbles": { 2732 + "name": "scrobbles", 2733 + "type": "integer", 2734 + "primaryKey": false, 2735 + "notNull": false 2736 + }, 2737 + "uri": { 2738 + "name": "uri", 2739 + "type": "text", 2740 + "primaryKey": false, 2741 + "notNull": true 2742 + } 2743 + }, 2744 + "indexes": {}, 2745 + "foreignKeys": { 2746 + "user_artists_user_id_users_xata_id_fk": { 2747 + "name": "user_artists_user_id_users_xata_id_fk", 2748 + "tableFrom": "user_artists", 2749 + "tableTo": "users", 2750 + "columnsFrom": [ 2751 + "user_id" 2752 + ], 2753 + "columnsTo": [ 2754 + "xata_id" 2755 + ], 2756 + "onDelete": "no action", 2757 + "onUpdate": "no action" 2758 + }, 2759 + "user_artists_artist_id_artists_xata_id_fk": { 2760 + "name": "user_artists_artist_id_artists_xata_id_fk", 2761 + "tableFrom": "user_artists", 2762 + "tableTo": "artists", 2763 + "columnsFrom": [ 2764 + "artist_id" 2765 + ], 2766 + "columnsTo": [ 2767 + "xata_id" 2768 + ], 2769 + "onDelete": "no action", 2770 + "onUpdate": "no action" 2771 + } 2772 + }, 2773 + "compositePrimaryKeys": {}, 2774 + "uniqueConstraints": { 2775 + "user_artists_uri_unique": { 2776 + "name": "user_artists_uri_unique", 2777 + "nullsNotDistinct": false, 2778 + "columns": [ 2779 + "uri" 2780 + ] 2781 + } 2782 + }, 2783 + "policies": {}, 2784 + "checkConstraints": {}, 2785 + "isRLSEnabled": false 2786 + }, 2787 + "public.user_playlists": { 2788 + "name": "user_playlists", 2789 + "schema": "", 2790 + "columns": { 2791 + "xata_id": { 2792 + "name": "xata_id", 2793 + "type": "text", 2794 + "primaryKey": true, 2795 + "notNull": true 2796 + }, 2797 + "user_id": { 2798 + "name": "user_id", 2799 + "type": "text", 2800 + "primaryKey": false, 2801 + "notNull": true 2802 + }, 2803 + "playlist_id": { 2804 + "name": "playlist_id", 2805 + "type": "text", 2806 + "primaryKey": false, 2807 + "notNull": true 2808 + }, 2809 + "xata_createdat": { 2810 + "name": "xata_createdat", 2811 + "type": "timestamp", 2812 + "primaryKey": false, 2813 + "notNull": true, 2814 + "default": "now()" 2815 + }, 2816 + "uri": { 2817 + "name": "uri", 2818 + "type": "text", 2819 + "primaryKey": false, 2820 + "notNull": false 2821 + } 2822 + }, 2823 + "indexes": {}, 2824 + "foreignKeys": { 2825 + "user_playlists_user_id_users_xata_id_fk": { 2826 + "name": "user_playlists_user_id_users_xata_id_fk", 2827 + "tableFrom": "user_playlists", 2828 + "tableTo": "users", 2829 + "columnsFrom": [ 2830 + "user_id" 2831 + ], 2832 + "columnsTo": [ 2833 + "xata_id" 2834 + ], 2835 + "onDelete": "no action", 2836 + "onUpdate": "no action" 2837 + }, 2838 + "user_playlists_playlist_id_playlists_xata_id_fk": { 2839 + "name": "user_playlists_playlist_id_playlists_xata_id_fk", 2840 + "tableFrom": "user_playlists", 2841 + "tableTo": "playlists", 2842 + "columnsFrom": [ 2843 + "playlist_id" 2844 + ], 2845 + "columnsTo": [ 2846 + "xata_id" 2847 + ], 2848 + "onDelete": "no action", 2849 + "onUpdate": "no action" 2850 + } 2851 + }, 2852 + "compositePrimaryKeys": {}, 2853 + "uniqueConstraints": { 2854 + "user_playlists_uri_unique": { 2855 + "name": "user_playlists_uri_unique", 2856 + "nullsNotDistinct": false, 2857 + "columns": [ 2858 + "uri" 2859 + ] 2860 + } 2861 + }, 2862 + "policies": {}, 2863 + "checkConstraints": {}, 2864 + "isRLSEnabled": false 2865 + }, 2866 + "public.user_tracks": { 2867 + "name": "user_tracks", 2868 + "schema": "", 2869 + "columns": { 2870 + "xata_id": { 2871 + "name": "xata_id", 2872 + "type": "text", 2873 + "primaryKey": true, 2874 + "notNull": true 2875 + }, 2876 + "user_id": { 2877 + "name": "user_id", 2878 + "type": "text", 2879 + "primaryKey": false, 2880 + "notNull": true 2881 + }, 2882 + "track_id": { 2883 + "name": "track_id", 2884 + "type": "text", 2885 + "primaryKey": false, 2886 + "notNull": true 2887 + }, 2888 + "xata_createdat": { 2889 + "name": "xata_createdat", 2890 + "type": "timestamp", 2891 + "primaryKey": false, 2892 + "notNull": true, 2893 + "default": "now()" 2894 + }, 2895 + "xata_updatedat": { 2896 + "name": "xata_updatedat", 2897 + "type": "timestamp", 2898 + "primaryKey": false, 2899 + "notNull": true, 2900 + "default": "now()" 2901 + }, 2902 + "xata_version": { 2903 + "name": "xata_version", 2904 + "type": "integer", 2905 + "primaryKey": false, 2906 + "notNull": false 2907 + }, 2908 + "uri": { 2909 + "name": "uri", 2910 + "type": "text", 2911 + "primaryKey": false, 2912 + "notNull": true 2913 + }, 2914 + "scrobbles": { 2915 + "name": "scrobbles", 2916 + "type": "integer", 2917 + "primaryKey": false, 2918 + "notNull": false 2919 + } 2920 + }, 2921 + "indexes": {}, 2922 + "foreignKeys": { 2923 + "user_tracks_user_id_users_xata_id_fk": { 2924 + "name": "user_tracks_user_id_users_xata_id_fk", 2925 + "tableFrom": "user_tracks", 2926 + "tableTo": "users", 2927 + "columnsFrom": [ 2928 + "user_id" 2929 + ], 2930 + "columnsTo": [ 2931 + "xata_id" 2932 + ], 2933 + "onDelete": "no action", 2934 + "onUpdate": "no action" 2935 + }, 2936 + "user_tracks_track_id_tracks_xata_id_fk": { 2937 + "name": "user_tracks_track_id_tracks_xata_id_fk", 2938 + "tableFrom": "user_tracks", 2939 + "tableTo": "tracks", 2940 + "columnsFrom": [ 2941 + "track_id" 2942 + ], 2943 + "columnsTo": [ 2944 + "xata_id" 2945 + ], 2946 + "onDelete": "no action", 2947 + "onUpdate": "no action" 2948 + } 2949 + }, 2950 + "compositePrimaryKeys": {}, 2951 + "uniqueConstraints": { 2952 + "user_tracks_uri_unique": { 2953 + "name": "user_tracks_uri_unique", 2954 + "nullsNotDistinct": false, 2955 + "columns": [ 2956 + "uri" 2957 + ] 2958 + } 2959 + }, 2960 + "policies": {}, 2961 + "checkConstraints": {}, 2962 + "isRLSEnabled": false 2963 + }, 2964 + "public.users": { 2965 + "name": "users", 2966 + "schema": "", 2967 + "columns": { 2968 + "xata_id": { 2969 + "name": "xata_id", 2970 + "type": "text", 2971 + "primaryKey": true, 2972 + "notNull": true 2973 + }, 2974 + "did": { 2975 + "name": "did", 2976 + "type": "text", 2977 + "primaryKey": false, 2978 + "notNull": true 2979 + }, 2980 + "display_name": { 2981 + "name": "display_name", 2982 + "type": "text", 2983 + "primaryKey": false, 2984 + "notNull": false 2985 + }, 2986 + "handle": { 2987 + "name": "handle", 2988 + "type": "text", 2989 + "primaryKey": false, 2990 + "notNull": true 2991 + }, 2992 + "avatar": { 2993 + "name": "avatar", 2994 + "type": "text", 2995 + "primaryKey": false, 2996 + "notNull": true 2997 + }, 2998 + "xata_createdat": { 2999 + "name": "xata_createdat", 3000 + "type": "timestamp", 3001 + "primaryKey": false, 3002 + "notNull": true, 3003 + "default": "now()" 3004 + }, 3005 + "xata_updatedat": { 3006 + "name": "xata_updatedat", 3007 + "type": "timestamp", 3008 + "primaryKey": false, 3009 + "notNull": true, 3010 + "default": "now()" 3011 + }, 3012 + "xata_version": { 3013 + "name": "xata_version", 3014 + "type": "integer", 3015 + "primaryKey": false, 3016 + "notNull": false 3017 + } 3018 + }, 3019 + "indexes": {}, 3020 + "foreignKeys": {}, 3021 + "compositePrimaryKeys": {}, 3022 + "uniqueConstraints": { 3023 + "users_did_unique": { 3024 + "name": "users_did_unique", 3025 + "nullsNotDistinct": false, 3026 + "columns": [ 3027 + "did" 3028 + ] 3029 + }, 3030 + "users_handle_unique": { 3031 + "name": "users_handle_unique", 3032 + "nullsNotDistinct": false, 3033 + "columns": [ 3034 + "handle" 3035 + ] 3036 + } 3037 + }, 3038 + "policies": {}, 3039 + "checkConstraints": {}, 3040 + "isRLSEnabled": false 3041 + }, 3042 + "public.webscrobblers": { 3043 + "name": "webscrobblers", 3044 + "schema": "", 3045 + "columns": { 3046 + "xata_id": { 3047 + "name": "xata_id", 3048 + "type": "text", 3049 + "primaryKey": true, 3050 + "notNull": true 3051 + }, 3052 + "name": { 3053 + "name": "name", 3054 + "type": "text", 3055 + "primaryKey": false, 3056 + "notNull": true 3057 + }, 3058 + "uuid": { 3059 + "name": "uuid", 3060 + "type": "text", 3061 + "primaryKey": false, 3062 + "notNull": true 3063 + }, 3064 + "description": { 3065 + "name": "description", 3066 + "type": "text", 3067 + "primaryKey": false, 3068 + "notNull": false 3069 + }, 3070 + "enabled": { 3071 + "name": "enabled", 3072 + "type": "boolean", 3073 + "primaryKey": false, 3074 + "notNull": true, 3075 + "default": true 3076 + }, 3077 + "user_id": { 3078 + "name": "user_id", 3079 + "type": "text", 3080 + "primaryKey": false, 3081 + "notNull": true 3082 + }, 3083 + "xata_createdat": { 3084 + "name": "xata_createdat", 3085 + "type": "timestamp", 3086 + "primaryKey": false, 3087 + "notNull": true, 3088 + "default": "now()" 3089 + }, 3090 + "xata_updatedat": { 3091 + "name": "xata_updatedat", 3092 + "type": "timestamp", 3093 + "primaryKey": false, 3094 + "notNull": true, 3095 + "default": "now()" 3096 + } 3097 + }, 3098 + "indexes": {}, 3099 + "foreignKeys": { 3100 + "webscrobblers_user_id_users_xata_id_fk": { 3101 + "name": "webscrobblers_user_id_users_xata_id_fk", 3102 + "tableFrom": "webscrobblers", 3103 + "tableTo": "users", 3104 + "columnsFrom": [ 3105 + "user_id" 3106 + ], 3107 + "columnsTo": [ 3108 + "xata_id" 3109 + ], 3110 + "onDelete": "no action", 3111 + "onUpdate": "no action" 3112 + } 3113 + }, 3114 + "compositePrimaryKeys": {}, 3115 + "uniqueConstraints": {}, 3116 + "policies": {}, 3117 + "checkConstraints": {}, 3118 + "isRLSEnabled": false 3119 + } 3120 + }, 3121 + "enums": {}, 3122 + "schemas": {}, 3123 + "sequences": {}, 3124 + "roles": {}, 3125 + "policies": {}, 3126 + "views": {}, 3127 + "_meta": { 3128 + "columns": {}, 3129 + "schemas": {}, 3130 + "tables": {} 3131 + } 3132 + }
+14
apps/api/drizzle/meta/_journal.json
··· 8 8 "when": 1759744201158, 9 9 "tag": "0000_left_swordsman", 10 10 "breakpoints": true 11 + }, 12 + { 13 + "idx": 1, 14 + "version": "7", 15 + "when": 1759746264036, 16 + "tag": "0001_fluffy_epoch", 17 + "breakpoints": true 18 + }, 19 + { 20 + "idx": 2, 21 + "version": "7", 22 + "when": 1759747596050, 23 + "tag": "0002_sweet_randall_flagg", 24 + "breakpoints": true 11 25 } 12 26 ] 13 27 }
+3 -3
apps/api/src/schema/user-playlists.ts
··· 1 1 import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; 2 2 import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; 3 - import tracks from "./tracks"; 3 + import playlists from "./playlists"; 4 4 import users from "./users"; 5 5 6 6 const userPlaylists = pgTable("user_playlists", { ··· 10 10 .references(() => users.id), 11 11 playlistId: text("playlist_id") 12 12 .notNull() 13 - .references(() => tracks.id), 13 + .references(() => playlists.id), 14 14 createdAt: timestamp("xata_createdat").defaultNow().notNull(), 15 - uri: text("uri").unique().notNull(), 15 + uri: text("uri").unique(), 16 16 }); 17 17 18 18 export type SelectUserPlaylist = InferSelectModel<typeof userPlaylists>;
+1 -2
crates/pgpull/src/repo/album.rs
··· 92 92 r#"INSERT INTO album_tracks ( 93 93 xata_id, 94 94 album_id, 95 - track_id, 96 - xata_createdat 95 + track_id 97 96 ) VALUES ($1, $2, $3) 98 97 ON CONFLICT (xata_id) DO NOTHING"#, 99 98 )
+1 -3
crates/pgpull/src/repo/playlist.rs
··· 86 86 xata_id, 87 87 playlist_id, 88 88 track_id, 89 - added_by, 90 89 xata_createdat 91 - ) VALUES ($1, $2, $3, $4, $5) 90 + ) VALUES ($1, $2, $3, $4) 92 91 ON CONFLICT (xata_id) DO NOTHING"#, 93 92 ) 94 93 .bind(&playlist_track.xata_id) 95 94 .bind(&playlist_track.playlist_id) 96 95 .bind(&playlist_track.track_id) 97 - .bind(&playlist_track.added_by) 98 96 .bind(playlist_track.xata_createdat) 99 97 .execute(pool) 100 98 .await?;
-1
crates/pgpull/src/xata/playlist_track.rs
··· 5 5 pub xata_id: String, 6 6 pub playlist_id: String, 7 7 pub track_id: String, 8 - pub added_by: String, 9 8 #[serde(with = "chrono::serde::ts_seconds")] 10 9 pub xata_createdat: chrono::DateTime<chrono::Utc>, 11 10 }