- add message as an object_type in object_types table
[plcapi.git] / planetlab4.sql
index 8b38319..f3855f5 100644 (file)
@@ -9,7 +9,7 @@
 --
 -- Copyright (C) 2006 The Trustees of Princeton University
 --
--- $Id: planetlab4.sql,v 1.34 2006/11/14 09:44:40 thierry Exp $
+-- $Id: planetlab4.sql,v 1.36 2006/11/15 16:42:12 tmack Exp $
 --
 
 --------------------------------------------------------------------------------
@@ -25,6 +25,17 @@ CREATE AGGREGATE array_accum (
     initcond = '{}'
 );
 
+--------------------------------------------------------------------------------
+-- Version
+--------------------------------------------------------------------------------
+
+--version
+CREATE TABLE plc_db_version (
+       version integer NOT NULL 
+) WITH OIDS;
+
+INSERT INTO plc_db_version (version) VALUES (4);
+
 --------------------------------------------------------------------------------
 -- Accounts
 --------------------------------------------------------------------------------
@@ -589,7 +600,7 @@ CREATE TABLE peer_slice (
     PRIMARY KEY (peer_id, slice_id)
 ) WITH OIDS;
 CREATE INDEX peer_slice_peer_id_idx ON peer_slice (peer_id);
-CREATE INDEX peer_slice_slice_id_idx ON peer_slice (node_id);
+CREATE INDEX peer_slice_slice_id_idx ON peer_slice (slice_id);
 
 CREATE VIEW peer_slices AS
 SELECT peer_id,
@@ -712,6 +723,7 @@ INSERT INTO object_types (object_type) VALUES ('BootState');
 INSERT INTO object_types (object_type) VALUES ('ConfFile');
 INSERT INTO object_types (object_type) VALUES ('KeyType');
 INSERT INTO object_types (object_type) VALUES ('Key');
+INSERT INTO object_types (object_type) VALUES ('Message');
 INSERT INTO object_types (object_type) VALUES ('NetworkMethod');
 INSERT INTO object_types (object_type) VALUES ('NetworkType');
 INSERT INTO object_types (object_type) VALUES ('Network');