launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #18573
[Merge] lp:~cjwatson/launchpad/db-gitjob-repository-nullable into lp:launchpad/db-devel
Colin Watson has proposed merging lp:~cjwatson/launchpad/db-gitjob-repository-nullable into lp:launchpad/db-devel.
Commit message:
Drop NOT NULL constraint on GitJob.repository, for the benefit of a future space-reclaiming job.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/db-gitjob-repository-nullable/+merge/259155
As part of implementing Git repository deletion, I'd like to add a job that reclaims space on the hosting backend after a while, much like ReclaimBranchSpaceJob. This requires being able to create a GitJob with repository = NULL. BranchJob.branch is similarly already nullable for the same reason.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/db-gitjob-repository-nullable into lp:launchpad/db-devel.
=== added file 'database/schema/patch-2209-61-6.sql'
--- database/schema/patch-2209-61-6.sql 1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-61-6.sql 2015-05-14 19:00:54 +0000
@@ -0,0 +1,8 @@
+-- Copyright 2015 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 GitJob ALTER COLUMN repository DROP NOT NULL;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 61, 6);