@rocksky/cli 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/README.md +21 -9
  2. package/dist/drizzle/0000_parallel_paper_doll.sql +220 -0
  3. package/dist/drizzle/meta/0000_snapshot.json +1559 -0
  4. package/dist/drizzle/meta/_journal.json +13 -0
  5. package/dist/index.js +8280 -254
  6. package/drizzle/0000_parallel_paper_doll.sql +220 -0
  7. package/drizzle/meta/0000_snapshot.json +1559 -0
  8. package/drizzle/meta/_journal.json +13 -0
  9. package/drizzle.config.ts +18 -0
  10. package/package.json +31 -3
  11. package/src/client.ts +32 -14
  12. package/src/cmd/scrobble-api.ts +457 -0
  13. package/src/cmd/scrobble.ts +14 -61
  14. package/src/cmd/search.ts +27 -25
  15. package/src/cmd/sync.ts +812 -0
  16. package/src/cmd/whoami.ts +36 -7
  17. package/src/context.ts +24 -0
  18. package/src/drizzle.ts +53 -0
  19. package/src/index.ts +66 -26
  20. package/src/jetstream.ts +285 -0
  21. package/src/lexicon/index.ts +1321 -0
  22. package/src/lexicon/lexicons.ts +5453 -0
  23. package/src/lexicon/types/app/bsky/actor/profile.ts +38 -0
  24. package/src/lexicon/types/app/rocksky/actor/defs.ts +146 -0
  25. package/src/lexicon/types/app/rocksky/actor/getActorAlbums.ts +56 -0
  26. package/src/lexicon/types/app/rocksky/actor/getActorArtists.ts +56 -0
  27. package/src/lexicon/types/app/rocksky/actor/getActorCompatibility.ts +48 -0
  28. package/src/lexicon/types/app/rocksky/actor/getActorLovedSongs.ts +52 -0
  29. package/src/lexicon/types/app/rocksky/actor/getActorNeighbours.ts +48 -0
  30. package/src/lexicon/types/app/rocksky/actor/getActorPlaylists.ts +52 -0
  31. package/src/lexicon/types/app/rocksky/actor/getActorScrobbles.ts +52 -0
  32. package/src/lexicon/types/app/rocksky/actor/getActorSongs.ts +56 -0
  33. package/src/lexicon/types/app/rocksky/actor/getProfile.ts +43 -0
  34. package/src/lexicon/types/app/rocksky/album/defs.ts +85 -0
  35. package/src/lexicon/types/app/rocksky/album/getAlbum.ts +43 -0
  36. package/src/lexicon/types/app/rocksky/album/getAlbumTracks.ts +48 -0
  37. package/src/lexicon/types/app/rocksky/album/getAlbums.ts +50 -0
  38. package/src/lexicon/types/app/rocksky/album.ts +51 -0
  39. package/src/lexicon/types/app/rocksky/apikey/createApikey.ts +51 -0
  40. package/src/lexicon/types/app/rocksky/apikey/defs.ts +31 -0
  41. package/src/lexicon/types/app/rocksky/apikey/getApikeys.ts +50 -0
  42. package/src/lexicon/types/app/rocksky/apikey/removeApikey.ts +43 -0
  43. package/src/lexicon/types/app/rocksky/apikey/updateApikey.ts +53 -0
  44. package/src/lexicon/types/app/rocksky/apikeys/defs.ts +7 -0
  45. package/src/lexicon/types/app/rocksky/artist/defs.ts +140 -0
  46. package/src/lexicon/types/app/rocksky/artist/getArtist.ts +43 -0
  47. package/src/lexicon/types/app/rocksky/artist/getArtistAlbums.ts +48 -0
  48. package/src/lexicon/types/app/rocksky/artist/getArtistListeners.ts +52 -0
  49. package/src/lexicon/types/app/rocksky/artist/getArtistTracks.ts +52 -0
  50. package/src/lexicon/types/app/rocksky/artist/getArtists.ts +52 -0
  51. package/src/lexicon/types/app/rocksky/artist.ts +41 -0
  52. package/src/lexicon/types/app/rocksky/charts/defs.ts +44 -0
  53. package/src/lexicon/types/app/rocksky/charts/getScrobblesChart.ts +49 -0
  54. package/src/lexicon/types/app/rocksky/dropbox/defs.ts +71 -0
  55. package/src/lexicon/types/app/rocksky/dropbox/downloadFile.ts +42 -0
  56. package/src/lexicon/types/app/rocksky/dropbox/getFiles.ts +43 -0
  57. package/src/lexicon/types/app/rocksky/dropbox/getMetadata.ts +43 -0
  58. package/src/lexicon/types/app/rocksky/dropbox/getTemporaryLink.ts +43 -0
  59. package/src/lexicon/types/app/rocksky/feed/defs.ts +182 -0
  60. package/src/lexicon/types/app/rocksky/feed/describeFeedGenerator.ts +48 -0
  61. package/src/lexicon/types/app/rocksky/feed/generator.ts +29 -0
  62. package/src/lexicon/types/app/rocksky/feed/getFeed.ts +47 -0
  63. package/src/lexicon/types/app/rocksky/feed/getFeedGenerator.ts +48 -0
  64. package/src/lexicon/types/app/rocksky/feed/getFeedGenerators.ts +43 -0
  65. package/src/lexicon/types/app/rocksky/feed/getFeedSkeleton.ts +56 -0
  66. package/src/lexicon/types/app/rocksky/feed/getNowPlayings.ts +43 -0
  67. package/src/lexicon/types/app/rocksky/feed/search.ts +43 -0
  68. package/src/lexicon/types/app/rocksky/googledrive/defs.ts +42 -0
  69. package/src/lexicon/types/app/rocksky/googledrive/downloadFile.ts +42 -0
  70. package/src/lexicon/types/app/rocksky/googledrive/getFile.ts +43 -0
  71. package/src/lexicon/types/app/rocksky/googledrive/getFiles.ts +43 -0
  72. package/src/lexicon/types/app/rocksky/graph/defs.ts +47 -0
  73. package/src/lexicon/types/app/rocksky/graph/follow.ts +28 -0
  74. package/src/lexicon/types/app/rocksky/graph/followAccount.ts +50 -0
  75. package/src/lexicon/types/app/rocksky/graph/getFollowers.ts +56 -0
  76. package/src/lexicon/types/app/rocksky/graph/getFollows.ts +56 -0
  77. package/src/lexicon/types/app/rocksky/graph/getKnownFollowers.ts +52 -0
  78. package/src/lexicon/types/app/rocksky/graph/unfollowAccount.ts +50 -0
  79. package/src/lexicon/types/app/rocksky/like/dislikeShout.ts +49 -0
  80. package/src/lexicon/types/app/rocksky/like/dislikeSong.ts +49 -0
  81. package/src/lexicon/types/app/rocksky/like/likeShout.ts +49 -0
  82. package/src/lexicon/types/app/rocksky/like/likeSong.ts +49 -0
  83. package/src/lexicon/types/app/rocksky/like.ts +27 -0
  84. package/src/lexicon/types/app/rocksky/player/addDirectoryToQueue.ts +40 -0
  85. package/src/lexicon/types/app/rocksky/player/addItemsToQueue.ts +39 -0
  86. package/src/lexicon/types/app/rocksky/player/defs.ts +57 -0
  87. package/src/lexicon/types/app/rocksky/player/getCurrentlyPlaying.ts +44 -0
  88. package/src/lexicon/types/app/rocksky/player/getPlaybackQueue.ts +42 -0
  89. package/src/lexicon/types/app/rocksky/player/next.ts +34 -0
  90. package/src/lexicon/types/app/rocksky/player/pause.ts +34 -0
  91. package/src/lexicon/types/app/rocksky/player/play.ts +34 -0
  92. package/src/lexicon/types/app/rocksky/player/playDirectory.ts +38 -0
  93. package/src/lexicon/types/app/rocksky/player/playFile.ts +35 -0
  94. package/src/lexicon/types/app/rocksky/player/previous.ts +34 -0
  95. package/src/lexicon/types/app/rocksky/player/seek.ts +36 -0
  96. package/src/lexicon/types/app/rocksky/playlist/createPlaylist.ts +37 -0
  97. package/src/lexicon/types/app/rocksky/playlist/defs.ts +86 -0
  98. package/src/lexicon/types/app/rocksky/playlist/getPlaylist.ts +43 -0
  99. package/src/lexicon/types/app/rocksky/playlist/getPlaylists.ts +50 -0
  100. package/src/lexicon/types/app/rocksky/playlist/insertDirectory.ts +39 -0
  101. package/src/lexicon/types/app/rocksky/playlist/insertFiles.ts +38 -0
  102. package/src/lexicon/types/app/rocksky/playlist/removePlaylist.ts +35 -0
  103. package/src/lexicon/types/app/rocksky/playlist/removeTrack.ts +37 -0
  104. package/src/lexicon/types/app/rocksky/playlist/startPlaylist.ts +39 -0
  105. package/src/lexicon/types/app/rocksky/playlist.ts +43 -0
  106. package/src/lexicon/types/app/rocksky/radio/defs.ts +63 -0
  107. package/src/lexicon/types/app/rocksky/radio.ts +37 -0
  108. package/src/lexicon/types/app/rocksky/scrobble/createScrobble.ts +91 -0
  109. package/src/lexicon/types/app/rocksky/scrobble/defs.ts +93 -0
  110. package/src/lexicon/types/app/rocksky/scrobble/getScrobble.ts +43 -0
  111. package/src/lexicon/types/app/rocksky/scrobble/getScrobbles.ts +54 -0
  112. package/src/lexicon/types/app/rocksky/scrobble.ts +75 -0
  113. package/src/lexicon/types/app/rocksky/shout/createShout.ts +49 -0
  114. package/src/lexicon/types/app/rocksky/shout/defs.ts +58 -0
  115. package/src/lexicon/types/app/rocksky/shout/getAlbumShouts.ts +52 -0
  116. package/src/lexicon/types/app/rocksky/shout/getArtistShouts.ts +52 -0
  117. package/src/lexicon/types/app/rocksky/shout/getProfileShouts.ts +52 -0
  118. package/src/lexicon/types/app/rocksky/shout/getShoutReplies.ts +52 -0
  119. package/src/lexicon/types/app/rocksky/shout/getTrackShouts.ts +48 -0
  120. package/src/lexicon/types/app/rocksky/shout/removeShout.ts +43 -0
  121. package/src/lexicon/types/app/rocksky/shout/replyShout.ts +51 -0
  122. package/src/lexicon/types/app/rocksky/shout/reportShout.ts +51 -0
  123. package/src/lexicon/types/app/rocksky/shout.ts +30 -0
  124. package/src/lexicon/types/app/rocksky/song/createSong.ts +71 -0
  125. package/src/lexicon/types/app/rocksky/song/defs.ts +103 -0
  126. package/src/lexicon/types/app/rocksky/song/getSong.ts +43 -0
  127. package/src/lexicon/types/app/rocksky/song/getSongs.ts +50 -0
  128. package/src/lexicon/types/app/rocksky/song.ts +74 -0
  129. package/src/lexicon/types/app/rocksky/spotify/defs.ts +35 -0
  130. package/src/lexicon/types/app/rocksky/spotify/getCurrentlyPlaying.ts +43 -0
  131. package/src/lexicon/types/app/rocksky/spotify/next.ts +32 -0
  132. package/src/lexicon/types/app/rocksky/spotify/pause.ts +32 -0
  133. package/src/lexicon/types/app/rocksky/spotify/play.ts +32 -0
  134. package/src/lexicon/types/app/rocksky/spotify/previous.ts +32 -0
  135. package/src/lexicon/types/app/rocksky/spotify/seek.ts +35 -0
  136. package/src/lexicon/types/app/rocksky/stats/defs.ts +33 -0
  137. package/src/lexicon/types/app/rocksky/stats/getStats.ts +43 -0
  138. package/src/lexicon/types/com/atproto/repo/strongRef.ts +26 -0
  139. package/src/lexicon/util.ts +13 -0
  140. package/src/lib/agent.ts +56 -0
  141. package/src/lib/cleanUpJetstreamLock.ts +66 -0
  142. package/src/lib/cleanUpSyncLock.ts +56 -0
  143. package/src/lib/didUnstorageCache.ts +72 -0
  144. package/src/lib/env.ts +25 -0
  145. package/src/lib/extractPdsFromDid.ts +33 -0
  146. package/src/lib/getDidAndHandle.ts +39 -0
  147. package/src/lib/idResolver.ts +52 -0
  148. package/src/lib/lastfm.ts +26 -0
  149. package/src/lib/matchTrack.ts +47 -0
  150. package/src/logger.ts +18 -0
  151. package/src/schema/album-tracks.ts +30 -0
  152. package/src/schema/albums.ts +29 -0
  153. package/src/schema/artist-albums.ts +29 -0
  154. package/src/schema/artist-genres.ts +17 -0
  155. package/src/schema/artist-tracks.ts +29 -0
  156. package/src/schema/artists.ts +30 -0
  157. package/src/schema/auth-session.ts +18 -0
  158. package/src/schema/genres.ts +18 -0
  159. package/src/schema/index.ts +33 -0
  160. package/src/schema/loved-tracks.ts +27 -0
  161. package/src/schema/scrobbles.ts +30 -0
  162. package/src/schema/tracks.ts +39 -0
  163. package/src/schema/user-albums.ts +31 -0
  164. package/src/schema/user-artists.ts +32 -0
  165. package/src/schema/user-tracks.ts +31 -0
  166. package/src/schema/users.ts +21 -0
  167. package/src/scrobble.ts +410 -0
  168. package/src/sqliteKv.ts +173 -0
  169. package/src/types.ts +308 -0
  170. package/tsconfig.json +26 -29
@@ -0,0 +1,1559 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "926f883e-c7c5-4c01-b88b-c8f7f649559a",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "album_tracks": {
8
+ "name": "album_tracks",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "album_id": {
18
+ "name": "album_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "track_id": {
25
+ "name": "track_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "created_at": {
32
+ "name": "created_at",
33
+ "type": "integer",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false,
37
+ "default": "(unixepoch())"
38
+ },
39
+ "updated_at": {
40
+ "name": "updated_at",
41
+ "type": "integer",
42
+ "primaryKey": false,
43
+ "notNull": true,
44
+ "autoincrement": false,
45
+ "default": "(unixepoch())"
46
+ }
47
+ },
48
+ "indexes": {
49
+ "album_tracks_unique_index": {
50
+ "name": "album_tracks_unique_index",
51
+ "columns": [
52
+ "album_id",
53
+ "track_id"
54
+ ],
55
+ "isUnique": true
56
+ }
57
+ },
58
+ "foreignKeys": {
59
+ "album_tracks_album_id_albums_id_fk": {
60
+ "name": "album_tracks_album_id_albums_id_fk",
61
+ "tableFrom": "album_tracks",
62
+ "tableTo": "albums",
63
+ "columnsFrom": [
64
+ "album_id"
65
+ ],
66
+ "columnsTo": [
67
+ "id"
68
+ ],
69
+ "onDelete": "no action",
70
+ "onUpdate": "no action"
71
+ },
72
+ "album_tracks_track_id_tracks_id_fk": {
73
+ "name": "album_tracks_track_id_tracks_id_fk",
74
+ "tableFrom": "album_tracks",
75
+ "tableTo": "tracks",
76
+ "columnsFrom": [
77
+ "track_id"
78
+ ],
79
+ "columnsTo": [
80
+ "id"
81
+ ],
82
+ "onDelete": "no action",
83
+ "onUpdate": "no action"
84
+ }
85
+ },
86
+ "compositePrimaryKeys": {},
87
+ "uniqueConstraints": {},
88
+ "checkConstraints": {}
89
+ },
90
+ "albums": {
91
+ "name": "albums",
92
+ "columns": {
93
+ "id": {
94
+ "name": "id",
95
+ "type": "text",
96
+ "primaryKey": true,
97
+ "notNull": true,
98
+ "autoincrement": false
99
+ },
100
+ "title": {
101
+ "name": "title",
102
+ "type": "text",
103
+ "primaryKey": false,
104
+ "notNull": true,
105
+ "autoincrement": false
106
+ },
107
+ "artist": {
108
+ "name": "artist",
109
+ "type": "text",
110
+ "primaryKey": false,
111
+ "notNull": true,
112
+ "autoincrement": false
113
+ },
114
+ "release_date": {
115
+ "name": "release_date",
116
+ "type": "text",
117
+ "primaryKey": false,
118
+ "notNull": false,
119
+ "autoincrement": false
120
+ },
121
+ "year": {
122
+ "name": "year",
123
+ "type": "integer",
124
+ "primaryKey": false,
125
+ "notNull": false,
126
+ "autoincrement": false
127
+ },
128
+ "album_art": {
129
+ "name": "album_art",
130
+ "type": "text",
131
+ "primaryKey": false,
132
+ "notNull": false,
133
+ "autoincrement": false
134
+ },
135
+ "uri": {
136
+ "name": "uri",
137
+ "type": "text",
138
+ "primaryKey": false,
139
+ "notNull": false,
140
+ "autoincrement": false
141
+ },
142
+ "cid": {
143
+ "name": "cid",
144
+ "type": "text",
145
+ "primaryKey": false,
146
+ "notNull": true,
147
+ "autoincrement": false
148
+ },
149
+ "artist_uri": {
150
+ "name": "artist_uri",
151
+ "type": "text",
152
+ "primaryKey": false,
153
+ "notNull": false,
154
+ "autoincrement": false
155
+ },
156
+ "apple_music_link": {
157
+ "name": "apple_music_link",
158
+ "type": "text",
159
+ "primaryKey": false,
160
+ "notNull": false,
161
+ "autoincrement": false
162
+ },
163
+ "spotify_link": {
164
+ "name": "spotify_link",
165
+ "type": "text",
166
+ "primaryKey": false,
167
+ "notNull": false,
168
+ "autoincrement": false
169
+ },
170
+ "tidal_link": {
171
+ "name": "tidal_link",
172
+ "type": "text",
173
+ "primaryKey": false,
174
+ "notNull": false,
175
+ "autoincrement": false
176
+ },
177
+ "youtube_link": {
178
+ "name": "youtube_link",
179
+ "type": "text",
180
+ "primaryKey": false,
181
+ "notNull": false,
182
+ "autoincrement": false
183
+ },
184
+ "created_at": {
185
+ "name": "created_at",
186
+ "type": "integer",
187
+ "primaryKey": false,
188
+ "notNull": true,
189
+ "autoincrement": false,
190
+ "default": "(unixepoch())"
191
+ },
192
+ "updated_at": {
193
+ "name": "updated_at",
194
+ "type": "integer",
195
+ "primaryKey": false,
196
+ "notNull": true,
197
+ "autoincrement": false,
198
+ "default": "(unixepoch())"
199
+ }
200
+ },
201
+ "indexes": {
202
+ "albums_uri_unique": {
203
+ "name": "albums_uri_unique",
204
+ "columns": [
205
+ "uri"
206
+ ],
207
+ "isUnique": true
208
+ },
209
+ "albums_cid_unique": {
210
+ "name": "albums_cid_unique",
211
+ "columns": [
212
+ "cid"
213
+ ],
214
+ "isUnique": true
215
+ },
216
+ "albums_apple_music_link_unique": {
217
+ "name": "albums_apple_music_link_unique",
218
+ "columns": [
219
+ "apple_music_link"
220
+ ],
221
+ "isUnique": true
222
+ },
223
+ "albums_spotify_link_unique": {
224
+ "name": "albums_spotify_link_unique",
225
+ "columns": [
226
+ "spotify_link"
227
+ ],
228
+ "isUnique": true
229
+ },
230
+ "albums_tidal_link_unique": {
231
+ "name": "albums_tidal_link_unique",
232
+ "columns": [
233
+ "tidal_link"
234
+ ],
235
+ "isUnique": true
236
+ },
237
+ "albums_youtube_link_unique": {
238
+ "name": "albums_youtube_link_unique",
239
+ "columns": [
240
+ "youtube_link"
241
+ ],
242
+ "isUnique": true
243
+ }
244
+ },
245
+ "foreignKeys": {},
246
+ "compositePrimaryKeys": {},
247
+ "uniqueConstraints": {},
248
+ "checkConstraints": {}
249
+ },
250
+ "artist_albums": {
251
+ "name": "artist_albums",
252
+ "columns": {
253
+ "id": {
254
+ "name": "id",
255
+ "type": "text",
256
+ "primaryKey": true,
257
+ "notNull": true,
258
+ "autoincrement": false
259
+ },
260
+ "artist_id": {
261
+ "name": "artist_id",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": true,
265
+ "autoincrement": false
266
+ },
267
+ "album_id": {
268
+ "name": "album_id",
269
+ "type": "text",
270
+ "primaryKey": false,
271
+ "notNull": true,
272
+ "autoincrement": false
273
+ },
274
+ "created_at": {
275
+ "name": "created_at",
276
+ "type": "integer",
277
+ "primaryKey": false,
278
+ "notNull": true,
279
+ "autoincrement": false,
280
+ "default": "(unixepoch())"
281
+ },
282
+ "updated_at": {
283
+ "name": "updated_at",
284
+ "type": "integer",
285
+ "primaryKey": false,
286
+ "notNull": true,
287
+ "autoincrement": false,
288
+ "default": "(unixepoch())"
289
+ }
290
+ },
291
+ "indexes": {
292
+ "artist_albums_unique_index": {
293
+ "name": "artist_albums_unique_index",
294
+ "columns": [
295
+ "artist_id",
296
+ "album_id"
297
+ ],
298
+ "isUnique": true
299
+ }
300
+ },
301
+ "foreignKeys": {
302
+ "artist_albums_artist_id_artists_id_fk": {
303
+ "name": "artist_albums_artist_id_artists_id_fk",
304
+ "tableFrom": "artist_albums",
305
+ "tableTo": "artists",
306
+ "columnsFrom": [
307
+ "artist_id"
308
+ ],
309
+ "columnsTo": [
310
+ "id"
311
+ ],
312
+ "onDelete": "no action",
313
+ "onUpdate": "no action"
314
+ },
315
+ "artist_albums_album_id_albums_id_fk": {
316
+ "name": "artist_albums_album_id_albums_id_fk",
317
+ "tableFrom": "artist_albums",
318
+ "tableTo": "albums",
319
+ "columnsFrom": [
320
+ "album_id"
321
+ ],
322
+ "columnsTo": [
323
+ "id"
324
+ ],
325
+ "onDelete": "no action",
326
+ "onUpdate": "no action"
327
+ }
328
+ },
329
+ "compositePrimaryKeys": {},
330
+ "uniqueConstraints": {},
331
+ "checkConstraints": {}
332
+ },
333
+ "artist_genres ": {
334
+ "name": "artist_genres ",
335
+ "columns": {
336
+ "id": {
337
+ "name": "id",
338
+ "type": "text",
339
+ "primaryKey": true,
340
+ "notNull": true,
341
+ "autoincrement": false
342
+ },
343
+ "artist_id": {
344
+ "name": "artist_id",
345
+ "type": "text",
346
+ "primaryKey": false,
347
+ "notNull": true,
348
+ "autoincrement": false
349
+ },
350
+ "genre_id": {
351
+ "name": "genre_id",
352
+ "type": "text",
353
+ "primaryKey": false,
354
+ "notNull": true,
355
+ "autoincrement": false
356
+ }
357
+ },
358
+ "indexes": {
359
+ "artist_genre_unique_index": {
360
+ "name": "artist_genre_unique_index",
361
+ "columns": [
362
+ "artist_id",
363
+ "genre_id"
364
+ ],
365
+ "isUnique": true
366
+ }
367
+ },
368
+ "foreignKeys": {},
369
+ "compositePrimaryKeys": {},
370
+ "uniqueConstraints": {},
371
+ "checkConstraints": {}
372
+ },
373
+ "artist_tracks": {
374
+ "name": "artist_tracks",
375
+ "columns": {
376
+ "id": {
377
+ "name": "id",
378
+ "type": "text",
379
+ "primaryKey": true,
380
+ "notNull": true,
381
+ "autoincrement": false
382
+ },
383
+ "artist_id": {
384
+ "name": "artist_id",
385
+ "type": "text",
386
+ "primaryKey": false,
387
+ "notNull": true,
388
+ "autoincrement": false
389
+ },
390
+ "track_id": {
391
+ "name": "track_id",
392
+ "type": "text",
393
+ "primaryKey": false,
394
+ "notNull": true,
395
+ "autoincrement": false
396
+ },
397
+ "created_at": {
398
+ "name": "created_at",
399
+ "type": "integer",
400
+ "primaryKey": false,
401
+ "notNull": true,
402
+ "autoincrement": false,
403
+ "default": "(unixepoch())"
404
+ },
405
+ "updated_at": {
406
+ "name": "updated_at",
407
+ "type": "integer",
408
+ "primaryKey": false,
409
+ "notNull": true,
410
+ "autoincrement": false,
411
+ "default": "(unixepoch())"
412
+ }
413
+ },
414
+ "indexes": {
415
+ "artist_tracks_unique_index": {
416
+ "name": "artist_tracks_unique_index",
417
+ "columns": [
418
+ "artist_id",
419
+ "track_id"
420
+ ],
421
+ "isUnique": true
422
+ }
423
+ },
424
+ "foreignKeys": {
425
+ "artist_tracks_artist_id_artists_id_fk": {
426
+ "name": "artist_tracks_artist_id_artists_id_fk",
427
+ "tableFrom": "artist_tracks",
428
+ "tableTo": "artists",
429
+ "columnsFrom": [
430
+ "artist_id"
431
+ ],
432
+ "columnsTo": [
433
+ "id"
434
+ ],
435
+ "onDelete": "no action",
436
+ "onUpdate": "no action"
437
+ },
438
+ "artist_tracks_track_id_tracks_id_fk": {
439
+ "name": "artist_tracks_track_id_tracks_id_fk",
440
+ "tableFrom": "artist_tracks",
441
+ "tableTo": "tracks",
442
+ "columnsFrom": [
443
+ "track_id"
444
+ ],
445
+ "columnsTo": [
446
+ "id"
447
+ ],
448
+ "onDelete": "no action",
449
+ "onUpdate": "no action"
450
+ }
451
+ },
452
+ "compositePrimaryKeys": {},
453
+ "uniqueConstraints": {},
454
+ "checkConstraints": {}
455
+ },
456
+ "artists": {
457
+ "name": "artists",
458
+ "columns": {
459
+ "id": {
460
+ "name": "id",
461
+ "type": "text",
462
+ "primaryKey": true,
463
+ "notNull": true,
464
+ "autoincrement": false
465
+ },
466
+ "name": {
467
+ "name": "name",
468
+ "type": "text",
469
+ "primaryKey": false,
470
+ "notNull": true,
471
+ "autoincrement": false
472
+ },
473
+ "biography": {
474
+ "name": "biography",
475
+ "type": "text",
476
+ "primaryKey": false,
477
+ "notNull": false,
478
+ "autoincrement": false
479
+ },
480
+ "born": {
481
+ "name": "born",
482
+ "type": "integer",
483
+ "primaryKey": false,
484
+ "notNull": false,
485
+ "autoincrement": false
486
+ },
487
+ "born_in": {
488
+ "name": "born_in",
489
+ "type": "text",
490
+ "primaryKey": false,
491
+ "notNull": false,
492
+ "autoincrement": false
493
+ },
494
+ "died": {
495
+ "name": "died",
496
+ "type": "integer",
497
+ "primaryKey": false,
498
+ "notNull": false,
499
+ "autoincrement": false
500
+ },
501
+ "picture": {
502
+ "name": "picture",
503
+ "type": "text",
504
+ "primaryKey": false,
505
+ "notNull": false,
506
+ "autoincrement": false
507
+ },
508
+ "uri": {
509
+ "name": "uri",
510
+ "type": "text",
511
+ "primaryKey": false,
512
+ "notNull": false,
513
+ "autoincrement": false
514
+ },
515
+ "cid": {
516
+ "name": "cid",
517
+ "type": "text",
518
+ "primaryKey": false,
519
+ "notNull": true,
520
+ "autoincrement": false
521
+ },
522
+ "apple_music_link": {
523
+ "name": "apple_music_link",
524
+ "type": "text",
525
+ "primaryKey": false,
526
+ "notNull": false,
527
+ "autoincrement": false
528
+ },
529
+ "spotify_link": {
530
+ "name": "spotify_link",
531
+ "type": "text",
532
+ "primaryKey": false,
533
+ "notNull": false,
534
+ "autoincrement": false
535
+ },
536
+ "tidal_link": {
537
+ "name": "tidal_link",
538
+ "type": "text",
539
+ "primaryKey": false,
540
+ "notNull": false,
541
+ "autoincrement": false
542
+ },
543
+ "youtube_link": {
544
+ "name": "youtube_link",
545
+ "type": "text",
546
+ "primaryKey": false,
547
+ "notNull": false,
548
+ "autoincrement": false
549
+ },
550
+ "genres": {
551
+ "name": "genres",
552
+ "type": "text",
553
+ "primaryKey": false,
554
+ "notNull": false,
555
+ "autoincrement": false
556
+ },
557
+ "created_at": {
558
+ "name": "created_at",
559
+ "type": "integer",
560
+ "primaryKey": false,
561
+ "notNull": true,
562
+ "autoincrement": false,
563
+ "default": "(unixepoch())"
564
+ },
565
+ "updated_at": {
566
+ "name": "updated_at",
567
+ "type": "integer",
568
+ "primaryKey": false,
569
+ "notNull": true,
570
+ "autoincrement": false,
571
+ "default": "(unixepoch())"
572
+ }
573
+ },
574
+ "indexes": {
575
+ "artists_uri_unique": {
576
+ "name": "artists_uri_unique",
577
+ "columns": [
578
+ "uri"
579
+ ],
580
+ "isUnique": true
581
+ },
582
+ "artists_cid_unique": {
583
+ "name": "artists_cid_unique",
584
+ "columns": [
585
+ "cid"
586
+ ],
587
+ "isUnique": true
588
+ }
589
+ },
590
+ "foreignKeys": {},
591
+ "compositePrimaryKeys": {},
592
+ "uniqueConstraints": {},
593
+ "checkConstraints": {}
594
+ },
595
+ "auth_sessions": {
596
+ "name": "auth_sessions",
597
+ "columns": {
598
+ "key": {
599
+ "name": "key",
600
+ "type": "text",
601
+ "primaryKey": true,
602
+ "notNull": true,
603
+ "autoincrement": false
604
+ },
605
+ "session": {
606
+ "name": "session",
607
+ "type": "text",
608
+ "primaryKey": false,
609
+ "notNull": true,
610
+ "autoincrement": false
611
+ },
612
+ "created_at": {
613
+ "name": "created_at",
614
+ "type": "integer",
615
+ "primaryKey": false,
616
+ "notNull": true,
617
+ "autoincrement": false,
618
+ "default": "(unixepoch())"
619
+ },
620
+ "updated_at": {
621
+ "name": "updated_at",
622
+ "type": "integer",
623
+ "primaryKey": false,
624
+ "notNull": true,
625
+ "autoincrement": false,
626
+ "default": "(unixepoch())"
627
+ }
628
+ },
629
+ "indexes": {},
630
+ "foreignKeys": {},
631
+ "compositePrimaryKeys": {},
632
+ "uniqueConstraints": {},
633
+ "checkConstraints": {}
634
+ },
635
+ "genres": {
636
+ "name": "genres",
637
+ "columns": {
638
+ "id": {
639
+ "name": "id",
640
+ "type": "text",
641
+ "primaryKey": true,
642
+ "notNull": true,
643
+ "autoincrement": false
644
+ },
645
+ "name": {
646
+ "name": "name",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": true,
650
+ "autoincrement": false
651
+ },
652
+ "created_at": {
653
+ "name": "created_at",
654
+ "type": "integer",
655
+ "primaryKey": false,
656
+ "notNull": true,
657
+ "autoincrement": false,
658
+ "default": "(unixepoch())"
659
+ },
660
+ "updated_at": {
661
+ "name": "updated_at",
662
+ "type": "integer",
663
+ "primaryKey": false,
664
+ "notNull": true,
665
+ "autoincrement": false,
666
+ "default": "(unixepoch())"
667
+ }
668
+ },
669
+ "indexes": {
670
+ "genres_name_unique": {
671
+ "name": "genres_name_unique",
672
+ "columns": [
673
+ "name"
674
+ ],
675
+ "isUnique": true
676
+ }
677
+ },
678
+ "foreignKeys": {},
679
+ "compositePrimaryKeys": {},
680
+ "uniqueConstraints": {},
681
+ "checkConstraints": {}
682
+ },
683
+ "loved_tracks": {
684
+ "name": "loved_tracks",
685
+ "columns": {
686
+ "id": {
687
+ "name": "id",
688
+ "type": "text",
689
+ "primaryKey": true,
690
+ "notNull": true,
691
+ "autoincrement": false
692
+ },
693
+ "user_id": {
694
+ "name": "user_id",
695
+ "type": "text",
696
+ "primaryKey": false,
697
+ "notNull": true,
698
+ "autoincrement": false
699
+ },
700
+ "track_id": {
701
+ "name": "track_id",
702
+ "type": "text",
703
+ "primaryKey": false,
704
+ "notNull": true,
705
+ "autoincrement": false
706
+ },
707
+ "uri": {
708
+ "name": "uri",
709
+ "type": "text",
710
+ "primaryKey": false,
711
+ "notNull": false,
712
+ "autoincrement": false
713
+ },
714
+ "created_at": {
715
+ "name": "created_at",
716
+ "type": "integer",
717
+ "primaryKey": false,
718
+ "notNull": true,
719
+ "autoincrement": false,
720
+ "default": "(unixepoch())"
721
+ }
722
+ },
723
+ "indexes": {
724
+ "loved_tracks_uri_unique": {
725
+ "name": "loved_tracks_uri_unique",
726
+ "columns": [
727
+ "uri"
728
+ ],
729
+ "isUnique": true
730
+ },
731
+ "loved_tracks_unique_index": {
732
+ "name": "loved_tracks_unique_index",
733
+ "columns": [
734
+ "user_id",
735
+ "track_id"
736
+ ],
737
+ "isUnique": true
738
+ }
739
+ },
740
+ "foreignKeys": {
741
+ "loved_tracks_user_id_users_id_fk": {
742
+ "name": "loved_tracks_user_id_users_id_fk",
743
+ "tableFrom": "loved_tracks",
744
+ "tableTo": "users",
745
+ "columnsFrom": [
746
+ "user_id"
747
+ ],
748
+ "columnsTo": [
749
+ "id"
750
+ ],
751
+ "onDelete": "no action",
752
+ "onUpdate": "no action"
753
+ },
754
+ "loved_tracks_track_id_tracks_id_fk": {
755
+ "name": "loved_tracks_track_id_tracks_id_fk",
756
+ "tableFrom": "loved_tracks",
757
+ "tableTo": "tracks",
758
+ "columnsFrom": [
759
+ "track_id"
760
+ ],
761
+ "columnsTo": [
762
+ "id"
763
+ ],
764
+ "onDelete": "no action",
765
+ "onUpdate": "no action"
766
+ }
767
+ },
768
+ "compositePrimaryKeys": {},
769
+ "uniqueConstraints": {},
770
+ "checkConstraints": {}
771
+ },
772
+ "scrobbles": {
773
+ "name": "scrobbles",
774
+ "columns": {
775
+ "xata_id": {
776
+ "name": "xata_id",
777
+ "type": "text",
778
+ "primaryKey": true,
779
+ "notNull": true,
780
+ "autoincrement": false
781
+ },
782
+ "user_id": {
783
+ "name": "user_id",
784
+ "type": "text",
785
+ "primaryKey": false,
786
+ "notNull": false,
787
+ "autoincrement": false
788
+ },
789
+ "track_id": {
790
+ "name": "track_id",
791
+ "type": "text",
792
+ "primaryKey": false,
793
+ "notNull": false,
794
+ "autoincrement": false
795
+ },
796
+ "album_id": {
797
+ "name": "album_id",
798
+ "type": "text",
799
+ "primaryKey": false,
800
+ "notNull": false,
801
+ "autoincrement": false
802
+ },
803
+ "artist_id": {
804
+ "name": "artist_id",
805
+ "type": "text",
806
+ "primaryKey": false,
807
+ "notNull": false,
808
+ "autoincrement": false
809
+ },
810
+ "uri": {
811
+ "name": "uri",
812
+ "type": "text",
813
+ "primaryKey": false,
814
+ "notNull": false,
815
+ "autoincrement": false
816
+ },
817
+ "cid": {
818
+ "name": "cid",
819
+ "type": "text",
820
+ "primaryKey": false,
821
+ "notNull": false,
822
+ "autoincrement": false
823
+ },
824
+ "created_at": {
825
+ "name": "created_at",
826
+ "type": "integer",
827
+ "primaryKey": false,
828
+ "notNull": true,
829
+ "autoincrement": false,
830
+ "default": "(unixepoch())"
831
+ },
832
+ "updated_at": {
833
+ "name": "updated_at",
834
+ "type": "integer",
835
+ "primaryKey": false,
836
+ "notNull": true,
837
+ "autoincrement": false,
838
+ "default": "(unixepoch())"
839
+ },
840
+ "timestamp": {
841
+ "name": "timestamp",
842
+ "type": "integer",
843
+ "primaryKey": false,
844
+ "notNull": true,
845
+ "autoincrement": false,
846
+ "default": "(unixepoch())"
847
+ }
848
+ },
849
+ "indexes": {
850
+ "scrobbles_uri_unique": {
851
+ "name": "scrobbles_uri_unique",
852
+ "columns": [
853
+ "uri"
854
+ ],
855
+ "isUnique": true
856
+ },
857
+ "scrobbles_cid_unique": {
858
+ "name": "scrobbles_cid_unique",
859
+ "columns": [
860
+ "cid"
861
+ ],
862
+ "isUnique": true
863
+ }
864
+ },
865
+ "foreignKeys": {
866
+ "scrobbles_user_id_users_id_fk": {
867
+ "name": "scrobbles_user_id_users_id_fk",
868
+ "tableFrom": "scrobbles",
869
+ "tableTo": "users",
870
+ "columnsFrom": [
871
+ "user_id"
872
+ ],
873
+ "columnsTo": [
874
+ "id"
875
+ ],
876
+ "onDelete": "no action",
877
+ "onUpdate": "no action"
878
+ },
879
+ "scrobbles_track_id_tracks_id_fk": {
880
+ "name": "scrobbles_track_id_tracks_id_fk",
881
+ "tableFrom": "scrobbles",
882
+ "tableTo": "tracks",
883
+ "columnsFrom": [
884
+ "track_id"
885
+ ],
886
+ "columnsTo": [
887
+ "id"
888
+ ],
889
+ "onDelete": "no action",
890
+ "onUpdate": "no action"
891
+ },
892
+ "scrobbles_album_id_albums_id_fk": {
893
+ "name": "scrobbles_album_id_albums_id_fk",
894
+ "tableFrom": "scrobbles",
895
+ "tableTo": "albums",
896
+ "columnsFrom": [
897
+ "album_id"
898
+ ],
899
+ "columnsTo": [
900
+ "id"
901
+ ],
902
+ "onDelete": "no action",
903
+ "onUpdate": "no action"
904
+ },
905
+ "scrobbles_artist_id_artists_id_fk": {
906
+ "name": "scrobbles_artist_id_artists_id_fk",
907
+ "tableFrom": "scrobbles",
908
+ "tableTo": "artists",
909
+ "columnsFrom": [
910
+ "artist_id"
911
+ ],
912
+ "columnsTo": [
913
+ "id"
914
+ ],
915
+ "onDelete": "no action",
916
+ "onUpdate": "no action"
917
+ }
918
+ },
919
+ "compositePrimaryKeys": {},
920
+ "uniqueConstraints": {},
921
+ "checkConstraints": {}
922
+ },
923
+ "tracks": {
924
+ "name": "tracks",
925
+ "columns": {
926
+ "id": {
927
+ "name": "id",
928
+ "type": "text",
929
+ "primaryKey": true,
930
+ "notNull": true,
931
+ "autoincrement": false
932
+ },
933
+ "title": {
934
+ "name": "title",
935
+ "type": "text",
936
+ "primaryKey": false,
937
+ "notNull": true,
938
+ "autoincrement": false
939
+ },
940
+ "artist": {
941
+ "name": "artist",
942
+ "type": "text",
943
+ "primaryKey": false,
944
+ "notNull": true,
945
+ "autoincrement": false
946
+ },
947
+ "album_artist": {
948
+ "name": "album_artist",
949
+ "type": "text",
950
+ "primaryKey": false,
951
+ "notNull": true,
952
+ "autoincrement": false
953
+ },
954
+ "album_art": {
955
+ "name": "album_art",
956
+ "type": "text",
957
+ "primaryKey": false,
958
+ "notNull": false,
959
+ "autoincrement": false
960
+ },
961
+ "album": {
962
+ "name": "album",
963
+ "type": "text",
964
+ "primaryKey": false,
965
+ "notNull": true,
966
+ "autoincrement": false
967
+ },
968
+ "track_number": {
969
+ "name": "track_number",
970
+ "type": "integer",
971
+ "primaryKey": false,
972
+ "notNull": false,
973
+ "autoincrement": false
974
+ },
975
+ "duration": {
976
+ "name": "duration",
977
+ "type": "integer",
978
+ "primaryKey": false,
979
+ "notNull": true,
980
+ "autoincrement": false
981
+ },
982
+ "mb_id": {
983
+ "name": "mb_id",
984
+ "type": "text",
985
+ "primaryKey": false,
986
+ "notNull": false,
987
+ "autoincrement": false
988
+ },
989
+ "youtube_link": {
990
+ "name": "youtube_link",
991
+ "type": "text",
992
+ "primaryKey": false,
993
+ "notNull": false,
994
+ "autoincrement": false
995
+ },
996
+ "spotify_link": {
997
+ "name": "spotify_link",
998
+ "type": "text",
999
+ "primaryKey": false,
1000
+ "notNull": false,
1001
+ "autoincrement": false
1002
+ },
1003
+ "apple_music_link": {
1004
+ "name": "apple_music_link",
1005
+ "type": "text",
1006
+ "primaryKey": false,
1007
+ "notNull": false,
1008
+ "autoincrement": false
1009
+ },
1010
+ "tidal_link": {
1011
+ "name": "tidal_link",
1012
+ "type": "text",
1013
+ "primaryKey": false,
1014
+ "notNull": false,
1015
+ "autoincrement": false
1016
+ },
1017
+ "disc_number": {
1018
+ "name": "disc_number",
1019
+ "type": "integer",
1020
+ "primaryKey": false,
1021
+ "notNull": false,
1022
+ "autoincrement": false
1023
+ },
1024
+ "lyrics": {
1025
+ "name": "lyrics",
1026
+ "type": "text",
1027
+ "primaryKey": false,
1028
+ "notNull": false,
1029
+ "autoincrement": false
1030
+ },
1031
+ "composer": {
1032
+ "name": "composer",
1033
+ "type": "text",
1034
+ "primaryKey": false,
1035
+ "notNull": false,
1036
+ "autoincrement": false
1037
+ },
1038
+ "genre": {
1039
+ "name": "genre",
1040
+ "type": "text",
1041
+ "primaryKey": false,
1042
+ "notNull": false,
1043
+ "autoincrement": false
1044
+ },
1045
+ "label": {
1046
+ "name": "label",
1047
+ "type": "text",
1048
+ "primaryKey": false,
1049
+ "notNull": false,
1050
+ "autoincrement": false
1051
+ },
1052
+ "copyright_message": {
1053
+ "name": "copyright_message",
1054
+ "type": "text",
1055
+ "primaryKey": false,
1056
+ "notNull": false,
1057
+ "autoincrement": false
1058
+ },
1059
+ "uri": {
1060
+ "name": "uri",
1061
+ "type": "text",
1062
+ "primaryKey": false,
1063
+ "notNull": false,
1064
+ "autoincrement": false
1065
+ },
1066
+ "cid": {
1067
+ "name": "cid",
1068
+ "type": "text",
1069
+ "primaryKey": false,
1070
+ "notNull": true,
1071
+ "autoincrement": false
1072
+ },
1073
+ "album_uri": {
1074
+ "name": "album_uri",
1075
+ "type": "text",
1076
+ "primaryKey": false,
1077
+ "notNull": false,
1078
+ "autoincrement": false
1079
+ },
1080
+ "artist_uri": {
1081
+ "name": "artist_uri",
1082
+ "type": "text",
1083
+ "primaryKey": false,
1084
+ "notNull": false,
1085
+ "autoincrement": false
1086
+ },
1087
+ "created_at": {
1088
+ "name": "created_at",
1089
+ "type": "integer",
1090
+ "primaryKey": false,
1091
+ "notNull": true,
1092
+ "autoincrement": false,
1093
+ "default": "(unixepoch())"
1094
+ },
1095
+ "updated_at": {
1096
+ "name": "updated_at",
1097
+ "type": "integer",
1098
+ "primaryKey": false,
1099
+ "notNull": true,
1100
+ "autoincrement": false,
1101
+ "default": "(unixepoch())"
1102
+ }
1103
+ },
1104
+ "indexes": {
1105
+ "tracks_mb_id_unique": {
1106
+ "name": "tracks_mb_id_unique",
1107
+ "columns": [
1108
+ "mb_id"
1109
+ ],
1110
+ "isUnique": true
1111
+ },
1112
+ "tracks_youtube_link_unique": {
1113
+ "name": "tracks_youtube_link_unique",
1114
+ "columns": [
1115
+ "youtube_link"
1116
+ ],
1117
+ "isUnique": true
1118
+ },
1119
+ "tracks_spotify_link_unique": {
1120
+ "name": "tracks_spotify_link_unique",
1121
+ "columns": [
1122
+ "spotify_link"
1123
+ ],
1124
+ "isUnique": true
1125
+ },
1126
+ "tracks_apple_music_link_unique": {
1127
+ "name": "tracks_apple_music_link_unique",
1128
+ "columns": [
1129
+ "apple_music_link"
1130
+ ],
1131
+ "isUnique": true
1132
+ },
1133
+ "tracks_tidal_link_unique": {
1134
+ "name": "tracks_tidal_link_unique",
1135
+ "columns": [
1136
+ "tidal_link"
1137
+ ],
1138
+ "isUnique": true
1139
+ },
1140
+ "tracks_uri_unique": {
1141
+ "name": "tracks_uri_unique",
1142
+ "columns": [
1143
+ "uri"
1144
+ ],
1145
+ "isUnique": true
1146
+ },
1147
+ "tracks_cid_unique": {
1148
+ "name": "tracks_cid_unique",
1149
+ "columns": [
1150
+ "cid"
1151
+ ],
1152
+ "isUnique": true
1153
+ }
1154
+ },
1155
+ "foreignKeys": {},
1156
+ "compositePrimaryKeys": {},
1157
+ "uniqueConstraints": {},
1158
+ "checkConstraints": {}
1159
+ },
1160
+ "user_albums": {
1161
+ "name": "user_albums",
1162
+ "columns": {
1163
+ "id": {
1164
+ "name": "id",
1165
+ "type": "text",
1166
+ "primaryKey": true,
1167
+ "notNull": true,
1168
+ "autoincrement": false
1169
+ },
1170
+ "user_id": {
1171
+ "name": "user_id",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": true,
1175
+ "autoincrement": false
1176
+ },
1177
+ "album_id": {
1178
+ "name": "album_id",
1179
+ "type": "text",
1180
+ "primaryKey": false,
1181
+ "notNull": true,
1182
+ "autoincrement": false
1183
+ },
1184
+ "created_at": {
1185
+ "name": "created_at",
1186
+ "type": "integer",
1187
+ "primaryKey": false,
1188
+ "notNull": true,
1189
+ "autoincrement": false,
1190
+ "default": "(unixepoch())"
1191
+ },
1192
+ "updated_at": {
1193
+ "name": "updated_at",
1194
+ "type": "integer",
1195
+ "primaryKey": false,
1196
+ "notNull": true,
1197
+ "autoincrement": false,
1198
+ "default": "(unixepoch())"
1199
+ },
1200
+ "scrobbles": {
1201
+ "name": "scrobbles",
1202
+ "type": "integer",
1203
+ "primaryKey": false,
1204
+ "notNull": false,
1205
+ "autoincrement": false
1206
+ },
1207
+ "uri": {
1208
+ "name": "uri",
1209
+ "type": "text",
1210
+ "primaryKey": false,
1211
+ "notNull": true,
1212
+ "autoincrement": false
1213
+ }
1214
+ },
1215
+ "indexes": {
1216
+ "user_albums_uri_unique": {
1217
+ "name": "user_albums_uri_unique",
1218
+ "columns": [
1219
+ "uri"
1220
+ ],
1221
+ "isUnique": true
1222
+ },
1223
+ "user_albums_unique_index": {
1224
+ "name": "user_albums_unique_index",
1225
+ "columns": [
1226
+ "user_id",
1227
+ "album_id"
1228
+ ],
1229
+ "isUnique": true
1230
+ }
1231
+ },
1232
+ "foreignKeys": {
1233
+ "user_albums_user_id_users_id_fk": {
1234
+ "name": "user_albums_user_id_users_id_fk",
1235
+ "tableFrom": "user_albums",
1236
+ "tableTo": "users",
1237
+ "columnsFrom": [
1238
+ "user_id"
1239
+ ],
1240
+ "columnsTo": [
1241
+ "id"
1242
+ ],
1243
+ "onDelete": "no action",
1244
+ "onUpdate": "no action"
1245
+ },
1246
+ "user_albums_album_id_albums_id_fk": {
1247
+ "name": "user_albums_album_id_albums_id_fk",
1248
+ "tableFrom": "user_albums",
1249
+ "tableTo": "albums",
1250
+ "columnsFrom": [
1251
+ "album_id"
1252
+ ],
1253
+ "columnsTo": [
1254
+ "id"
1255
+ ],
1256
+ "onDelete": "no action",
1257
+ "onUpdate": "no action"
1258
+ }
1259
+ },
1260
+ "compositePrimaryKeys": {},
1261
+ "uniqueConstraints": {},
1262
+ "checkConstraints": {}
1263
+ },
1264
+ "user_artists": {
1265
+ "name": "user_artists",
1266
+ "columns": {
1267
+ "id": {
1268
+ "name": "id",
1269
+ "type": "text",
1270
+ "primaryKey": true,
1271
+ "notNull": true,
1272
+ "autoincrement": false
1273
+ },
1274
+ "user_id": {
1275
+ "name": "user_id",
1276
+ "type": "text",
1277
+ "primaryKey": false,
1278
+ "notNull": true,
1279
+ "autoincrement": false
1280
+ },
1281
+ "artist_id": {
1282
+ "name": "artist_id",
1283
+ "type": "text",
1284
+ "primaryKey": false,
1285
+ "notNull": true,
1286
+ "autoincrement": false
1287
+ },
1288
+ "created_at": {
1289
+ "name": "created_at",
1290
+ "type": "integer",
1291
+ "primaryKey": false,
1292
+ "notNull": true,
1293
+ "autoincrement": false,
1294
+ "default": "(unixepoch())"
1295
+ },
1296
+ "updated_at": {
1297
+ "name": "updated_at",
1298
+ "type": "integer",
1299
+ "primaryKey": false,
1300
+ "notNull": true,
1301
+ "autoincrement": false,
1302
+ "default": "(unixepoch())"
1303
+ },
1304
+ "scrobbles": {
1305
+ "name": "scrobbles",
1306
+ "type": "integer",
1307
+ "primaryKey": false,
1308
+ "notNull": false,
1309
+ "autoincrement": false
1310
+ },
1311
+ "uri": {
1312
+ "name": "uri",
1313
+ "type": "text",
1314
+ "primaryKey": false,
1315
+ "notNull": true,
1316
+ "autoincrement": false
1317
+ }
1318
+ },
1319
+ "indexes": {
1320
+ "user_artists_uri_unique": {
1321
+ "name": "user_artists_uri_unique",
1322
+ "columns": [
1323
+ "uri"
1324
+ ],
1325
+ "isUnique": true
1326
+ },
1327
+ "user_artists_unique_index": {
1328
+ "name": "user_artists_unique_index",
1329
+ "columns": [
1330
+ "user_id",
1331
+ "artist_id"
1332
+ ],
1333
+ "isUnique": true
1334
+ }
1335
+ },
1336
+ "foreignKeys": {
1337
+ "user_artists_user_id_users_id_fk": {
1338
+ "name": "user_artists_user_id_users_id_fk",
1339
+ "tableFrom": "user_artists",
1340
+ "tableTo": "users",
1341
+ "columnsFrom": [
1342
+ "user_id"
1343
+ ],
1344
+ "columnsTo": [
1345
+ "id"
1346
+ ],
1347
+ "onDelete": "no action",
1348
+ "onUpdate": "no action"
1349
+ },
1350
+ "user_artists_artist_id_artists_id_fk": {
1351
+ "name": "user_artists_artist_id_artists_id_fk",
1352
+ "tableFrom": "user_artists",
1353
+ "tableTo": "artists",
1354
+ "columnsFrom": [
1355
+ "artist_id"
1356
+ ],
1357
+ "columnsTo": [
1358
+ "id"
1359
+ ],
1360
+ "onDelete": "no action",
1361
+ "onUpdate": "no action"
1362
+ }
1363
+ },
1364
+ "compositePrimaryKeys": {},
1365
+ "uniqueConstraints": {},
1366
+ "checkConstraints": {}
1367
+ },
1368
+ "user_tracks": {
1369
+ "name": "user_tracks",
1370
+ "columns": {
1371
+ "id": {
1372
+ "name": "id",
1373
+ "type": "text",
1374
+ "primaryKey": true,
1375
+ "notNull": true,
1376
+ "autoincrement": false
1377
+ },
1378
+ "user_id": {
1379
+ "name": "user_id",
1380
+ "type": "text",
1381
+ "primaryKey": false,
1382
+ "notNull": true,
1383
+ "autoincrement": false
1384
+ },
1385
+ "track_id": {
1386
+ "name": "track_id",
1387
+ "type": "text",
1388
+ "primaryKey": false,
1389
+ "notNull": true,
1390
+ "autoincrement": false
1391
+ },
1392
+ "created_at": {
1393
+ "name": "created_at",
1394
+ "type": "integer",
1395
+ "primaryKey": false,
1396
+ "notNull": true,
1397
+ "autoincrement": false,
1398
+ "default": "(unixepoch())"
1399
+ },
1400
+ "updated_at": {
1401
+ "name": "updated_at",
1402
+ "type": "integer",
1403
+ "primaryKey": false,
1404
+ "notNull": true,
1405
+ "autoincrement": false,
1406
+ "default": "(unixepoch())"
1407
+ },
1408
+ "scrobbles": {
1409
+ "name": "scrobbles",
1410
+ "type": "integer",
1411
+ "primaryKey": false,
1412
+ "notNull": false,
1413
+ "autoincrement": false
1414
+ },
1415
+ "uri": {
1416
+ "name": "uri",
1417
+ "type": "text",
1418
+ "primaryKey": false,
1419
+ "notNull": true,
1420
+ "autoincrement": false
1421
+ }
1422
+ },
1423
+ "indexes": {
1424
+ "user_tracks_uri_unique": {
1425
+ "name": "user_tracks_uri_unique",
1426
+ "columns": [
1427
+ "uri"
1428
+ ],
1429
+ "isUnique": true
1430
+ },
1431
+ "user_tracks_unique_index": {
1432
+ "name": "user_tracks_unique_index",
1433
+ "columns": [
1434
+ "user_id",
1435
+ "track_id"
1436
+ ],
1437
+ "isUnique": true
1438
+ }
1439
+ },
1440
+ "foreignKeys": {
1441
+ "user_tracks_user_id_users_id_fk": {
1442
+ "name": "user_tracks_user_id_users_id_fk",
1443
+ "tableFrom": "user_tracks",
1444
+ "tableTo": "users",
1445
+ "columnsFrom": [
1446
+ "user_id"
1447
+ ],
1448
+ "columnsTo": [
1449
+ "id"
1450
+ ],
1451
+ "onDelete": "no action",
1452
+ "onUpdate": "no action"
1453
+ },
1454
+ "user_tracks_track_id_tracks_id_fk": {
1455
+ "name": "user_tracks_track_id_tracks_id_fk",
1456
+ "tableFrom": "user_tracks",
1457
+ "tableTo": "tracks",
1458
+ "columnsFrom": [
1459
+ "track_id"
1460
+ ],
1461
+ "columnsTo": [
1462
+ "id"
1463
+ ],
1464
+ "onDelete": "no action",
1465
+ "onUpdate": "no action"
1466
+ }
1467
+ },
1468
+ "compositePrimaryKeys": {},
1469
+ "uniqueConstraints": {},
1470
+ "checkConstraints": {}
1471
+ },
1472
+ "users": {
1473
+ "name": "users",
1474
+ "columns": {
1475
+ "id": {
1476
+ "name": "id",
1477
+ "type": "text",
1478
+ "primaryKey": true,
1479
+ "notNull": true,
1480
+ "autoincrement": false
1481
+ },
1482
+ "did": {
1483
+ "name": "did",
1484
+ "type": "text",
1485
+ "primaryKey": false,
1486
+ "notNull": true,
1487
+ "autoincrement": false
1488
+ },
1489
+ "display_name": {
1490
+ "name": "display_name",
1491
+ "type": "text",
1492
+ "primaryKey": false,
1493
+ "notNull": false,
1494
+ "autoincrement": false
1495
+ },
1496
+ "handle": {
1497
+ "name": "handle",
1498
+ "type": "text",
1499
+ "primaryKey": false,
1500
+ "notNull": true,
1501
+ "autoincrement": false
1502
+ },
1503
+ "avatar": {
1504
+ "name": "avatar",
1505
+ "type": "text",
1506
+ "primaryKey": false,
1507
+ "notNull": true,
1508
+ "autoincrement": false
1509
+ },
1510
+ "created_at": {
1511
+ "name": "created_at",
1512
+ "type": "integer",
1513
+ "primaryKey": false,
1514
+ "notNull": true,
1515
+ "autoincrement": false,
1516
+ "default": "(unixepoch())"
1517
+ },
1518
+ "updated_at": {
1519
+ "name": "updated_at",
1520
+ "type": "integer",
1521
+ "primaryKey": false,
1522
+ "notNull": true,
1523
+ "autoincrement": false,
1524
+ "default": "(unixepoch())"
1525
+ }
1526
+ },
1527
+ "indexes": {
1528
+ "users_did_unique": {
1529
+ "name": "users_did_unique",
1530
+ "columns": [
1531
+ "did"
1532
+ ],
1533
+ "isUnique": true
1534
+ },
1535
+ "users_handle_unique": {
1536
+ "name": "users_handle_unique",
1537
+ "columns": [
1538
+ "handle"
1539
+ ],
1540
+ "isUnique": true
1541
+ }
1542
+ },
1543
+ "foreignKeys": {},
1544
+ "compositePrimaryKeys": {},
1545
+ "uniqueConstraints": {},
1546
+ "checkConstraints": {}
1547
+ }
1548
+ },
1549
+ "views": {},
1550
+ "enums": {},
1551
+ "_meta": {
1552
+ "schemas": {},
1553
+ "tables": {},
1554
+ "columns": {}
1555
+ },
1556
+ "internal": {
1557
+ "indexes": {}
1558
+ }
1559
+ }