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