Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
1aad98df
Commit
1aad98df
authored
May 12, 2014
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add web_tasks and web_sessions. Works in progress.
parent
070c7706
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
0 deletions
+84
-0
sql/database-create.sql
sql/database-create.sql
+32
-0
sql/updates/4/393
sql/updates/4/393
+52
-0
No files found.
sql/database-create.sql
View file @
1aad98df
...
...
@@ -92,6 +92,8 @@ CREATE TABLE `apt_profiles` (
`public`
tinyint
(
1
)
NOT
NULL
default
'0'
,
`shared`
tinyint
(
1
)
NOT
NULL
default
'0'
,
`listed`
tinyint
(
1
)
NOT
NULL
default
'0'
,
`locked`
datetime
default
NULL
,
`status`
varchar
(
32
)
default
NULL
,
`weburi`
tinytext
,
`description`
mediumtext
,
`rspec`
mediumtext
,
...
...
@@ -5206,6 +5208,36 @@ CREATE TABLE `vlans` (
KEY
`exptidx`
(
`exptidx`
,
`virtual`
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
;
--
-- Table structure for table `web_sessions`
--
DROP
TABLE
IF
EXISTS
`web_sessions`
;
CREATE
TABLE
`web_sessions`
(
`session_id`
varchar
(
128
)
binary
NOT
NULL
default
''
,
`session_expires`
datetime
NOT
NULL
default
'0000-00-00 00:00:00'
,
`session_data`
text
,
PRIMARY
KEY
(
`session_id`
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
;
--
-- Table structure for table `web_tasks`
--
DROP
TABLE
IF
EXISTS
`web_tasks`
;
CREATE
TABLE
`web_tasks`
(
`task_id`
varchar
(
128
)
binary
NOT
NULL
default
''
,
`created`
datetime
NOT
NULL
default
'0000-00-00 00:00:00'
,
`modified`
datetime
NOT
NULL
default
'0000-00-00 00:00:00'
,
`exited`
datetime
default
NULL
,
`process_id`
int
(
11
)
default
'0'
,
`object_uuid`
varchar
(
40
)
NOT
NULL
default
''
,
`exitcode`
tinyint
(
3
)
default
'0'
,
`task_data`
text
,
PRIMARY
KEY
(
`task_id`
),
KEY
`object_uuid`
(
`object_uuid`
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
;
--
-- Table structure for table `webcams`
--
...
...
sql/updates/4/393
0 → 100644
View file @
1aad98df
#
# Add the relocatable flag to indicate whether the lba_low field must
# be respected (0) or whether the image is "position independent" (1).
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("apt_profiles", "locked")) {
DBQueryFatal("ALTER TABLE apt_profiles ADD ".
" `locked` datetime default NULL ".
" AFTER listed");
}
if (!DBSlotExists("apt_profiles", "status")) {
DBQueryFatal("ALTER TABLE apt_profiles ADD ".
" `status` varchar(32) default NULL ".
" AFTER locked");
}
if (!DBTableExists("web_sessions")) {
DBQueryFatal("CREATE TABLE `web_sessions` ( ".
" `session_id` varchar(128) binary NOT NULL default '', ".
" `session_expires` datetime NOT NULL ".
" default '0000-00-00 00:00:00', ".
" `session_data` text, ".
" PRIMARY KEY (`session_id`) ".
") ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
if (!DBTableExists("web_tasks")) {
DBQueryFatal("CREATE TABLE `web_tasks` ( ".
" `task_id` varchar(128) binary NOT NULL default '', ".
" `created` datetime NOT NULL ".
" default '0000-00-00 00:00:00', ".
" `modified` datetime NOT NULL ".
" default '0000-00-00 00:00:00', ".
" `exited` datetime default NULL, ".
" `process_id` int(11) default '0', ".
" `object_uuid` varchar(40) NOT NULL default '', ".
" `exitcode` tinyint(3) default '0', ".
" `task_data` text, ".
" PRIMARY KEY (`task_id`), ".
" KEY `object_uuid` (`object_uuid`) ".
") ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
return 0;
}
# Local Variables:
# mode:perl
# End:
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