Commit 58f6e846 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Database changes for image backed datasets.

parent 71b02a38
...@@ -74,7 +74,7 @@ CREATE TABLE `apt_datasets` ( ...@@ -74,7 +74,7 @@ CREATE TABLE `apt_datasets` (
`expires` datetime default NULL, `expires` datetime default NULL,
`last_used` datetime default NULL, `last_used` datetime default NULL,
`state` enum('new','valid','unapproved','grace','locked','expired','busy') NOT NULL default 'new', `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', `fstype` varchar(40) NOT NULL default 'none',
`size` int(10) unsigned NOT NULL default '0', `size` int(10) unsigned NOT NULL default '0',
`read_access` enum('project','global') NOT NULL default 'project', `read_access` enum('project','global') NOT NULL default 'project',
...@@ -2048,6 +2048,7 @@ CREATE TABLE `image_versions` ( ...@@ -2048,6 +2048,7 @@ CREATE TABLE `image_versions` (
`noexport` tinyint(1) NOT NULL default '0', `noexport` tinyint(1) NOT NULL default '0',
`ready` tinyint(1) NOT NULL default '0', `ready` tinyint(1) NOT NULL default '0',
`isdelta` 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', `released` tinyint(1) NOT NULL default '0',
`nodetypes` text default NULL, `nodetypes` text default NULL,
`notes` mediumtext, `notes` mediumtext,
......
...@@ -1202,6 +1202,7 @@ REPLACE INTO table_regex VALUES ('elabinelab_attributes','ordering','int','redir ...@@ -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_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','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','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','path','text','redirect','default:text',0,0,NULL);
REPLACE INTO table_regex VALUES ('experiment_blobs','action','text','redirect','default:text',0,0,NULL); REPLACE INTO table_regex VALUES ('experiment_blobs','action','text','redirect','default:text',0,0,NULL);
......
#
# 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:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment