← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~pappacena/launchpad:db-patch-change-override-log into launchpad:db-devel

 


Diff comments:

> diff --git a/database/schema/patch-2210-12-0.sql b/database/schema/patch-2210-12-0.sql
> new file mode 100644
> index 0000000..0348301
> --- /dev/null
> +++ b/database/schema/patch-2210-12-0.sql
> @@ -0,0 +1,15 @@
> +-- 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 binarypackagepublishinghistory
> +    ADD COLUMN creator INT REFERENCES person;
> +
> +CREATE INDEX binarypackagepublishinghistory__creator__idx ON
> +    binarypackagepublishinghistory(creator) WHERE creator IS NOT NULL;

SourcePackagePublishingHistory also uses a partial index here. 

We will not have any place in LP querying for this column anytime soon, but the cost of this partial index will be small (most of the entries will be NULL).

> +
> +
> +INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 12, 0);
> +


-- 
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/380254
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:db-patch-change-override-log into launchpad:db-devel.