Store finished work in db

This commit is contained in:
Joscha 2023-08-11 15:16:20 +02:00
parent a9e08505bc
commit 5e0b8e3c8c
9 changed files with 190 additions and 38 deletions

View file

@ -12,6 +12,7 @@ CREATE TABLE commits (
CREATE TABLE commit_links (
child TEXT NOT NULL,
parent TEXT NOT NULL,
PRIMARY KEY (parent, child),
FOREIGN KEY (parent) REFERENCES commits (hash) ON DELETE CASCADE,
FOREIGN KEY (child) REFERENCES commits (hash) ON DELETE CASCADE
@ -21,6 +22,7 @@ CREATE TABLE refs (
name TEXT NOT NULL PRIMARY KEY,
hash TEXT NOT NULL,
tracked INT NOT NULL DEFAULT 0,
FOREIGN KEY (hash) REFERENCES commits (hash) ON DELETE CASCADE
) STRICT;