add missing migration
This commit is contained in:
parent
76c670b287
commit
045d282298
@ -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(
|
||||||
|
"blogs",
|
||||||
|
&.{
|
||||||
|
t.primaryKey("id", .{}),
|
||||||
|
t.column("title", .string, .{}),
|
||||||
|
t.column("content", .text, .{ .optional = true }),
|
||||||
|
t.timestamps(.{}),
|
||||||
|
},
|
||||||
|
.{},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn down(repo: anytype) !void {
|
||||||
|
try repo.dropTable("blogs", .{});
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user