From e1b34d884cf8a8baadaffebd3302a68cc1631d56 Mon Sep 17 00:00:00 2001 From: Malcolm Still Date: Wed, 16 Nov 2022 19:13:03 +0000 Subject: [PATCH] Use strict...we'll cheat here and just update the initial migration (#33) * Use strict...we'll cheat here and just update the initial migration * Restore dot --- src/0001.init.sql | 6 +++--- src/db.zig | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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);