A decentralized music tracking and discovery platform built on AT Protocol 馃幍 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz
97
fork

Configure Feed

Select the types of activity you want to include in your feed.

at feat/pgpull 463 lines 24 kB view raw
1CREATE TABLE "album_tracks" ( 2 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 3 "album_id" text NOT NULL, 4 "track_id" text NOT NULL, 5 "xata_createdat" timestamp DEFAULT now() NOT NULL, 6 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 7 "xata_version" integer 8); 9--> statement-breakpoint 10CREATE TABLE "albums" ( 11 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 12 "title" text NOT NULL, 13 "artist" text NOT NULL, 14 "release_date" text, 15 "year" integer, 16 "album_art" text, 17 "uri" text, 18 "artist_uri" text, 19 "apple_music_link" text, 20 "spotify_link" text, 21 "tidal_link" text, 22 "youtube_link" text, 23 "sha256" text NOT NULL, 24 "xata_createdat" timestamp DEFAULT now() NOT NULL, 25 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 26 "xata_version" integer, 27 CONSTRAINT "albums_uri_unique" UNIQUE("uri"), 28 CONSTRAINT "albums_apple_music_link_unique" UNIQUE("apple_music_link"), 29 CONSTRAINT "albums_spotify_link_unique" UNIQUE("spotify_link"), 30 CONSTRAINT "albums_tidal_link_unique" UNIQUE("tidal_link"), 31 CONSTRAINT "albums_youtube_link_unique" UNIQUE("youtube_link"), 32 CONSTRAINT "albums_sha256_unique" UNIQUE("sha256") 33); 34--> statement-breakpoint 35CREATE TABLE "api_keys" ( 36 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 37 "name" text NOT NULL, 38 "api_key" text NOT NULL, 39 "shared_secret" text NOT NULL, 40 "description" text, 41 "enabled" boolean DEFAULT true NOT NULL, 42 "user_id" text NOT NULL, 43 "xata_createdat" timestamp DEFAULT now() NOT NULL, 44 "xata_updatedat" timestamp DEFAULT now() NOT NULL 45); 46--> statement-breakpoint 47CREATE TABLE "artist_albums" ( 48 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 49 "artist_id" text NOT NULL, 50 "album_id" text NOT NULL, 51 "xata_createdat" timestamp DEFAULT now() NOT NULL, 52 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 53 "xata_version" integer 54); 55--> statement-breakpoint 56CREATE TABLE "artist_tracks" ( 57 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 58 "artist_id" text NOT NULL, 59 "track_id" text NOT NULL, 60 "xata_createdat" timestamp DEFAULT now() NOT NULL, 61 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 62 "xata_version" integer 63); 64--> statement-breakpoint 65CREATE TABLE "artists" ( 66 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 67 "name" text NOT NULL, 68 "biography" text, 69 "born" timestamp, 70 "born_in" text, 71 "died" timestamp, 72 "picture" text, 73 "sha256" text NOT NULL, 74 "uri" text, 75 "apple_music_link" text, 76 "spotify_link" text, 77 "tidal_link" text, 78 "youtube_link" text, 79 "genres" text[], 80 "xata_createdat" timestamp DEFAULT now() NOT NULL, 81 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 82 "xata_version" integer, 83 CONSTRAINT "artists_sha256_unique" UNIQUE("sha256"), 84 CONSTRAINT "artists_uri_unique" UNIQUE("uri") 85); 86--> statement-breakpoint 87CREATE TABLE "dropbox_accounts" ( 88 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 89 "email" text NOT NULL, 90 "is_beta_user" boolean DEFAULT false NOT NULL, 91 "user_id" text NOT NULL, 92 "xata_version" text, 93 "xata_createdat" timestamp DEFAULT now() NOT NULL, 94 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 95 CONSTRAINT "dropbox_accounts_email_unique" UNIQUE("email") 96); 97--> statement-breakpoint 98CREATE TABLE "dropbox_directories" ( 99 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 100 "name" text NOT NULL, 101 "path" text NOT NULL, 102 "parent_id" text, 103 "dropbox_id" text NOT NULL, 104 "file_id" text NOT NULL, 105 "xata_version" text, 106 "xata_createdat" timestamp DEFAULT now() NOT NULL, 107 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 108 CONSTRAINT "dropbox_directories_file_id_unique" UNIQUE("file_id") 109); 110--> statement-breakpoint 111CREATE TABLE "dropbox_paths" ( 112 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 113 "path" text NOT NULL, 114 "name" text NOT NULL, 115 "dropbox_id" text NOT NULL, 116 "track_id" text NOT NULL, 117 "directory_id" text, 118 "file_id" text NOT NULL, 119 "xata_version" text, 120 "xata_createdat" timestamp DEFAULT now() NOT NULL, 121 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 122 CONSTRAINT "dropbox_paths_file_id_unique" UNIQUE("file_id") 123); 124--> statement-breakpoint 125CREATE TABLE "dropbox_tokens" ( 126 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 127 "refresh_token" text NOT NULL, 128 "xata_createdat" timestamp DEFAULT now() NOT NULL, 129 "xata_updatedat" timestamp DEFAULT now() NOT NULL 130); 131--> statement-breakpoint 132CREATE TABLE "dropbox" ( 133 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 134 "user_id" text NOT NULL, 135 "dropbox_token_id" text NOT NULL, 136 "xata_version" text, 137 "xata_createdat" timestamp DEFAULT now() NOT NULL, 138 "xata_updatedat" timestamp DEFAULT now() NOT NULL 139); 140--> statement-breakpoint 141CREATE TABLE "google_drive_accounts" ( 142 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 143 "email" text NOT NULL, 144 "is_beta_user" boolean DEFAULT false NOT NULL, 145 "user_id" text NOT NULL, 146 "xata_version" text, 147 "xata_createdat" timestamp DEFAULT now() NOT NULL, 148 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 149 CONSTRAINT "google_drive_accounts_email_unique" UNIQUE("email") 150); 151--> statement-breakpoint 152CREATE TABLE "google_drive_directories" ( 153 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 154 "name" text NOT NULL, 155 "path" text NOT NULL, 156 "parent_id" text, 157 "google_drive_id" text NOT NULL, 158 "file_id" text NOT NULL, 159 "xata_version" text, 160 "xata_createdat" timestamp DEFAULT now() NOT NULL, 161 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 162 CONSTRAINT "google_drive_directories_file_id_unique" UNIQUE("file_id") 163); 164--> statement-breakpoint 165CREATE TABLE "google_drive_paths" ( 166 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 167 "google_drive_id" text NOT NULL, 168 "track_id" text NOT NULL, 169 "name" text NOT NULL, 170 "directory_id" text, 171 "file_id" text NOT NULL, 172 "xata_version" text, 173 "xata_createdat" timestamp DEFAULT now() NOT NULL, 174 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 175 CONSTRAINT "google_drive_paths_file_id_unique" UNIQUE("file_id") 176); 177--> statement-breakpoint 178CREATE TABLE "google_drive_tokens" ( 179 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 180 "refresh_token" text NOT NULL, 181 "xata_createdat" timestamp DEFAULT now() NOT NULL, 182 "xata_updatedat" timestamp DEFAULT now() NOT NULL 183); 184--> statement-breakpoint 185CREATE TABLE "google_drive" ( 186 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 187 "google_drive_token_id" text NOT NULL, 188 "user_id" text NOT NULL, 189 "xata_version" text, 190 "xata_createdat" timestamp DEFAULT now() NOT NULL, 191 "xata_updatedat" timestamp DEFAULT now() NOT NULL 192); 193--> statement-breakpoint 194CREATE TABLE "loved_tracks" ( 195 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 196 "user_id" text NOT NULL, 197 "track_id" text NOT NULL, 198 "uri" text, 199 "xata_createdat" timestamp DEFAULT now() NOT NULL, 200 CONSTRAINT "loved_tracks_uri_unique" UNIQUE("uri") 201); 202--> statement-breakpoint 203CREATE TABLE "playlist_tracks" ( 204 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 205 "playlist_id" text NOT NULL, 206 "track_id" text NOT NULL, 207 "xata_createdat" timestamp DEFAULT now() NOT NULL 208); 209--> statement-breakpoint 210CREATE TABLE "playlists" ( 211 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 212 "name" text NOT NULL, 213 "picture" text, 214 "description" text, 215 "uri" text, 216 "spotify_link" text, 217 "tidal_link" text, 218 "apple_music_link" text, 219 "created_by" text NOT NULL, 220 "xata_createdat" timestamp DEFAULT now() NOT NULL, 221 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 222 CONSTRAINT "playlists_uri_unique" UNIQUE("uri") 223); 224--> statement-breakpoint 225CREATE TABLE "profile_shouts" ( 226 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 227 "user_id" text NOT NULL, 228 "shout_id" text NOT NULL, 229 "xata_createdat" timestamp DEFAULT now() NOT NULL 230); 231--> statement-breakpoint 232CREATE TABLE "queue_tracks" ( 233 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 234 "user_id" text NOT NULL, 235 "track_id" text NOT NULL, 236 "position" integer NOT NULL, 237 "file_uri" text NOT NULL, 238 "xata_version" integer DEFAULT 0 NOT NULL, 239 "xata_createdat" timestamp DEFAULT now() NOT NULL, 240 "xata_updatedat" timestamp DEFAULT now() NOT NULL 241); 242--> statement-breakpoint 243CREATE TABLE "scrobbles" ( 244 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 245 "user_id" text, 246 "track_id" text, 247 "album_id" text, 248 "artist_id" text, 249 "uri" text, 250 "xata_createdat" timestamp DEFAULT now() NOT NULL, 251 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 252 "xata_version" integer, 253 "timestamp" timestamp DEFAULT now() NOT NULL, 254 CONSTRAINT "scrobbles_uri_unique" UNIQUE("uri") 255); 256--> statement-breakpoint 257CREATE TABLE "shout_likes" ( 258 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 259 "user_id" text NOT NULL, 260 "shout_id" text NOT NULL, 261 "xata_createdat" timestamp DEFAULT now() NOT NULL, 262 "uri" text NOT NULL, 263 CONSTRAINT "shout_likes_uri_unique" UNIQUE("uri") 264); 265--> statement-breakpoint 266CREATE TABLE "shout_reports" ( 267 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 268 "user_id" text NOT NULL, 269 "shout_id" text NOT NULL, 270 "xata_createdat" timestamp DEFAULT now() NOT NULL 271); 272--> statement-breakpoint 273CREATE TABLE "shouts" ( 274 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 275 "content" text NOT NULL, 276 "track_id" text, 277 "artist_id" text, 278 "album_id" text, 279 "scrobble_id" text, 280 "uri" text NOT NULL, 281 "author_id" text NOT NULL, 282 "parent_id" text, 283 "xata_createdat" timestamp DEFAULT now() NOT NULL, 284 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 285 CONSTRAINT "shouts_uri_unique" UNIQUE("uri") 286); 287--> statement-breakpoint 288CREATE TABLE "spotify_accounts" ( 289 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 290 "xata_version" integer, 291 "email" text NOT NULL, 292 "user_id" text NOT NULL, 293 "is_beta_user" boolean DEFAULT false NOT NULL, 294 "xata_createdat" timestamp DEFAULT now() NOT NULL, 295 "xata_updatedat" timestamp DEFAULT now() NOT NULL 296); 297--> statement-breakpoint 298CREATE TABLE "spotify_tokens" ( 299 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 300 "xata_version" integer, 301 "access_token" text NOT NULL, 302 "refresh_token" text NOT NULL, 303 "user_id" text NOT NULL, 304 "xata_createdat" timestamp DEFAULT now() NOT NULL, 305 "xata_updatedat" timestamp DEFAULT now() NOT NULL 306); 307--> statement-breakpoint 308CREATE TABLE "tracks" ( 309 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 310 "title" text NOT NULL, 311 "artist" text NOT NULL, 312 "album_artist" text NOT NULL, 313 "album_art" text, 314 "album" text NOT NULL, 315 "track_number" integer, 316 "duration" integer NOT NULL, 317 "mb_id" text, 318 "youtube_link" text, 319 "spotify_link" text, 320 "apple_music_link" text, 321 "tidal_link" text, 322 "sha256" text NOT NULL, 323 "disc_number" integer, 324 "lyrics" text, 325 "composer" text, 326 "genre" text, 327 "label" text, 328 "copyright_message" text, 329 "uri" text, 330 "album_uri" text, 331 "artist_uri" text, 332 "xata_createdat" timestamp DEFAULT now() NOT NULL, 333 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 334 "xata_version" integer, 335 CONSTRAINT "tracks_mb_id_unique" UNIQUE("mb_id"), 336 CONSTRAINT "tracks_youtube_link_unique" UNIQUE("youtube_link"), 337 CONSTRAINT "tracks_spotify_link_unique" UNIQUE("spotify_link"), 338 CONSTRAINT "tracks_apple_music_link_unique" UNIQUE("apple_music_link"), 339 CONSTRAINT "tracks_tidal_link_unique" UNIQUE("tidal_link"), 340 CONSTRAINT "tracks_sha256_unique" UNIQUE("sha256"), 341 CONSTRAINT "tracks_uri_unique" UNIQUE("uri") 342); 343--> statement-breakpoint 344CREATE TABLE "user_albums" ( 345 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 346 "user_id" text NOT NULL, 347 "album_id" text NOT NULL, 348 "xata_createdat" timestamp DEFAULT now() NOT NULL, 349 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 350 "xata_version" integer, 351 "scrobbles" integer, 352 "uri" text NOT NULL, 353 CONSTRAINT "user_albums_uri_unique" UNIQUE("uri") 354); 355--> statement-breakpoint 356CREATE TABLE "user_artists" ( 357 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 358 "user_id" text NOT NULL, 359 "artist_id" text NOT NULL, 360 "xata_createdat" timestamp DEFAULT now() NOT NULL, 361 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 362 "xata_version" integer, 363 "scrobbles" integer, 364 "uri" text NOT NULL, 365 CONSTRAINT "user_artists_uri_unique" UNIQUE("uri") 366); 367--> statement-breakpoint 368CREATE TABLE "user_playlists" ( 369 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 370 "user_id" text NOT NULL, 371 "playlist_id" text NOT NULL, 372 "xata_createdat" timestamp DEFAULT now() NOT NULL, 373 "uri" text NOT NULL, 374 CONSTRAINT "user_playlists_uri_unique" UNIQUE("uri") 375); 376--> statement-breakpoint 377CREATE TABLE "user_tracks" ( 378 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 379 "user_id" text NOT NULL, 380 "track_id" text NOT NULL, 381 "xata_createdat" timestamp DEFAULT now() NOT NULL, 382 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 383 "xata_version" integer, 384 "uri" text NOT NULL, 385 "scrobbles" integer, 386 CONSTRAINT "user_tracks_uri_unique" UNIQUE("uri") 387); 388--> statement-breakpoint 389CREATE TABLE "users" ( 390 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 391 "did" text NOT NULL, 392 "display_name" text, 393 "handle" text NOT NULL, 394 "avatar" text NOT NULL, 395 "xata_createdat" timestamp DEFAULT now() NOT NULL, 396 "xata_updatedat" timestamp DEFAULT now() NOT NULL, 397 "xata_version" integer, 398 CONSTRAINT "users_did_unique" UNIQUE("did"), 399 CONSTRAINT "users_handle_unique" UNIQUE("handle") 400); 401--> statement-breakpoint 402CREATE TABLE "webscrobblers" ( 403 "xata_id" text PRIMARY KEY DEFAULT xata_id(), 404 "name" text NOT NULL, 405 "uuid" text NOT NULL, 406 "description" text, 407 "enabled" boolean DEFAULT true NOT NULL, 408 "user_id" text NOT NULL, 409 "xata_createdat" timestamp DEFAULT now() NOT NULL, 410 "xata_updatedat" timestamp DEFAULT now() NOT NULL 411); 412--> statement-breakpoint 413ALTER TABLE "album_tracks" ADD CONSTRAINT "album_tracks_album_id_albums_xata_id_fk" FOREIGN KEY ("album_id") REFERENCES "public"."albums"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 414ALTER TABLE "album_tracks" ADD CONSTRAINT "album_tracks_track_id_tracks_xata_id_fk" FOREIGN KEY ("track_id") REFERENCES "public"."tracks"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 415ALTER TABLE "api_keys" ADD CONSTRAINT "api_keys_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 416ALTER TABLE "artist_albums" ADD CONSTRAINT "artist_albums_artist_id_artists_xata_id_fk" FOREIGN KEY ("artist_id") REFERENCES "public"."artists"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 417ALTER TABLE "artist_albums" ADD CONSTRAINT "artist_albums_album_id_albums_xata_id_fk" FOREIGN KEY ("album_id") REFERENCES "public"."albums"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 418ALTER TABLE "artist_tracks" ADD CONSTRAINT "artist_tracks_artist_id_artists_xata_id_fk" FOREIGN KEY ("artist_id") REFERENCES "public"."artists"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 419ALTER TABLE "artist_tracks" ADD CONSTRAINT "artist_tracks_track_id_tracks_xata_id_fk" FOREIGN KEY ("track_id") REFERENCES "public"."tracks"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 420ALTER TABLE "dropbox_accounts" ADD CONSTRAINT "dropbox_accounts_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 421ALTER TABLE "dropbox_directories" ADD CONSTRAINT "dropbox_directories_parent_id_dropbox_directories_xata_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."dropbox_directories"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 422ALTER TABLE "dropbox_paths" ADD CONSTRAINT "dropbox_paths_directory_id_dropbox_directories_xata_id_fk" FOREIGN KEY ("directory_id") REFERENCES "public"."dropbox_directories"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 423ALTER TABLE "dropbox" ADD CONSTRAINT "dropbox_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 424ALTER TABLE "dropbox" ADD CONSTRAINT "dropbox_dropbox_token_id_dropbox_tokens_xata_id_fk" FOREIGN KEY ("dropbox_token_id") REFERENCES "public"."dropbox_tokens"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 425ALTER TABLE "google_drive_accounts" ADD CONSTRAINT "google_drive_accounts_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 426ALTER TABLE "google_drive_directories" ADD CONSTRAINT "google_drive_directories_parent_id_google_drive_directories_xata_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."google_drive_directories"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 427ALTER TABLE "google_drive_paths" ADD CONSTRAINT "google_drive_paths_directory_id_google_drive_directories_xata_id_fk" FOREIGN KEY ("directory_id") REFERENCES "public"."google_drive_directories"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 428ALTER TABLE "google_drive" ADD CONSTRAINT "google_drive_google_drive_token_id_google_drive_tokens_xata_id_fk" FOREIGN KEY ("google_drive_token_id") REFERENCES "public"."google_drive_tokens"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 429ALTER TABLE "google_drive" ADD CONSTRAINT "google_drive_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 430ALTER TABLE "loved_tracks" ADD CONSTRAINT "loved_tracks_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 431ALTER TABLE "loved_tracks" ADD CONSTRAINT "loved_tracks_track_id_tracks_xata_id_fk" FOREIGN KEY ("track_id") REFERENCES "public"."tracks"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 432ALTER TABLE "playlist_tracks" ADD CONSTRAINT "playlist_tracks_playlist_id_playlists_xata_id_fk" FOREIGN KEY ("playlist_id") REFERENCES "public"."playlists"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 433ALTER TABLE "playlist_tracks" ADD CONSTRAINT "playlist_tracks_track_id_tracks_xata_id_fk" FOREIGN KEY ("track_id") REFERENCES "public"."tracks"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 434ALTER TABLE "playlists" ADD CONSTRAINT "playlists_created_by_users_xata_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 435ALTER TABLE "profile_shouts" ADD CONSTRAINT "profile_shouts_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 436ALTER TABLE "profile_shouts" ADD CONSTRAINT "profile_shouts_shout_id_shouts_xata_id_fk" FOREIGN KEY ("shout_id") REFERENCES "public"."shouts"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 437ALTER TABLE "queue_tracks" ADD CONSTRAINT "queue_tracks_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 438ALTER TABLE "queue_tracks" ADD CONSTRAINT "queue_tracks_track_id_tracks_xata_id_fk" FOREIGN KEY ("track_id") REFERENCES "public"."tracks"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 439ALTER TABLE "scrobbles" ADD CONSTRAINT "scrobbles_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 440ALTER TABLE "scrobbles" ADD CONSTRAINT "scrobbles_track_id_tracks_xata_id_fk" FOREIGN KEY ("track_id") REFERENCES "public"."tracks"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 441ALTER TABLE "scrobbles" ADD CONSTRAINT "scrobbles_album_id_albums_xata_id_fk" FOREIGN KEY ("album_id") REFERENCES "public"."albums"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 442ALTER TABLE "scrobbles" ADD CONSTRAINT "scrobbles_artist_id_artists_xata_id_fk" FOREIGN KEY ("artist_id") REFERENCES "public"."artists"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 443ALTER TABLE "shout_likes" ADD CONSTRAINT "shout_likes_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 444ALTER TABLE "shout_likes" ADD CONSTRAINT "shout_likes_shout_id_shouts_xata_id_fk" FOREIGN KEY ("shout_id") REFERENCES "public"."shouts"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 445ALTER TABLE "shout_reports" ADD CONSTRAINT "shout_reports_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 446ALTER TABLE "shout_reports" ADD CONSTRAINT "shout_reports_shout_id_shouts_xata_id_fk" FOREIGN KEY ("shout_id") REFERENCES "public"."shouts"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 447ALTER TABLE "shouts" ADD CONSTRAINT "shouts_track_id_tracks_xata_id_fk" FOREIGN KEY ("track_id") REFERENCES "public"."tracks"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 448ALTER TABLE "shouts" ADD CONSTRAINT "shouts_artist_id_users_xata_id_fk" FOREIGN KEY ("artist_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 449ALTER TABLE "shouts" ADD CONSTRAINT "shouts_album_id_albums_xata_id_fk" FOREIGN KEY ("album_id") REFERENCES "public"."albums"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 450ALTER TABLE "shouts" ADD CONSTRAINT "shouts_scrobble_id_scrobbles_xata_id_fk" FOREIGN KEY ("scrobble_id") REFERENCES "public"."scrobbles"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 451ALTER TABLE "shouts" ADD CONSTRAINT "shouts_author_id_users_xata_id_fk" FOREIGN KEY ("author_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 452ALTER TABLE "shouts" ADD CONSTRAINT "shouts_parent_id_shouts_xata_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."shouts"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 453ALTER TABLE "spotify_accounts" ADD CONSTRAINT "spotify_accounts_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 454ALTER TABLE "spotify_tokens" ADD CONSTRAINT "spotify_tokens_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 455ALTER TABLE "user_albums" ADD CONSTRAINT "user_albums_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 456ALTER TABLE "user_albums" ADD CONSTRAINT "user_albums_album_id_albums_xata_id_fk" FOREIGN KEY ("album_id") REFERENCES "public"."albums"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 457ALTER TABLE "user_artists" ADD CONSTRAINT "user_artists_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 458ALTER TABLE "user_artists" ADD CONSTRAINT "user_artists_artist_id_artists_xata_id_fk" FOREIGN KEY ("artist_id") REFERENCES "public"."artists"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 459ALTER TABLE "user_playlists" ADD CONSTRAINT "user_playlists_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 460ALTER TABLE "user_playlists" ADD CONSTRAINT "user_playlists_playlist_id_tracks_xata_id_fk" FOREIGN KEY ("playlist_id") REFERENCES "public"."tracks"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 461ALTER TABLE "user_tracks" ADD CONSTRAINT "user_tracks_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 462ALTER TABLE "user_tracks" ADD CONSTRAINT "user_tracks_track_id_tracks_xata_id_fk" FOREIGN KEY ("track_id") REFERENCES "public"."tracks"("xata_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint 463ALTER TABLE "webscrobblers" ADD CONSTRAINT "webscrobblers_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;