launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24832
Re: [Merge] ~pappacena/launchpad:gitrepo-status-column into launchpad:db-devel
Diff comments:
> diff --git a/database/schema/patch-2210-17-0.sql b/database/schema/patch-2210-17-0.sql
> new file mode 100644
> index 0000000..ddb5ec6
> --- /dev/null
> +++ b/database/schema/patch-2210-17-0.sql
> @@ -0,0 +1,11 @@
> +-- Copyright 2020 Canonical Ltd. This software is licensed under the
> +-- GNU Affero General Public License version 3 (see the file LICENSE).
> +
> +SET client_min_messages=ERROR;
> +
> +ALTER TABLE GitRepository ADD COLUMN status INTEGER;
I think we should set the DEFAULT at this point. The DEFAULT is only used in INSERT/UPDATE statements that don't specify a value for the column; it doesn't cause the table to be rewritten. Setting a default means it's possible to backfill the table using a garbo job and then be sure that any rows inserted after that job completes will have a non-NULL value for the column.
> +
> +COMMENT ON COLUMN GitRepository.status
> + IS 'The current situation of this git repository.';
I'm not sure "situation" is clearer than just repeating "status" here.
> +
> +INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 17, 0);
--
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/385199
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:gitrepo-status-column into launchpad:db-devel.
References