internal/store/migrations/0045_build_tree.up.sql

08a7e440958513a3e07c8535373e19345439a704
gitbay/internal/store/migrations/0045_build_tree.up.sql

6 lines · 400 bytes

1-- The tree a build's commit points at. A rebase gives a commit a new sha
2-- and the same tree; a job's result is a property of the tree, so a
3-- success recorded against it stands for the new commit too (#177).
4-- Empty for scheduled and tag builds, which are not deduplicated.
5ALTER TABLE builds ADD COLUMN tree TEXT NOT NULL DEFAULT '';
6CREATE INDEX builds_by_tree ON builds (repo_id, tree, job);