zuletzt/src/app/database/migrations/2025-02-19_18-46-48_create_albumsongs.zig
2025-02-19 21:19:43 -05:00

20 lines
472 B
Zig

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