Skip to content

Commit

Permalink
Use strict...we'll cheat here and just update the initial migration (#33
Browse files Browse the repository at this point in the history
)

* Use strict...we'll cheat here and just update the initial migration

* Restore dot
  • Loading branch information
malcolmstill authored Nov 16, 2022
1 parent 02d4520 commit e1b34d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/0001.init.sql
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/db.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e1b34d8

Please sign in to comment.