···8181$$ LANGUAGE sql IMMUTABLE;
82828383CREATE TABLE "album_tracks" (
8484- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
8484+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
8585 "album_id" text NOT NULL,
8686 "track_id" text NOT NULL,
8787 "xata_createdat" timestamp DEFAULT now() NOT NULL,
···9090);
9191--> statement-breakpoint
9292CREATE TABLE "albums" (
9393- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
9393+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
9494 "title" text NOT NULL,
9595 "artist" text NOT NULL,
9696 "release_date" text,
···115115);
116116--> statement-breakpoint
117117CREATE TABLE "api_keys" (
118118- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
118118+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
119119 "name" text NOT NULL,
120120 "api_key" text NOT NULL,
121121 "shared_secret" text NOT NULL,
···127127);
128128--> statement-breakpoint
129129CREATE TABLE "artist_albums" (
130130- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
130130+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
131131 "artist_id" text NOT NULL,
132132 "album_id" text NOT NULL,
133133 "xata_createdat" timestamp DEFAULT now() NOT NULL,
···136136);
137137--> statement-breakpoint
138138CREATE TABLE "artist_tracks" (
139139- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
139139+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
140140 "artist_id" text NOT NULL,
141141 "track_id" text NOT NULL,
142142 "xata_createdat" timestamp DEFAULT now() NOT NULL,
···145145);
146146--> statement-breakpoint
147147CREATE TABLE "artists" (
148148- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
148148+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
149149 "name" text NOT NULL,
150150 "biography" text,
151151 "born" timestamp,
···167167);
168168--> statement-breakpoint
169169CREATE TABLE "dropbox_accounts" (
170170- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
170170+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
171171 "email" text NOT NULL,
172172 "is_beta_user" boolean DEFAULT false NOT NULL,
173173 "user_id" text NOT NULL,
···178178);
179179--> statement-breakpoint
180180CREATE TABLE "dropbox_directories" (
181181- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
181181+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
182182 "name" text NOT NULL,
183183 "path" text NOT NULL,
184184 "parent_id" text,
···191191);
192192--> statement-breakpoint
193193CREATE TABLE "dropbox_paths" (
194194- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
194194+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
195195 "path" text NOT NULL,
196196 "name" text NOT NULL,
197197 "dropbox_id" text NOT NULL,
···205205);
206206--> statement-breakpoint
207207CREATE TABLE "dropbox_tokens" (
208208- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
208208+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
209209 "refresh_token" text NOT NULL,
210210 "xata_createdat" timestamp DEFAULT now() NOT NULL,
211211 "xata_updatedat" timestamp DEFAULT now() NOT NULL
212212);
213213--> statement-breakpoint
214214CREATE TABLE "dropbox" (
215215- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
215215+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
216216 "user_id" text NOT NULL,
217217 "dropbox_token_id" text NOT NULL,
218218 "xata_version" text,
···220220 "xata_updatedat" timestamp DEFAULT now() NOT NULL
221221);
222222--> statement-breakpoint
223223+CREATE TABLE "feeds" (
224224+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
225225+ "display_name" text NOT NULL,
226226+ "description" text,
227227+ "did" text NOT NULL,
228228+ "uri" text NOT NULL,
229229+ "avatar" text,
230230+ "user_id" text NOT NULL,
231231+ "xata_version" integer,
232232+ "xata_createdat" timestamp DEFAULT now() NOT NULL,
233233+ "xata_updatedat" timestamp DEFAULT now() NOT NULL,
234234+ CONSTRAINT "feeds_did_unique" UNIQUE("did"),
235235+ CONSTRAINT "feeds_uri_unique" UNIQUE("uri")
236236+);
237237+--> statement-breakpoint
223238CREATE TABLE "google_drive_accounts" (
224224- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
239239+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
225240 "email" text NOT NULL,
226241 "is_beta_user" boolean DEFAULT false NOT NULL,
227242 "user_id" text NOT NULL,
···232247);
233248--> statement-breakpoint
234249CREATE TABLE "google_drive_directories" (
235235- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
250250+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
236251 "name" text NOT NULL,
237252 "path" text NOT NULL,
238253 "parent_id" text,
···245260);
246261--> statement-breakpoint
247262CREATE TABLE "google_drive_paths" (
248248- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
263263+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
249264 "google_drive_id" text NOT NULL,
250265 "track_id" text NOT NULL,
251266 "name" text NOT NULL,
···258273);
259274--> statement-breakpoint
260275CREATE TABLE "google_drive_tokens" (
261261- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
276276+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
262277 "refresh_token" text NOT NULL,
263278 "xata_createdat" timestamp DEFAULT now() NOT NULL,
264279 "xata_updatedat" timestamp DEFAULT now() NOT NULL
265280);
266281--> statement-breakpoint
267282CREATE TABLE "google_drive" (
268268- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
283283+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
269284 "google_drive_token_id" text NOT NULL,
270285 "user_id" text NOT NULL,
271286 "xata_version" text,
···274289);
275290--> statement-breakpoint
276291CREATE TABLE "loved_tracks" (
277277- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
292292+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
278293 "user_id" text NOT NULL,
279294 "track_id" text NOT NULL,
280295 "uri" text,
···283298);
284299--> statement-breakpoint
285300CREATE TABLE "playlist_tracks" (
286286- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
301301+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
287302 "playlist_id" text NOT NULL,
288303 "track_id" text NOT NULL,
289304 "xata_createdat" timestamp DEFAULT now() NOT NULL
290305);
291306--> statement-breakpoint
292307CREATE TABLE "playlists" (
293293- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
308308+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
294309 "name" text NOT NULL,
295310 "picture" text,
296311 "description" text,
···305320);
306321--> statement-breakpoint
307322CREATE TABLE "profile_shouts" (
308308- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
323323+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
309324 "user_id" text NOT NULL,
310325 "shout_id" text NOT NULL,
311326 "xata_createdat" timestamp DEFAULT now() NOT NULL
312327);
313328--> statement-breakpoint
314329CREATE TABLE "queue_tracks" (
315315- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
330330+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
316331 "user_id" text NOT NULL,
317332 "track_id" text NOT NULL,
318333 "position" integer NOT NULL,
···323338);
324339--> statement-breakpoint
325340CREATE TABLE "scrobbles" (
326326- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
341341+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
327342 "user_id" text,
328343 "track_id" text,
329344 "album_id" text,
···337352);
338353--> statement-breakpoint
339354CREATE TABLE "shout_likes" (
340340- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
355355+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
341356 "user_id" text NOT NULL,
342357 "shout_id" text NOT NULL,
343358 "xata_createdat" timestamp DEFAULT now() NOT NULL,
···346361);
347362--> statement-breakpoint
348363CREATE TABLE "shout_reports" (
349349- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
364364+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
350365 "user_id" text NOT NULL,
351366 "shout_id" text NOT NULL,
352367 "xata_createdat" timestamp DEFAULT now() NOT NULL
353368);
354369--> statement-breakpoint
355370CREATE TABLE "shouts" (
356356- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
371371+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
357372 "content" text NOT NULL,
358373 "track_id" text,
359374 "artist_id" text,
···368383);
369384--> statement-breakpoint
370385CREATE TABLE "spotify_accounts" (
371371- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
386386+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
372387 "xata_version" integer,
373388 "email" text NOT NULL,
374389 "user_id" text NOT NULL,
375390 "is_beta_user" boolean DEFAULT false NOT NULL,
391391+ "spotify_app_id" text,
376392 "xata_createdat" timestamp DEFAULT now() NOT NULL,
377393 "xata_updatedat" timestamp DEFAULT now() NOT NULL
378394);
379395--> statement-breakpoint
396396+CREATE TABLE "spotify_apps" (
397397+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
398398+ "xata_version" integer,
399399+ "spotify_app_id" text NOT NULL,
400400+ "spotify_secret" text NOT NULL,
401401+ "xata_createdat" timestamp DEFAULT now() NOT NULL,
402402+ "xata_updatedat" timestamp DEFAULT now() NOT NULL,
403403+ CONSTRAINT "spotify_apps_spotify_app_id_unique" UNIQUE("spotify_app_id")
404404+);
405405+--> statement-breakpoint
380406CREATE TABLE "spotify_tokens" (
381381- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
407407+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
382408 "xata_version" integer,
383409 "access_token" text NOT NULL,
384410 "refresh_token" text NOT NULL,
385411 "user_id" text NOT NULL,
412412+ "spotify_app_id" text NOT NULL,
386413 "xata_createdat" timestamp DEFAULT now() NOT NULL,
387414 "xata_updatedat" timestamp DEFAULT now() NOT NULL
388415);
389416--> statement-breakpoint
390417CREATE TABLE "tracks" (
391391- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
418418+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
392419 "title" text NOT NULL,
393420 "artist" text NOT NULL,
394421 "album_artist" text NOT NULL,
···424451);
425452--> statement-breakpoint
426453CREATE TABLE "user_albums" (
427427- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
454454+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
428455 "user_id" text NOT NULL,
429456 "album_id" text NOT NULL,
430457 "xata_createdat" timestamp DEFAULT now() NOT NULL,
···436463);
437464--> statement-breakpoint
438465CREATE TABLE "user_artists" (
439439- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
466466+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
440467 "user_id" text NOT NULL,
441468 "artist_id" text NOT NULL,
442469 "xata_createdat" timestamp DEFAULT now() NOT NULL,
···448475);
449476--> statement-breakpoint
450477CREATE TABLE "user_playlists" (
451451- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
478478+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
452479 "user_id" text NOT NULL,
453480 "playlist_id" text NOT NULL,
454481 "xata_createdat" timestamp DEFAULT now() NOT NULL,
455455- "uri" text NOT NULL,
482482+ "uri" text,
456483 CONSTRAINT "user_playlists_uri_unique" UNIQUE("uri")
457484);
458485--> statement-breakpoint
459486CREATE TABLE "user_tracks" (
460460- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
487487+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
461488 "user_id" text NOT NULL,
462489 "track_id" text NOT NULL,
463490 "xata_createdat" timestamp DEFAULT now() NOT NULL,
···469496);
470497--> statement-breakpoint
471498CREATE TABLE "users" (
472472- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
499499+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
473500 "did" text NOT NULL,
474501 "display_name" text,
475502 "handle" text NOT NULL,
···482509);
483510--> statement-breakpoint
484511CREATE TABLE "webscrobblers" (
485485- "xata_id" text PRIMARY KEY DEFAULT xata_id(),
512512+ "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
486513 "name" text NOT NULL,
487514 "uuid" text NOT NULL,
488515 "description" text,
···504531ALTER 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
505532ALTER 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
506533ALTER 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
534534+ALTER TABLE "feeds" ADD CONSTRAINT "feeds_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
507535ALTER 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
508536ALTER 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
509537ALTER 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
···539567ALTER 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
540568ALTER 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
541569ALTER 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
542542-ALTER 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
570570+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;--> statement-breakpoint
543571ALTER 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
544572ALTER 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
545545-ALTER 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;573573+ALTER 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;
-1
apps/api/drizzle/0001_fluffy_epoch.sql
···11-ALTER TABLE "user_playlists" ALTER COLUMN "uri" DROP NOT NULL;
-3
apps/api/drizzle/0002_sweet_randall_flagg.sql
···11-ALTER TABLE "user_playlists" DROP CONSTRAINT "user_playlists_playlist_id_tracks_xata_id_fk";
22---> statement-breakpoint
33-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;
-34
apps/api/drizzle/0003_same_rocket_racer.sql
···11-ALTER TABLE "album_tracks" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
22-ALTER TABLE "albums" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
33-ALTER TABLE "api_keys" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
44-ALTER TABLE "artist_albums" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
55-ALTER TABLE "artist_tracks" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
66-ALTER TABLE "artists" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
77-ALTER TABLE "dropbox_accounts" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
88-ALTER TABLE "dropbox_directories" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
99-ALTER TABLE "dropbox_paths" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
1010-ALTER TABLE "dropbox_tokens" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
1111-ALTER TABLE "dropbox" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
1212-ALTER TABLE "google_drive_accounts" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
1313-ALTER TABLE "google_drive_directories" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
1414-ALTER TABLE "google_drive_paths" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
1515-ALTER TABLE "google_drive_tokens" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
1616-ALTER TABLE "google_drive" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
1717-ALTER TABLE "loved_tracks" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
1818-ALTER TABLE "playlist_tracks" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
1919-ALTER TABLE "playlists" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
2020-ALTER TABLE "profile_shouts" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
2121-ALTER TABLE "queue_tracks" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
2222-ALTER TABLE "scrobbles" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
2323-ALTER TABLE "shout_likes" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
2424-ALTER TABLE "shout_reports" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
2525-ALTER TABLE "shouts" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
2626-ALTER TABLE "spotify_accounts" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
2727-ALTER TABLE "spotify_tokens" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
2828-ALTER TABLE "tracks" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
2929-ALTER TABLE "user_albums" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
3030-ALTER TABLE "user_artists" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
3131-ALTER TABLE "user_playlists" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
3232-ALTER TABLE "user_tracks" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
3333-ALTER TABLE "users" ALTER COLUMN "xata_id" SET DEFAULT xata_id();--> statement-breakpoint
3434-ALTER TABLE "webscrobblers" ALTER COLUMN "xata_id" SET DEFAULT xata_id();
-10
apps/api/drizzle/0004_long_zzzax.sql
···11-CREATE TABLE "spotify_apps" (
22- "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
33- "xata_version" integer,
44- "spotify_app_id" text NOT NULL,
55- "xata_createdat" timestamp DEFAULT now() NOT NULL,
66- "xata_updatedat" timestamp DEFAULT now() NOT NULL
77-);
88---> statement-breakpoint
99-ALTER TABLE "spotify_accounts" ADD COLUMN "spotify_app_id" text NOT NULL;--> statement-breakpoint
1010-ALTER TABLE "spotify_tokens" ADD COLUMN "spotify_app_id" text NOT NULL;
-15
apps/api/drizzle/0004_whole_greymalkin.sql
···11-CREATE TABLE "feeds" (
22- "xata_id" text PRIMARY KEY DEFAULT xata_id() NOT NULL,
33- "display_name" text NOT NULL,
44- "description" text,
55- "did" text NOT NULL,
66- "uri" text NOT NULL,
77- "user_id" text NOT NULL,
88- "xata_version" integer,
99- "xata_createdat" timestamp DEFAULT now() NOT NULL,
1010- "xata_updatedat" timestamp DEFAULT now() NOT NULL,
1111- CONSTRAINT "feeds_did_unique" UNIQUE("did"),
1212- CONSTRAINT "feeds_uri_unique" UNIQUE("uri")
1313-);
1414---> statement-breakpoint
1515-ALTER TABLE "feeds" ADD CONSTRAINT "feeds_user_id_users_xata_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("xata_id") ON DELETE no action ON UPDATE no action;
···11-ALTER TABLE "spotify_accounts" ALTER COLUMN "spotify_app_id" DROP NOT NULL;--> statement-breakpoint
22-ALTER TABLE "spotify_apps" ADD COLUMN "spotify_secret" text NOT NULL;