const std = @import("std"); const jetquery = @import("jetquery"); const t = jetquery.schema.table; pub fn up(repo: anytype) !void { try repo.createTable( "songratings", &.{ t.primaryKey("id", .{}), t.column("song", .bigint, .{ .reference = .{ "songs", "id" } }), t.column("rating", .smallint, .{ .optional = true }), t.column("rating_text", .text, .{ .optional = true }), t.column("date", .datetime, .{}), t.timestamps(.{}), }, .{}, ); } pub fn down(repo: anytype) !void { try repo.dropTable("songratings", .{}); }