Remove unnecessary db search for scrobbles
I forgot I made scrobbles owned by their respective songs/albums/artists, so I can just query that instead
This commit is contained in:
parent
e22dc4c949
commit
cf84b4afdd
6 changed files with 22 additions and 18 deletions
|
|
@ -115,7 +115,7 @@ pub const Scrobble = jetquery.Model(
|
|||
struct {
|
||||
id: i32,
|
||||
song_id: i32,
|
||||
album_id: ?i32,
|
||||
album_id: i32,
|
||||
date: jetquery.DateTime,
|
||||
created_at: jetquery.DateTime,
|
||||
updated_at: jetquery.DateTime,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ pub fn up(repo: anytype) !void {
|
|||
&.{
|
||||
t.primaryKey("id", .{}),
|
||||
t.column("song_id", .integer, .{}),
|
||||
t.column("album_id", .integer, .{ .optional = true }),
|
||||
t.column("album_id", .integer, .{}),
|
||||
t.column("date", .datetime, .{}),
|
||||
t.timestamps(.{}),
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue