zuletzt/src/app/database/migrations/2025-02-21_14-24-31_create_scrobbleartists.zig
mitteneer 7957345057 Allow filtering scrobble uploads by date
Necessary to avoid double scrobbling if uploading from two sources (i.e. my Spotify data [2016-2023] and my last.fm data [2019-present])
2025-02-21 11:54:02 -05:00

20 lines
487 B
Zig

const std = @import("std");
const jetquery = @import("jetquery");
const t = jetquery.schema.table;
pub fn up(repo: anytype) !void {
try repo.createTable(
"Scrobbleartists",
&.{
t.primaryKey("id", .{}),
t.column("scrobble_id", .integer, .{}),
t.column("artist_id", .integer, .{}),
t.timestamps(.{}),
},
.{},
);
}
pub fn down(repo: anytype) !void {
try repo.dropTable("Scrobbleartists", .{});
}