← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~twom/launchpad:db-ocifile-date-last-used into launchpad:db-devel

 


Diff comments:

> diff --git a/database/schema/patch-2210-08-9.sql b/database/schema/patch-2210-08-9.sql
> new file mode 100644
> index 0000000..a50f25e
> --- /dev/null
> +++ b/database/schema/patch-2210-08-9.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 OCIFile
> +ADD COLUMN date_last_used timestamp without time zone DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC') NOT NULL;

Not sure how big this table will be, but I think it worth adding an index to this column since it's used on the WHERE clause of the garbo job.

> +
> +COMMENT ON COLUMN OCIFile.date_last_used IS 'The datetime this file was last used in a build.';
> +
> +INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 08, 9);


-- 
https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/384129
Your team Launchpad code reviewers is requested to review the proposed merge of ~twom/launchpad:db-ocifile-date-last-used into launchpad:db-devel.


References