The catalogue holds the module graph, and the modules that make it build themselves #21
@@ -93,8 +93,6 @@ CREATE TABLE IF NOT EXISTS built_against (
|
||||
against_reference text NOT NULL,
|
||||
PRIMARY KEY (module, commit_sha, against_reference)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS built_against_target ON built_against (against_reference);
|
||||
`;
|
||||
|
||||
// The graph first keyed its edges on a module and a commit, which the builder does not know and
|
||||
@@ -107,6 +105,11 @@ DELETE FROM built_against WHERE against_reference IS NULL;
|
||||
ALTER TABLE built_against DROP COLUMN IF EXISTS against_module;
|
||||
ALTER TABLE built_against DROP COLUMN IF EXISTS against_commit;
|
||||
ALTER TABLE built_against ALTER COLUMN against_reference SET NOT NULL;
|
||||
|
||||
-- After the column exists, and not in the schema above: on a store that still has the old shape,
|
||||
-- the table is not created, so an index named in the same breath would be built on a column that
|
||||
-- is not there yet.
|
||||
CREATE INDEX IF NOT EXISTS built_against_target ON built_against (against_reference);
|
||||
`;
|
||||
|
||||
export class Graph {
|
||||
|
||||
Reference in New Issue
Block a user