launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #27587
Re: [Merge] ~ilasc/launchpad:add-revision-status-report into launchpad:db-devel
Diff comments:
> diff --git a/database/schema/patch-2210-37-0.sql b/database/schema/patch-2210-37-0.sql
> new file mode 100644
> index 0000000..ad34840
> --- /dev/null
> +++ b/database/schema/patch-2210-37-0.sql
> @@ -0,0 +1,51 @@
> +-- Copyright 2021 Canonical Ltd. This software is licensed under the
> +-- GNU Affero General Public License version 3 (see the file LICENSE).
> +
> +SET client_min_messages=ERROR;
> +
> +CREATE TABLE RevisionStatusArtifact (
> + id serial PRIMARY KEY,
> + library_file integer REFERENCES libraryfilealias
> +);
> +
> +COMMENT ON TABLE RevisionStatusArtifact IS 'A thin wrapper around LibraryFileAlias.';
> +COMMENT ON COLUMN RevisionStatusArtifact.library_file IS 'Reference to LibraryFileAlias.';
> +
> +CREATE TABLE RevisionStatusReport (
> + id serial PRIMARY KEY,
> + name text NOT NULL,
> + status INTEGER NOT NULL,
> + link text,
Agreed, will do.
> + description text,
> + git_repository integer REFERENCES gitrepository NOT NULL,
> + commit_sha1 character(40) NOT NULL,
Indeed and will do.
> + result integer,
> + date_started timestamp without time zone DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC') NOT NULL,
Given the set of transitions that this can go through, this seems like a good idea, will add it.
> + date_finished timestamp without time zone DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC') NOT NULL,
Probably not :-) good point
> + log integer
I don't see the point, will remove and reorder to have "revision_status integer REFERENCES RevisionStatusReport" in the original definition with Create Table.
> +);
> +
> +COMMENT ON TABLE RevisionStatusReport IS 'This table links the submitted reports to the target git references.';
> +COMMENT ON COLUMN RevisionStatusReport.name IS 'Name of the report.';
> +COMMENT ON COLUMN RevisionStatusReport.status IS 'One of the RevisionStatus enum values: Queued, Started, Completed, FailedToStart.';
> +COMMENT ON COLUMN RevisionStatusReport.link IS 'External URL to view result of report.';
> +COMMENT ON COLUMN RevisionStatusReport.description IS 'Text description of the result.';
> +COMMENT ON COLUMN RevisionStatusReport.git_repository IS 'Reference to the GitRepository.';
> +COMMENT ON COLUMN RevisionStatusReport.commit_sha1 IS 'The commit sha1 for the report.';
> +COMMENT ON COLUMN RevisionStatusReport.result IS 'One of the RevisionStatusResult enum values: Success, Failed, Skipped, Cancelled.';
> +COMMENT ON COLUMN RevisionStatusReport.date_started IS 'DateTime that report was started.';
> +COMMENT ON COLUMN RevisionStatusReport.date_finished IS 'DateTime that report was completed.';
> +COMMENT ON COLUMN RevisionStatusReport.log IS 'Reference to a RevisionStatusArtifact.';
> +
> +CREATE INDEX revision_status_report__git_repository__idx
> + ON RevisionStatusReport (git_repository);
> +
> +ALTER TABLE RevisionStatusArtifact ADD COLUMN revision_status integer REFERENCES RevisionStatusReport;
> +COMMENT ON COLUMN RevisionStatusArtifact.revision_status IS 'Reference to RevisionStatusReport.';
> +
> +CREATE INDEX revision_status_artifact__library_file__idx
> + ON RevisionStatusArtifact (library_file);
> +CREATE INDEX revision_status_artifact__revision_status__idx
> + ON RevisionStatusArtifact (revision_status);
> +
> +INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 37, 0);
--
https://code.launchpad.net/~ilasc/launchpad/+git/launchpad/+merge/409900
Your team Launchpad code reviewers is requested to review the proposed merge of ~ilasc/launchpad:add-revision-status-report into launchpad:db-devel.
References