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
58f6e846
Commit
58f6e846
authored
Mar 02, 2015
by
Leigh B Stoller
Browse files
Database changes for image backed datasets.
parent
71b02a38
Changes
3
Hide whitespace changes
Inline
Side-by-side
sql/database-create.sql
View file @
58f6e846
...
...
@@ -74,7 +74,7 @@ CREATE TABLE `apt_datasets` (
`expires`
datetime
default
NULL
,
`last_used`
datetime
default
NULL
,
`state`
enum
(
'new'
,
'valid'
,
'unapproved'
,
'grace'
,
'locked'
,
'expired'
,
'busy'
)
NOT
NULL
default
'new'
,
`type`
enum
(
'stdataset'
,
'ltdataset'
,
'unknown'
)
NOT
NULL
default
'unknown'
,
`type`
enum
(
'stdataset'
,
'ltdataset'
,
'
imdataset'
,
'
unknown'
)
NOT
NULL
default
'unknown'
,
`fstype`
varchar
(
40
)
NOT
NULL
default
'none'
,
`size`
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
`read_access`
enum
(
'project'
,
'global'
)
NOT
NULL
default
'project'
,
...
...
@@ -2048,6 +2048,7 @@ CREATE TABLE `image_versions` (
`noexport`
tinyint
(
1
)
NOT
NULL
default
'0'
,
`ready`
tinyint
(
1
)
NOT
NULL
default
'0'
,
`isdelta`
tinyint
(
1
)
NOT
NULL
default
'0'
,
`isdataset`
tinyint
(
1
)
NOT
NULL
default
'0'
,
`released`
tinyint
(
1
)
NOT
NULL
default
'0'
,
`nodetypes`
text
default
NULL
,
`notes`
mediumtext
,
...
...
sql/database-fill.sql
View file @
58f6e846
...
...
@@ -1202,6 +1202,7 @@ REPLACE INTO table_regex VALUES ('elabinelab_attributes','ordering','int','redir
REPLACE
INTO
table_regex
VALUES
(
'images'
,
'auth_key'
,
'text'
,
'regex'
,
'^[0-9a-fA-F,]+$'
,
0
,
0
,
NULL
);
REPLACE
INTO
table_regex
VALUES
(
'images'
,
'auth_uuid'
,
'text'
,
'regex'
,
'^[0-9a-fA-F]+$'
,
0
,
0
,
NULL
);
REPLACE
INTO
table_regex
VALUES
(
'images'
,
'decryption_key'
,
'text'
,
'regex'
,
'^[0-9a-fA-F]+$'
,
0
,
0
,
NULL
);
REPLACE
INTO
table_regex
VALUES
(
'images'
,
'isdataset'
,
'int'
,
'redirect'
,
'default:boolean'
,
0
,
0
,
NULL
);
REPLACE
INTO
table_regex
VALUES
(
'experiment_blobs'
,
'path'
,
'text'
,
'redirect'
,
'default:text'
,
0
,
0
,
NULL
);
REPLACE
INTO
table_regex
VALUES
(
'experiment_blobs'
,
'action'
,
'text'
,
'redirect'
,
'default:text'
,
0
,
0
,
NULL
);
...
...
sql/updates/4/432
0 → 100644
View file @
58f6e846
#
# Dataset stuff
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("image_versions", "isdataset")) {
DBQueryFatal("alter table image_versions add ".
" `isdataset` tinyint(1) NOT NULL default '0' ".
" after isdelta");
}
DBQueryFatal("alter table apt_datasets change `type` `type` ".
" enum('stdataset','ltdataset','imdataset','unknown') ".
" NOT NULL default 'unknown'");
}
DBQueryFatal("REPLACE INTO table_regex VALUES ".
" ('images','isdataset','int','redirect', ".
" 'default:boolean',0,0,NULL)");
return 0;
}
1;
# 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