Commit 9141c149 authored by Leigh B Stoller's avatar Leigh B Stoller

Add disabled flag to profile (versions). Code to follow.

parent ab578286
......@@ -1311,6 +1311,7 @@ REPLACE INTO table_regex VALUES ('apt_profiles','public','int','redirect','defau
REPLACE INTO table_regex VALUES ('apt_profiles','listed','int','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('apt_profiles','shared','int','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('apt_profiles','topdog','int','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('apt_profiles','disabled','int','redirect','default:boolean',0,0,NULL);
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);
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("apt_profiles", "disabled")) {
DBQueryFatal("alter table apt_profiles add ".
" `disabled` tinyint(1) NOT NULL default '0' ".
" after topdog");
}
if (!DBSlotExists("apt_profile_versions", "disabled")) {
DBQueryFatal("alter table apt_profile_versions add ".
" `disabled` tinyint(1) NOT NULL default '0' ".
" after deleted");
}
DBQueryFatal("REPLACE INTO table_regex VALUES ".
" ('apt_profiles','disabled','int','redirect',".
" 'default:boolean',0,0,NULL)");
return 0;
}
# 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