Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-stable
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
emulab
emulab-stable
Commits
51fe60fc
Commit
51fe60fc
authored
Apr 06, 2005
by
Timothy Stack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change location_info to include building and floor in the primary key.
parent
a939ddf8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
sql/database-create.sql
sql/database-create.sql
+3
-3
sql/database-migrate.txt
sql/database-migrate.txt
+10
-0
No files found.
sql/database-create.sql
View file @
51fe60fc
...
@@ -766,8 +766,8 @@ CREATE TABLE linkdelays (
...
@@ -766,8 +766,8 @@ CREATE TABLE linkdelays (
CREATE
TABLE
location_info
(
CREATE
TABLE
location_info
(
node_id
varchar
(
32
)
NOT
NULL
default
''
,
node_id
varchar
(
32
)
NOT
NULL
default
''
,
floor
varchar
(
32
)
default
NULL
,
floor
varchar
(
32
)
NOT
NULL
default
''
,
building
varchar
(
32
)
default
NULL
,
building
varchar
(
32
)
NOT
NULL
default
''
,
loc_x
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
loc_x
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
loc_y
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
loc_y
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
loc_z
float
default
NULL
,
loc_z
float
default
NULL
,
...
@@ -776,7 +776,7 @@ CREATE TABLE location_info (
...
@@ -776,7 +776,7 @@ CREATE TABLE location_info (
phone
tinytext
,
phone
tinytext
,
room
varchar
(
32
)
default
NULL
,
room
varchar
(
32
)
default
NULL
,
stamp
int
(
10
)
unsigned
default
NULL
,
stamp
int
(
10
)
unsigned
default
NULL
,
PRIMARY
KEY
(
node_id
)
PRIMARY
KEY
(
node_id
,
building
,
floor
)
)
TYPE
=
MyISAM
;
)
TYPE
=
MyISAM
;
--
--
...
...
sql/database-migrate.txt
View file @
51fe60fc
...
@@ -2598,3 +2598,13 @@ last_net_act,last_cpu_act,last_ext_act);
...
@@ -2598,3 +2598,13 @@ last_net_act,last_cpu_act,last_ext_act);
used to set an ID for the programmed mote.
used to set an ID for the programmed mote.
alter table virt_nodes add column numeric_id int default NULL;
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);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment