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
8d3f6875
Commit
8d3f6875
authored
Dec 19, 2016
by
Leigh B Stoller
Browse files
Database changes for repo-based profiles. Pushing these up now so that
elabinelab creation will work.
parent
87214f75
Changes
4
Hide whitespace changes
Inline
Side-by-side
apt/APT_Instance.pm.in
View file @
8d3f6875
...
...
@@ -615,7 +615,7 @@ sub RecordHistory($$)
" created,now(),$expired, "
.
" extension_count,extension_days, "
.
" physnode_count,virtnode_count, "
.
" servername,rspec,params,manifest "
.
" servername,rspec,
script,paramdefs,
params,manifest "
.
" from apt_instances where uuid='$uuid'"
)
or
return
-
1
;
...
...
sql/database-create.sql
View file @
8d3f6875
...
...
@@ -262,6 +262,8 @@ CREATE TABLE `apt_instance_history` (
`virtnode_count`
smallint
(
5
)
unsigned
NOT
NULL
default
'0'
,
`servername`
tinytext
,
`rspec`
mediumtext
,
`script`
mediumtext
,
`paramdefs`
mediumtext
,
`params`
mediumtext
,
`manifest`
mediumtext
,
PRIMARY
KEY
(
`uuid`
),
...
...
@@ -316,6 +318,8 @@ CREATE TABLE `apt_instances` (
`cert`
mediumtext
,
`privkey`
mediumtext
,
`rspec`
mediumtext
,
`script`
mediumtext
,
`paramdefs`
mediumtext
,
`params`
mediumtext
,
`manifest`
mediumtext
,
`openstack_utilization`
mediumtext
,
...
...
@@ -376,6 +380,9 @@ CREATE TABLE `apt_profile_versions` (
`parent_profileid`
int
(
8
)
unsigned
default
NULL
,
`parent_version`
int
(
8
)
unsigned
default
NULL
,
`status`
varchar
(
32
)
default
NULL
,
`repourl`
tinytext
,
`reponame`
varchar
(
40
)
default
NULL
,
`repohash`
varchar
(
64
)
default
NULL
,
`rspec`
mediumtext
,
`script`
mediumtext
,
`paramdefs`
mediumtext
,
...
...
sql/database-fill.sql
View file @
8d3f6875
...
...
@@ -1335,6 +1335,8 @@ REPLACE INTO table_regex VALUES ('apt_profiles','disabled','int','redirect','def
REPLACE
INTO
table_regex
VALUES
(
'apt_profiles'
,
'description'
,
'text'
,
'redirect'
,
'default:html_fulltext'
,
0
,
512
,
NULL
);
REPLACE
INTO
table_regex
VALUES
(
'apt_profiles'
,
'rspec'
,
'text'
,
'redirect'
,
'default:html_fulltext'
,
0
,
262143
,
NULL
);
REPLACE
INTO
table_regex
VALUES
(
'apt_profiles'
,
'script'
,
'text'
,
'redirect'
,
'default:html_fulltext'
,
0
,
65535
,
NULL
);
REPLACE
INTO
table_regex
VALUES
(
'apt_profiles'
,
'repourl'
,
'text'
,
'redirect'
,
'default:tinytext'
,
0
,
0
,
NULL
);
REPLACE
INTO
table_regex
VALUES
(
'apt_profiles'
,
'repohash'
,
'text'
,
'regex'
,
'^[
\\
w]+$'
,
0
,
64
,
NULL
);
--
-- Dumping data for table `testsuite_preentables`
...
...
sql/updates/4/551
0 → 100644
View file @
8d3f6875
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("apt_profile_versions", "repourl")) {
DBQueryFatal("alter table apt_profile_versions " .
" add `repourl` tinytext after status, ".
" add `reponame` varchar(40) default NULL after repourl, ".
" add `repohash` varchar(64) default NULL after reponame");
}
DBQueryFatal("replace INTO table_regex VALUES ".
" ('apt_profiles','repourl','text','redirect', ".
" 'default:tinytext',0,0,NULL)");
DBQueryFatal("replace INTO table_regex VALUES ".
" ('apt_profiles','repohash','text','regex', ".
" '^[\\\\w]+\$',0,0,NULL)");
if (!DBSlotExists("apt_instances", "script")) {
DBQueryFatal("alter table apt_instances " .
" add `script` mediumtext after rspec, ".
" add `paramdefs` mediumtext after script");
}
if (!DBSlotExists("apt_instance_history", "script")) {
DBQueryFatal("alter table apt_instance_history " .
" add `script` mediumtext after rspec, ".
" add `paramdefs` mediumtext after script");
}
return 0;
}
# Local Variables:
# mode:perl
# End:
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