Merge lp:~wgrant/launchpad/processor-nonvirt-db into lp:launchpad/db-devel

Proposed by William Grant
Status: Merged
Merged at revision: 13044
Proposed branch: lp:~wgrant/launchpad/processor-nonvirt-db
Merge into: lp:launchpad/db-devel
Diff against target: 59 lines (+27/-6)
3 files modified
database/sampledata/current-dev.sql (+3/-3)
database/sampledata/current.sql (+3/-3)
database/schema/patch-2209-64-0.sql (+21/-0)
To merge this branch: bzr merge lp:~wgrant/launchpad/processor-nonvirt-db
Reviewer Review Type Date Requested Status
Colin Watson (community) db Approve
Review via email: mp+259095@code.launchpad.net

Commit message

Add Processor.{supports_{non,}virtualized,build_by_default} and set them sensibly for existing rows.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve (db)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'database/sampledata/current-dev.sql'
--- database/sampledata/current-dev.sql 2015-04-20 14:02:12 +0000
+++ database/sampledata/current-dev.sql 2015-05-14 09:38:31 +0000
@@ -972,9 +972,9 @@
972972
973ALTER TABLE processor DISABLE TRIGGER ALL;973ALTER TABLE processor DISABLE TRIGGER ALL;
974974
975INSERT INTO processor (id, name, title, description, restricted) VALUES (1, '386', 'Intel 386', 'Intel 386 and its many derivatives and clones, the basic 32-bit chip in the x86 family', false);975INSERT INTO processor (id, name, title, description, restricted, build_by_default, supports_nonvirtualized, supports_virtualized) VALUES (1, '386', 'Intel 386', 'Intel 386 and its many derivatives and clones, the basic 32-bit chip in the x86 family', false, true, true, true);
976INSERT INTO processor (id, name, title, description, restricted) VALUES (2, 'amd64', 'AMD 64bit', 'AMD 64bit', false);976INSERT INTO processor (id, name, title, description, restricted, build_by_default, supports_nonvirtualized, supports_virtualized) VALUES (2, 'amd64', 'AMD 64bit', 'AMD 64bit', false, true, true, true);
977INSERT INTO processor (id, name, title, description, restricted) VALUES (3, 'hppa', 'HPPA Processor', 'HPPA Processor', false);977INSERT INTO processor (id, name, title, description, restricted, build_by_default, supports_nonvirtualized, supports_virtualized) VALUES (3, 'hppa', 'HPPA Processor', 'HPPA Processor', false, false, true, false);
978978
979979
980ALTER TABLE processor ENABLE TRIGGER ALL;980ALTER TABLE processor ENABLE TRIGGER ALL;
981981
=== modified file 'database/sampledata/current.sql'
--- database/sampledata/current.sql 2015-04-20 14:02:12 +0000
+++ database/sampledata/current.sql 2015-05-14 09:38:31 +0000
@@ -972,9 +972,9 @@
972972
973ALTER TABLE processor DISABLE TRIGGER ALL;973ALTER TABLE processor DISABLE TRIGGER ALL;
974974
975INSERT INTO processor (id, name, title, description, restricted) VALUES (1, '386', 'Intel 386', 'Intel 386 and its many derivatives and clones, the basic 32-bit chip in the x86 family', false);975INSERT INTO processor (id, name, title, description, restricted, build_by_default, supports_nonvirtualized, supports_virtualized) VALUES (1, '386', 'Intel 386', 'Intel 386 and its many derivatives and clones, the basic 32-bit chip in the x86 family', false, true, true, true);
976INSERT INTO processor (id, name, title, description, restricted) VALUES (2, 'amd64', 'AMD 64bit', 'AMD 64bit', false);976INSERT INTO processor (id, name, title, description, restricted, build_by_default, supports_nonvirtualized, supports_virtualized) VALUES (2, 'amd64', 'AMD 64bit', 'AMD 64bit', false, true, true, true);
977INSERT INTO processor (id, name, title, description, restricted) VALUES (3, 'hppa', 'HPPA Processor', 'HPPA Processor', false);977INSERT INTO processor (id, name, title, description, restricted, build_by_default, supports_nonvirtualized, supports_virtualized) VALUES (3, 'hppa', 'HPPA Processor', 'HPPA Processor', false, false, true, false);
978978
979979
980ALTER TABLE processor ENABLE TRIGGER ALL;980ALTER TABLE processor ENABLE TRIGGER ALL;
981981
=== added file 'database/schema/patch-2209-64-0.sql'
--- database/schema/patch-2209-64-0.sql 1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-64-0.sql 2015-05-14 09:38:31 +0000
@@ -0,0 +1,21 @@
1-- Copyright 2015 Canonical Ltd. This software is licensed under the
2-- GNU Affero General Public License version 3 (see the file LICENSE).
3
4SET client_min_messages=ERROR;
5
6ALTER TABLE Processor
7 ADD COLUMN build_by_default boolean DEFAULT false NOT NULL,
8 ADD COLUMN supports_nonvirtualized boolean DEFAULT true NOT NULL,
9 ADD COLUMN supports_virtualized boolean DEFAULT false NOT NULL;
10
11ALTER TABLE Processor
12 ADD CONSTRAINT restricted_not_default
13 CHECK (NOT restricted OR NOT build_by_default);
14
15UPDATE processor SET supports_virtualized = true
16 WHERE name IN ('i386', 'amd64', 'arm64', 'armhf', 'lpia', '386');
17
18UPDATE processor SET build_by_default = true
19 WHERE name IN ('i386', 'amd64', 'lpia', '386');
20
21INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 64, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: