Necessary to avoid double scrobbling if uploading from two sources (i.e. my Spotify data [2016-2023] and my last.fm data [2019-present])
20 lines
487 B
Zig
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", .{});
|
|
}
|