Add views and begin database

This commit is contained in:
mitteneer 2024-11-20 18:17:14 -05:00
parent 348545949a
commit a15db5fb31
68 changed files with 709 additions and 90 deletions

View file

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