Commit e4636e5a authored by Leigh Stoller's avatar Leigh Stoller

Add new permission bits to apt_datasets, and owner_urn to project_leases.

parent 0ce1adc1
......@@ -76,6 +76,8 @@ CREATE TABLE `apt_datasets` (
`type` enum('stdataset','ltdataset','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',
`write_access` enum('creator','project') NOT NULL default 'creator',
`public` tinyint(1) NOT NULL default '0',
`shared` tinyint(1) NOT NULL default '0',
`locked` datetime default NULL,
......@@ -3760,6 +3762,7 @@ CREATE TABLE `project_leases` (
`lease_id` varchar(32) NOT NULL default '',
`uuid` varchar(40) NOT NULL default '',
`owner_uid` varchar(8) NOT NULL default '',
`owner_urn` varchar(128) default NULL,
`pid` varchar(48) NOT NULL default '',
`gid` varchar(48) NOT NULL default '',
`type` enum('stdataset','ltdataset','unknown') NOT NULL default 'unknown',
......
#
# APT dataset stuff.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("project_leases", "owner_urn")) {
DBQueryFatal("alter table project_leases add ".
" `owner_urn` varchar(128) default NULL after owner_uid");
}
if (!DBSlotExists("apt_datasets", "read_access")) {
DBQueryFatal("alter table apt_datasets add ".
" `read_access` enum('project','global') ".
" NOT NULL default 'project' after size");
}
if (!DBSlotExists("apt_datasets", "write_access")) {
DBQueryFatal("alter table apt_datasets add ".
" `write_access` enum('creator','project') ".
" NOT NULL default 'creator' after read_access");
}
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