Merge ~ilasc/launchpad:db-gitrepository-repack into launchpad:db-devel

Proposed by Ioana Lasc
Status: Merged
Approved by: Ioana Lasc
Approved revision: 2022b23f2a2730057c3d6a67dba5111de8bab899
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ilasc/launchpad:db-gitrepository-repack
Merge into: launchpad:db-devel
Diff against target: 21 lines (+15/-0)
1 file modified
database/schema/patch-2210-25-0.sql (+15/-0)
Reviewer Review Type Date Requested Status
William Grant db Approve
Colin Watson db Approve
Cristian Gonzalez (community) Approve
Review via email:

Commit message

GitRepository repack thresholds

Description of the change

This adds the required fields on GitRepository for the Automated Git Repacks, spec here:

To post a comment you must log in.
2d53506... by Ioana Lasc

Add newline at the end of file

Revision history for this message
Cristian Gonzalez (cristiangsp) wrote :

Looks good!

review: Approve
Revision history for this message
Colin Watson (cjwatson) wrote :
review: Approve (db)
ea0eb86... by Ioana Lasc

Address review comments

Revision history for this message
Ioana Lasc (ilasc) wrote :

Thank you Colin!
Colin's comments addressed, MP and spec ( now ready for William's review.

0748756... by Ioana Lasc

Change field names per review.

2022b23... by Ioana Lasc

Fix indent in patch 2210-25-0

Revision history for this message
William Grant (wgrant) :
review: Approve (db)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/database/schema/patch-2210-25-0.sql b/database/schema/patch-2210-25-0.sql
2new file mode 100644
3index 0000000..7397939
4--- /dev/null
5+++ b/database/schema/patch-2210-25-0.sql
6@@ -0,0 +1,15 @@
7+-- Copyright 2021 Canonical Ltd. This software is licensed under the
8+-- GNU Affero General Public License version 3 (see the file LICENSE).
10+SET client_min_messages=ERROR;
12+ALTER TABLE GitRepository
13+ ADD COLUMN loose_object_count integer,
14+ ADD COLUMN pack_count integer,
15+ ADD COLUMN date_last_repacked timestamp without time zone,
16+ ADD COLUMN date_last_scanned timestamp without time zone;
18+COMMENT ON COLUMN GitRepository.date_last_scanned IS 'The datetime that packs and loose_objects were last updated for this repository.';
19+COMMENT ON COLUMN GitRepository.date_last_repacked IS 'The datetime that the last repack request was executed successfully on Turnip.';
21+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 25, 0);


People subscribed via source and target branches

to status/vote changes: