← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Colin Watson has proposed merging ~cjwatson/launchpad:db-archive-file-history into launchpad:db-devel.

Commit message:
Add ArchiveFile.date_created and ArchiveFile.date_superseded

LP: #1765933

Requested reviews:
  Stuart Bishop (stub): db
  Launchpad code reviewers (launchpad-reviewers): db
Related bugs:
  Bug #1765933 in Launchpad itself: "Allow building livefses against a view of the archive at a fixed point in time"
  https://bugs.launchpad.net/launchpad/+bug/1765933

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/373970

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.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:db-archive-file-history into launchpad:db-devel.
diff --git a/database/schema/patch-2210-09-0.sql b/database/schema/patch-2210-09-0.sql
new file mode 100644
index 0000000..f3cd6bd
--- /dev/null
+++ b/database/schema/patch-2210-09-0.sql
@@ -0,0 +1,13 @@
+-- Copyright 2018 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 ArchiveFile
+    ADD COLUMN date_created timestamp without time zone,
+    ADD COLUMN date_superseded timestamp without time zone;
+
+COMMENT ON COLUMN ArchiveFile.date_created IS 'The date when this file was created.';
+COMMENT ON COLUMN ArchiveFile.date_superseded IS 'The date when this file was removed or superseded by a newer version.';
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 09, 0);