Commit 51fe60fc authored by Timothy Stack's avatar Timothy Stack

Change location_info to include building and floor in the primary key.

parent a939ddf8
......@@ -766,8 +766,8 @@ CREATE TABLE linkdelays (
CREATE TABLE location_info (
node_id varchar(32) NOT NULL default '',
floor varchar(32) default NULL,
building varchar(32) default NULL,
floor varchar(32) NOT NULL default '',
building varchar(32) NOT NULL default '',
loc_x int(10) unsigned NOT NULL default '0',
loc_y int(10) unsigned NOT NULL default '0',
loc_z float default NULL,
......@@ -776,7 +776,7 @@ CREATE TABLE location_info (
phone tinytext,
room varchar(32) default NULL,
stamp int(10) unsigned default NULL,
PRIMARY KEY (node_id)
PRIMARY KEY (node_id,building,floor)
) TYPE=MyISAM;
--
......
......@@ -2598,3 +2598,13 @@ last_net_act,last_cpu_act,last_ext_act);
used to set an ID for the programmed mote.
alter table virt_nodes add column numeric_id int default NULL;
1.331: Change location_info to include building and floor in the
primary key.
alter table location_info change floor floor varchar(32) \
NOT NULL default '';
alter table location_info change building building varchar(32) \
NOT NULL default '';
alter table location_info drop primary key;
alter table location_info add primary key(node_id,building,floor);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment