-- Thierry Parmentelat - INRIA
--
-- $Id$
+-- $URL$
--
--- this is part of the script to migrate from 4.2 to 5.0
+-- this is part of the script to migrate from 4.2 to 4.3
--
-- most of the renamings have taken place already when this script is invoked
--
INSERT INTO run_levels (run_level) VALUES ('failboot');
INSERT INTO run_levels (run_level) VALUES ('reinstall');
+
+----------------------------------------
+-- node types
+----------------------------------------
+CREATE TABLE node_types (
+ node_type text PRIMARY KEY
+) WITH OIDS;
+INSERT INTO node_types (node_type) VALUES ('regular');
+INSERT INTO node_types (node_type) VALUES ('dummynet');
+
----------------------------------------
-- nodes
----------------------------------------
-ALTER TABLE nodes ADD COLUMN node_type TEXT NOT NULL DEFAULT 'regular';
+ALTER TABLE nodes ADD COLUMN node_type TEXT REFERENCES node_types DEFAULT 'regular'; -- node types
+ALTER TABLE nodes ALTER COLUMN boot_state SET DEFAULT 'reinstall'; -- boot_states changed in planetlab5.sql
ALTER TABLE nodes ADD COLUMN verified boolean NOT NULL DEFAULT false; -- whether or not the node & pcu are verified
-ALTER TABLE nodes ADD COLUMN extrainfo TEXT;
ALTER TABLE nodes ADD COLUMN run_level TEXT REFERENCES run_levels DEFAULT NULL; -- Node Run Level
----------------------------------------