Merge lp:~cjwatson/launchpad/db-snap-allow-network into lp:launchpad/db-devel

Proposed by Colin Watson on 2018-01-31
Status: Merged
Merged at revision: 13829
Proposed branch: lp:~cjwatson/launchpad/db-snap-allow-network
Merge into: lp:launchpad/db-devel
Diff against target: 14 lines (+10/-0)
1 file modified
database/schema/patch-2209-83-0.sql (+10/-0)
To merge this branch: bzr merge lp:~cjwatson/launchpad/db-snap-allow-network
Reviewer Review Type Date Requested Status
William Grant db 2018-01-31 Approve on 2018-03-26
Review via email: mp+336923@code.launchpad.net

Commit message

Add Snap.allow_internet.

Description of the change

To post a comment you must log in.
William Grant (wgrant) wrote :

I wonder if allow_internet or allow_proxy would be better. allow_network sounds rather more draconian than reality.

There are probably also few enough snaps that you could set the default and make the column NOT NULL here.

review: Approve (db)
13785. By Colin Watson on 2018-04-04

Rename Snap.allow_network to Snap.allow_internet.

13786. By Colin Watson on 2018-04-04

Default Snap.allow_internet to true, and make it NOT NULL.

There are few enough snaps that this can be done acceptably quickly.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'database/schema/patch-2209-83-0.sql'
2--- database/schema/patch-2209-83-0.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-83-0.sql 2018-04-04 12:33:50 +0000
4@@ -0,0 +1,10 @@
5+-- Copyright 2018 Canonical Ltd. This software is licensed under the
6+-- GNU Affero General Public License version 3 (see the file LICENSE).
7+
8+SET client_min_messages=ERROR;
9+
10+ALTER TABLE Snap ADD COLUMN allow_internet boolean DEFAULT true NOT NULL;
11+
12+COMMENT ON COLUMN Snap.allow_internet IS 'If True, builds of this snap may allow access to external network resources.';
13+
14+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 83, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: