Merge ~cjwatson/launchpad:db-distribution-traversal into launchpad:db-devel

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 8a0d38f764503627a00f3a64f4aa4fd0a8460836
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:db-distribution-traversal
Merge into: launchpad:db-devel
Diff against target: 17 lines (+11/-0)
1 file modified
database/schema/patch-2210-23-0.sql (+11/-0)
Reviewer Review Type Date Requested Status
William Grant db Approve
Review via email: mp+393730@code.launchpad.net

Commit message

Add default traversal columns to Distribution

Description of the change

These describe how a name immediately following the distribution name in a URL is interpreted.

Since there are only a few dozen distributions in production, it doesn't seem worth going to extra effort to avoid rewriting the table.

Code MPs: https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/393731 and https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/393809

To post a comment you must log in.
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-23-0.sql b/database/schema/patch-2210-23-0.sql
2new file mode 100644
3index 0000000..d1db911
4--- /dev/null
5+++ b/database/schema/patch-2210-23-0.sql
6@@ -0,0 +1,11 @@
7+-- Copyright 2020 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 Distribution
13+ -- 0 == SERIES
14+ ADD COLUMN default_traversal_policy integer DEFAULT 0 NOT NULL,
15+ ADD COLUMN redirect_default_traversal boolean DEFAULT false NOT NULL;
16+
17+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 23, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: