Persist repo ref hashes in db

This commit is contained in:
2023-02-08 18:44:54 -07:00
parent e4043ae3be
commit 6d2936393b
3 changed files with 79 additions and 7 deletions
+10
View File
@@ -159,6 +159,16 @@ CREATE TABLE runners (
name TEXT,
secret TEXT
);
CREATE TABLE pipeline_refs (
name TEXT PRIMARY KEY NOT NULL,
pipeline_id UUID NOT NULL,
hash TEXT NOT NULL,
CONSTRAINT fk_pipeline_id
FOREIGN KEY(pipeline_id)
REFERENCES pipelines(id)
);
`
_, err := conn.Exec(context.Background(), createTablesQuery)