Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
33a8241e
Commit
33a8241e
authored
Dec 13, 2005
by
Leigh B. Stoller
Browse files
Commit the experiment archiving DB changes; this stuff is sure to
change, and for now is only active at Utah.
parent
85243371
Changes
2
Hide whitespace changes
Inline
Side-by-side
sql/database-create.sql
View file @
33a8241e
...
...
@@ -4,6 +4,43 @@
---------------------------------------------------------
-- Server version 3.23.58-log
--
-- Table structure for table `archive_tags`
--
CREATE
TABLE
archive_tags
(
idx
int
(
10
)
unsigned
NOT
NULL
auto_increment
,
tag
varchar
(
64
)
NOT
NULL
default
''
,
archive_idx
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
date_created
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
PRIMARY
KEY
(
idx
),
UNIQUE
KEY
tag
(
tag
,
archive_idx
)
)
TYPE
=
MyISAM
;
--
-- Table structure for table `archive_views`
--
CREATE
TABLE
archive_views
(
view
varchar
(
64
)
NOT
NULL
default
''
,
archive_idx
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
current_tag
varchar
(
64
)
NOT
NULL
default
''
,
previous_tag
varchar
(
64
)
default
NULL
,
date_created
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
PRIMARY
KEY
(
view
,
archive_idx
)
)
TYPE
=
MyISAM
;
--
-- Table structure for table `archives`
--
CREATE
TABLE
archives
(
idx
int
(
10
)
unsigned
NOT
NULL
auto_increment
,
directory
tinytext
,
date_created
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
PRIMARY
KEY
(
idx
)
)
TYPE
=
MyISAM
;
--
-- Table structure for table `buildings`
--
...
...
@@ -287,6 +324,7 @@ CREATE TABLE experiment_resources (
minlinks
tinyint
(
3
)
unsigned
default
'0'
,
maxlinks
tinyint
(
3
)
unsigned
default
'0'
,
delay_capacity
tinyint
(
3
)
unsigned
default
NULL
,
archive_tag
varchar
(
32
)
NOT
NULL
default
''
,
thumbnail
mediumblob
,
PRIMARY
KEY
(
idx
),
KEY
exptidx
(
exptidx
),
...
...
@@ -321,6 +359,7 @@ CREATE TABLE experiment_stats (
elabinelab
tinyint
(
1
)
NOT
NULL
default
'0'
,
elabinelab_exptidx
int
(
10
)
unsigned
default
NULL
,
security_level
tinyint
(
1
)
NOT
NULL
default
'0'
,
archive_idx
int
(
10
)
unsigned
default
NULL
,
PRIMARY
KEY
(
eid
,
pid
,
exptidx
),
KEY
exptidx
(
exptidx
),
KEY
rsrcidx
(
rsrcidx
)
...
...
sql/database-migrate.txt
View file @
33a8241e
...
...
@@ -2919,3 +2919,38 @@ last_net_act,last_cpu_act,last_ext_act);
alter table nodes add reserved_pid varchar(12) default NULL \
after destination_orientation;
4.22: Experimental archiving code. Sure to change!
CREATE TABLE archive_tags (
idx int(10) unsigned NOT NULL auto_increment,
tag varchar(64) NOT NULL default '',
archive_idx int(10) unsigned NOT NULL default '0',
date_created int(10) unsigned NOT NULL default '0',
PRIMARY KEY (idx),
UNIQUE KEY (tag,archive_idx)
) TYPE=MyISAM;
CREATE TABLE archive_views (
view varchar(64) NOT NULL default '',
archive_idx int(10) unsigned NOT NULL default '0',
current_tag varchar(64) NOT NULL default '',
previous_tag varchar(64) default NULL,
date_created int(10) unsigned NOT NULL default '0',
PRIMARY KEY (view,archive_idx)
) TYPE=MyISAM;
CREATE TABLE archives (
idx int(10) unsigned NOT NULL auto_increment,
directory tinytext,
date_created int(10) unsigned NOT NULL default '0',
PRIMARY KEY (idx)
) TYPE=MyISAM;
alter table experiment_stats add
archive_idx int(10) unsigned default NULL
after security_level;
alter table experiment_resources add
archive_tag varchar(32) NOT NULL default ''
after delay_capacity;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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