diff --git a/src/0001.init.sql b/src/0001.init.sql index bca13be..a74c189 100644 --- a/src/0001.init.sql +++ b/src/0001.init.sql @@ -1,13 +1,13 @@ CREATE TABLE status ( id TEXT PRIMARY KEY -); +) STRICT; -- CREATE TABLE todo ( id INTEGER PRIMARY KEY NOT NULL, status TEXT NOT NULL, text TEXT NOT NULL, FOREIGN KEY(status) REFERENCES status(id) -); +) STRICT; -- CREATE TABLE ref ( id INTEGER NOT NULL, @@ -16,7 +16,7 @@ CREATE TABLE ref ( PRIMARY KEY (id, referer), FOREIGN KEY(id) REFERENCES todo(id), FOREIGN KEY(referer) REFERENCES todo(id) -); +) STRICT; -- INSERT INTO status (id) VALUES ('TODO'); INSERT INTO status (id) VALUES ('DONE'); diff --git a/src/db.zig b/src/db.zig index c0fb04b..9a1f5d6 100644 --- a/src/db.zig +++ b/src/db.zig @@ -24,7 +24,7 @@ pub const Database = struct { const home = try getHome(alloc); defer alloc.free(home); - const slices: [2][]const u8 = .{ home, "clerk.db" }; + const slices: [2][]const u8 = .{ home, ".clerk.db" }; const path = try fs.path.joinZ(alloc, slices[0..]); defer alloc.free(path);