mirror of
https://github.com/jetzig-framework/jetzig.git
synced 2025-05-14 14:06:08 +00:00
Fix initial Schema creation
Update JetQuery - `optional` replaces `not_null` and defaults to `false`, i.e. columns have a `NOT NULL` constraint by default.
This commit is contained in:
parent
7e973bbc3b
commit
9ebf0d40e6
@ -15,8 +15,8 @@
|
||||
.hash = "12201d75d73aad5e1c996de4d5ae87a00e58479c8d469bc2eeb5fdeeac8857bc09af",
|
||||
},
|
||||
.jetquery = .{
|
||||
.url = "https://github.com/jetzig-framework/jetquery/archive/2dc9565ecbb07cdad33726b9a4e199fdb9150eec.tar.gz",
|
||||
.hash = "122027b41c17ba3459fa7992f88f2b27659cace0176fecab2ae362687ac1dcb5be2b",
|
||||
.url = "https://github.com/jetzig-framework/jetquery/archive/27284df6208b982d4d611fca0cc083a306c8602a.tar.gz",
|
||||
.hash = "12202722110cbfc467097478e5d7329ae544b1f77de684952ec63eb916d07a653e49",
|
||||
},
|
||||
.jetcommon = .{
|
||||
.url = "https://github.com/jetzig-framework/jetcommon/archive/a248776ba56d6cc2b160d593ac3305756adcd26e.tar.gz",
|
||||
|
@ -100,9 +100,11 @@ pub fn main() !void {
|
||||
},
|
||||
);
|
||||
const schema = try reflect.generateSchema();
|
||||
const path = try cwd.realpathAlloc(
|
||||
const project_dir = try jetzig.util.detectJetzigProjectDir();
|
||||
const project_dir_realpath = try project_dir.realpathAlloc(allocator, ".");
|
||||
const path = try std.fs.path.join(
|
||||
allocator,
|
||||
try std.fs.path.join(allocator, &.{ "src", "app", "database", "Schema.zig" }),
|
||||
&.{ project_dir_realpath, "src", "app", "database", "Schema.zig" },
|
||||
);
|
||||
try jetzig.util.createFile(path, schema);
|
||||
std.log.info("Database schema written to `{s}`.", .{path});
|
||||
|
Loading…
x
Reference in New Issue
Block a user