Merge ~cjwatson/launchpad:db-archive-file-history into launchpad:db-devel

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: e019f4e898dc201a990db0a33bac06c07ad6f0bc
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:db-archive-file-history
Merge into: launchpad:db-devel
Diff against target: 19 lines (+13/-0)
1 file modified
database/schema/patch-2210-09-0.sql (+13/-0)
Reviewer Review Type Date Requested Status
William Grant db Approve
Review via email: mp+373970@code.launchpad.net

Commit message

Add ArchiveFile.date_created and ArchiveFile.date_superseded

LP: #1765933

Description of the change

This is essentially the same as https://code.launchpad.net/~cjwatson/launchpad/db-archive-file-history/+merge/343750, converted to git and rebased on master, and with a new patch number since we've rebaselined the schema since I originally proposed this.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) wrote :

Not terribly useful without indexes, but for the cold patch this is good.

It might, though, be interesting to clarify in the comments that date_superseded is when it ceased to hold its name -- it remains on disk for somewhat longer.

review: Approve (db)
e019f4e... by Colin Watson

Clarify meaning of ArchiveFile.date_superseded

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/database/schema/patch-2210-09-0.sql b/database/schema/patch-2210-09-0.sql
2new file mode 100644
3index 0000000..b4c3153
4--- /dev/null
5+++ b/database/schema/patch-2210-09-0.sql
6@@ -0,0 +1,13 @@
7+-- Copyright 2018 Canonical Ltd. This software is licensed under the
8+-- GNU Affero General Public License version 3 (see the file LICENSE).
9+
10+SET client_min_messages=ERROR;
11+
12+ALTER TABLE ArchiveFile
13+ ADD COLUMN date_created timestamp without time zone,
14+ ADD COLUMN date_superseded timestamp without time zone;
15+
16+COMMENT ON COLUMN ArchiveFile.date_created IS 'The date when this file was created.';
17+COMMENT ON COLUMN ArchiveFile.date_superseded IS 'The date when this file ceased to hold its path in the archive, due to being removed or superseded by a newer version.';
18+
19+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 09, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: