Merge lp:~jpds/launchpad/mirrorprober-next-probe-schema into lp:launchpad/db-devel

Proposed by Jonathan Davies
Status: Work in progress
Proposed branch: lp:~jpds/launchpad/mirrorprober-next-probe-schema
Merge into: lp:launchpad/db-devel
Diff against target: 93 lines (+36/-20)
4 files modified
database/sampledata/current-dev.sql (+10/-10)
database/sampledata/current.sql (+10/-10)
database/schema/comments.sql (+1/-0)
database/schema/patch-2207-50-0.sql (+15/-0)
To merge this branch: bzr merge lp:~jpds/launchpad/mirrorprober-next-probe-schema
Reviewer Review Type Date Requested Status
Björn Tillenius (community) db Approve
Stuart Bishop (community) db Approve
Review via email: mp+23467@code.launchpad.net

Commit message

Added next_probe timestamp column to distributionmirror to enable future manual mirror probes.

Description of the change

= Summary =

Added a next_probe timestamp column to distributionmirror, this will allow us to manually request probes of mirrors as requested on bug #196175.

This branch adds the needed schema, models to follow.

To post a comment you must log in.
9251. By Jonathan Davies

Make next_probe default to now, as we have already approved mirrors.

Revision history for this message
Stuart Bishop (stub) wrote :

Fine here. The timestamp is overkill for the specified use case, but may be useful for other things like spreading the checks over the whole day rather than in one big batch.

We could drop the enabled flag if we made the new column nullable, but I think keeping it is clearer and we are not dealing with enough data to worry about efficiency.

It needs a comment for the new column added to database/schema/comments.sql

I notice we still have an unused Mirror table. I guess that should be dropped. Time for me to run some checks and take out the garbage.

review: Approve (db)
Revision history for this message
Stuart Bishop (stub) wrote :

Fine here. The timestamp is overkill for the specified use case, but may be useful for other things like spreading the checks over the whole day rather than in one big batch.

We could drop the enabled flag if we made the new column nullable, but I think keeping it is clearer and we are not dealing with enough data to worry about efficiency.

It needs a comment for the new column added to database/schema/comments.sql

I notice we still have an unused Mirror table. I guess that should be dropped. Time for me to run some checks and take out the garbage.

review: Approve (db)
Revision history for this message
Stuart Bishop (stub) wrote :

Allocated patch number is patch-2207-50-0.sql

Revision history for this message
Björn Tillenius (bjornt) wrote :

Looks good, since it's consistent with checkwatches and the branch puller:

< BjornT> jpds: did you discuss the implementation with anyone? i'm not.
          sure exactly what you're planning to do.
< jpds> BjornT: Change the distribution mirror to be more like the branch.
        puller so that we can have manual probes.
< BjornT> jpds: can you point me to the relevant part of the branch.
          puller?
< jpds> BjornT: next_mirror for branches, and next_check for bug watches.

review: Approve (db)
9252. By Jonathan Davies

Renamed patch as per stub's allocation.

9253. By Jonathan Davies

Added comment for DistributionMirror.next_probe.

9254. By Jonathan Davies

Change next_probe so that it can be null (don't probe mirrors which this value).

9255. By Jonathan Davies

Added checks and constraints as per stub's suggestions.

Revision history for this message
Stuart Bishop (stub) wrote :

With ec2 land now.

Revision history for this message
Stuart Bishop (stub) wrote :

This db patch will need to be landed in tandem with the code changes.

The distribution-mirror.txt tests toggle the enabled flag without setting the next_probe value to NULL, which fails due to the check constraint.

9256. By Jonathan Davies

Amended patch-2207-50-0.sql so that it only sets next_probe to now for enabled
and official mirrors.

9257. By Jonathan Davies

Updated sampledata for patch-2207-50-0.sql changes.

Unmerged revisions

9257. By Jonathan Davies

Updated sampledata for patch-2207-50-0.sql changes.

9256. By Jonathan Davies

Amended patch-2207-50-0.sql so that it only sets next_probe to now for enabled
and official mirrors.

9255. By Jonathan Davies

Added checks and constraints as per stub's suggestions.

9254. By Jonathan Davies

Change next_probe so that it can be null (don't probe mirrors which this value).

9253. By Jonathan Davies

Added comment for DistributionMirror.next_probe.

9252. By Jonathan Davies

Renamed patch as per stub's allocation.

9251. By Jonathan Davies

Make next_probe default to now, as we have already approved mirrors.

9250. By Jonathan Davies

Added database patch patch-2207-49-0.sql - adds a new column to
distributionmirror for bug #196175.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'database/sampledata/current-dev.sql'
2--- database/sampledata/current-dev.sql 2010-04-06 13:20:15 +0000
3+++ database/sampledata/current-dev.sql 2010-04-16 11:08:30 +0000
4@@ -2307,16 +2307,16 @@
5
6 ALTER TABLE distributionmirror DISABLE TRIGGER ALL;
7
8-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (1, 1, 'archive-mirror', 'http://localhost:11375/valid-mirror/', NULL, NULL, NULL, NULL, 1, 10, 75, 1, true, true, '2006-10-16 18:31:43.434567', NULL, 30, NULL, NULL, false);
9-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (2, 1, 'invalid-mirror', 'http://localhost:11375/invalid-mirror/', NULL, NULL, NULL, NULL, 12, 50, 75, 2, true, true, '2006-10-16 18:31:43.436833', NULL, 20, NULL, NULL, false);
10-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (3, 1, 'unreachable-mirror', 'http://localhost:11375/timeout/', NULL, NULL, NULL, NULL, 12, 30, 75, 2, true, true, '2006-10-16 18:31:43.437635', NULL, 30, NULL, NULL, false);
11-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (4, 1, 'archive-404-mirror', 'http://localhost:11375/archive-mirror/', NULL, NULL, NULL, NULL, 12, 30, 75, 1, true, true, '2006-10-16 18:31:43.438573', NULL, 30, NULL, NULL, false);
12-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (5, 1, 'releases-mirror', 'http://localhost:11375/valid-mirror/releases/', NULL, NULL, NULL, NULL, 12, 50, 75, 2, true, true, '2006-10-16 18:31:43.439336', NULL, 30, NULL, NULL, false);
13-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (6, 1, 'releases-mirror2', 'http://localhost:11375/valid-mirror/releases2/', NULL, NULL, NULL, NULL, 12, 50, 82, 2, true, true, '2006-10-16 18:31:43.440079', NULL, 30, NULL, NULL, false);
14-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (7, 1, 'archive-mirror2', 'http://localhost:11375/valid-mirror2/', NULL, NULL, NULL, NULL, 1, 10, 9, 1, true, true, '2006-10-16 18:31:43.440832', NULL, 30, NULL, NULL, false);
15-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (8, 1, 'canonical-archive', 'http://archive.ubuntu.com/ubuntu/', NULL, NULL, NULL, NULL, 1, 70, 225, 1, true, true, '2006-10-16 18:31:43.434567', NULL, 30, NULL, NULL, false);
16-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (9, 1, 'canonical-releases', 'http://releases.ubuntu.com/', NULL, NULL, NULL, NULL, 1, 70, 225, 2, true, true, '2006-10-16 18:31:43.434567', NULL, 30, NULL, NULL, false);
17-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (10, 1, 'random-releases-mirror', 'http://releases.random.com/', NULL, NULL, NULL, NULL, 1, 70, 225, 2, true, true, '2006-10-16 18:31:43.434567', NULL, 10, NULL, NULL, false);
18+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (1, 1, 'archive-mirror', 'http://localhost:11375/valid-mirror/', NULL, NULL, NULL, NULL, 1, 10, 75, 1, true, true, '2006-10-16 18:31:43.434567', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:15.508557');
19+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (2, 1, 'invalid-mirror', 'http://localhost:11375/invalid-mirror/', NULL, NULL, NULL, NULL, 12, 50, 75, 2, true, true, '2006-10-16 18:31:43.436833', NULL, 20, NULL, NULL, false, NULL);
20+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (3, 1, 'unreachable-mirror', 'http://localhost:11375/timeout/', NULL, NULL, NULL, NULL, 12, 30, 75, 2, true, true, '2006-10-16 18:31:43.437635', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:15.508557');
21+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (4, 1, 'archive-404-mirror', 'http://localhost:11375/archive-mirror/', NULL, NULL, NULL, NULL, 12, 30, 75, 1, true, true, '2006-10-16 18:31:43.438573', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:15.508557');
22+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (5, 1, 'releases-mirror', 'http://localhost:11375/valid-mirror/releases/', NULL, NULL, NULL, NULL, 12, 50, 75, 2, true, true, '2006-10-16 18:31:43.439336', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:15.508557');
23+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (6, 1, 'releases-mirror2', 'http://localhost:11375/valid-mirror/releases2/', NULL, NULL, NULL, NULL, 12, 50, 82, 2, true, true, '2006-10-16 18:31:43.440079', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:15.508557');
24+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (7, 1, 'archive-mirror2', 'http://localhost:11375/valid-mirror2/', NULL, NULL, NULL, NULL, 1, 10, 9, 1, true, true, '2006-10-16 18:31:43.440832', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:15.508557');
25+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (8, 1, 'canonical-archive', 'http://archive.ubuntu.com/ubuntu/', NULL, NULL, NULL, NULL, 1, 70, 225, 1, true, true, '2006-10-16 18:31:43.434567', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:15.508557');
26+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (9, 1, 'canonical-releases', 'http://releases.ubuntu.com/', NULL, NULL, NULL, NULL, 1, 70, 225, 2, true, true, '2006-10-16 18:31:43.434567', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:15.508557');
27+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (10, 1, 'random-releases-mirror', 'http://releases.random.com/', NULL, NULL, NULL, NULL, 1, 70, 225, 2, true, true, '2006-10-16 18:31:43.434567', NULL, 10, NULL, NULL, false, NULL);
28
29
30 ALTER TABLE distributionmirror ENABLE TRIGGER ALL;
31
32=== modified file 'database/sampledata/current.sql'
33--- database/sampledata/current.sql 2010-04-06 13:20:15 +0000
34+++ database/sampledata/current.sql 2010-04-16 11:08:30 +0000
35@@ -2289,16 +2289,16 @@
36
37 ALTER TABLE distributionmirror DISABLE TRIGGER ALL;
38
39-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (1, 1, 'archive-mirror', 'http://localhost:11375/valid-mirror/', NULL, NULL, NULL, NULL, 1, 10, 75, 1, true, true, '2006-10-16 18:31:43.434567', NULL, 30, NULL, NULL, false);
40-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (2, 1, 'invalid-mirror', 'http://localhost:11375/invalid-mirror/', NULL, NULL, NULL, NULL, 12, 50, 75, 2, true, true, '2006-10-16 18:31:43.436833', NULL, 20, NULL, NULL, false);
41-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (3, 1, 'unreachable-mirror', 'http://localhost:11375/timeout/', NULL, NULL, NULL, NULL, 12, 30, 75, 2, true, true, '2006-10-16 18:31:43.437635', NULL, 30, NULL, NULL, false);
42-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (4, 1, 'archive-404-mirror', 'http://localhost:11375/archive-mirror/', NULL, NULL, NULL, NULL, 12, 30, 75, 1, true, true, '2006-10-16 18:31:43.438573', NULL, 30, NULL, NULL, false);
43-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (5, 1, 'releases-mirror', 'http://localhost:11375/valid-mirror/releases/', NULL, NULL, NULL, NULL, 12, 50, 75, 2, true, true, '2006-10-16 18:31:43.439336', NULL, 30, NULL, NULL, false);
44-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (6, 1, 'releases-mirror2', 'http://localhost:11375/valid-mirror/releases2/', NULL, NULL, NULL, NULL, 12, 50, 82, 2, true, true, '2006-10-16 18:31:43.440079', NULL, 30, NULL, NULL, false);
45-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (7, 1, 'archive-mirror2', 'http://localhost:11375/valid-mirror2/', NULL, NULL, NULL, NULL, 1, 10, 9, 1, true, true, '2006-10-16 18:31:43.440832', NULL, 30, NULL, NULL, false);
46-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (8, 1, 'canonical-archive', 'http://archive.ubuntu.com/ubuntu/', NULL, NULL, NULL, NULL, 1, 70, 225, 1, true, true, '2006-10-16 18:31:43.434567', NULL, 30, NULL, NULL, false);
47-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (9, 1, 'canonical-releases', 'http://releases.ubuntu.com/', NULL, NULL, NULL, NULL, 1, 70, 225, 2, true, true, '2006-10-16 18:31:43.434567', NULL, 30, NULL, NULL, false);
48-INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror) VALUES (10, 1, 'random-releases-mirror', 'http://releases.random.com/', NULL, NULL, NULL, NULL, 1, 70, 225, 2, true, true, '2006-10-16 18:31:43.434567', NULL, 10, NULL, NULL, false);
49+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (1, 1, 'archive-mirror', 'http://localhost:11375/valid-mirror/', NULL, NULL, NULL, NULL, 1, 10, 75, 1, true, true, '2006-10-16 18:31:43.434567', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:26.179484');
50+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (2, 1, 'invalid-mirror', 'http://localhost:11375/invalid-mirror/', NULL, NULL, NULL, NULL, 12, 50, 75, 2, true, true, '2006-10-16 18:31:43.436833', NULL, 20, NULL, NULL, false, NULL);
51+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (3, 1, 'unreachable-mirror', 'http://localhost:11375/timeout/', NULL, NULL, NULL, NULL, 12, 30, 75, 2, true, true, '2006-10-16 18:31:43.437635', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:26.179484');
52+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (4, 1, 'archive-404-mirror', 'http://localhost:11375/archive-mirror/', NULL, NULL, NULL, NULL, 12, 30, 75, 1, true, true, '2006-10-16 18:31:43.438573', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:26.179484');
53+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (5, 1, 'releases-mirror', 'http://localhost:11375/valid-mirror/releases/', NULL, NULL, NULL, NULL, 12, 50, 75, 2, true, true, '2006-10-16 18:31:43.439336', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:26.179484');
54+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (6, 1, 'releases-mirror2', 'http://localhost:11375/valid-mirror/releases2/', NULL, NULL, NULL, NULL, 12, 50, 82, 2, true, true, '2006-10-16 18:31:43.440079', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:26.179484');
55+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (7, 1, 'archive-mirror2', 'http://localhost:11375/valid-mirror2/', NULL, NULL, NULL, NULL, 1, 10, 9, 1, true, true, '2006-10-16 18:31:43.440832', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:26.179484');
56+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (8, 1, 'canonical-archive', 'http://archive.ubuntu.com/ubuntu/', NULL, NULL, NULL, NULL, 1, 70, 225, 1, true, true, '2006-10-16 18:31:43.434567', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:26.179484');
57+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (9, 1, 'canonical-releases', 'http://releases.ubuntu.com/', NULL, NULL, NULL, NULL, 1, 70, 225, 2, true, true, '2006-10-16 18:31:43.434567', NULL, 30, NULL, NULL, false, '2010-04-16 10:59:26.179484');
58+INSERT INTO distributionmirror (id, distribution, name, http_base_url, ftp_base_url, rsync_base_url, displayname, description, owner, speed, country, content, official_candidate, enabled, date_created, whiteboard, status, date_reviewed, reviewer, country_dns_mirror, next_probe) VALUES (10, 1, 'random-releases-mirror', 'http://releases.random.com/', NULL, NULL, NULL, NULL, 1, 70, 225, 2, true, true, '2006-10-16 18:31:43.434567', NULL, 10, NULL, NULL, false, NULL);
59
60
61 ALTER TABLE distributionmirror ENABLE TRIGGER ALL;
62
63=== modified file 'database/schema/comments.sql'
64--- database/schema/comments.sql 2010-03-25 19:55:16 +0000
65+++ database/schema/comments.sql 2010-04-16 11:08:30 +0000
66@@ -1877,6 +1877,7 @@
67 COMMENT ON COLUMN DistributionMirror.date_created IS 'The date and time the mirror was created.';
68 COMMENT ON COLUMN DistributionMirror.date_reviewed IS 'The date and time the mirror was reviewed.';
69 COMMENT ON COLUMN DistributionMirror.country_dns_mirror IS 'Is the mirror a country DNS mirror?';
70+COMMENT ON COLUMN DistributionMirror.next_probe IS 'The time when we will next probe this mirror (NULL means never).';
71
72 -- MirrorDistroArchSeries
73 COMMENT ON TABLE MirrorDistroArchSeries IS 'The mirror of the packages of a given Distro Arch Release.';
74
75=== added file 'database/schema/patch-2207-50-0.sql'
76--- database/schema/patch-2207-50-0.sql 1970-01-01 00:00:00 +0000
77+++ database/schema/patch-2207-50-0.sql 2010-04-16 11:08:30 +0000
78@@ -0,0 +1,15 @@
79+-- Copyright 2010 Canonical Ltd. This software is licensed under the
80+-- GNU Affero General Public License version 3 (see the file LICENSE).
81+
82+SET client_min_messages=ERROR;
83+
84+ALTER TABLE distributionmirror
85+ ADD COLUMN next_probe TIMESTAMP WITHOUT TIME ZONE;
86+
87+UPDATE DistributionMirror SET next_probe = CURRENT_TIMESTAMP AT
88+ TIME ZONE 'UTC' WHERE DistributionMirror.status = 30;
89+
90+ALTER TABLE distributionmirror ADD CONSTRAINT valid_next_probe
91+ CHECK (next_probe IS NULL OR (enabled IS TRUE AND status = 30));
92+
93+INSERT INTO LaunchpadDatabaseRevision VALUES (2207, 50, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: