Commit 2da17106 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add nodelete flag to profile versions table, to lock down a profile

from being deleted. If a profile cannot be deleted, then the images
it references cannot be deleted either.
parent ebafe7ec
......@@ -408,6 +408,7 @@ CREATE TABLE `apt_profile_versions` (
`published` datetime default NULL,
`deleted` datetime default NULL,
`disabled` tinyint(1) NOT NULL default '0',
`nodelete` tinyint(1) NOT NULL default '0',
`uuid` varchar(40) NOT NULL,
`parent_profileid` int(8) unsigned default NULL,
`parent_version` int(8) unsigned default NULL,
use strict;
use libdb;
sub DoUpdate($$$)
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("apt_profile_versions", "nodelete")) {
DBQueryFatal("alter table apt_profile_versions " .
" add `nodelete` tinyint(1) NOT NULL default '0' ".
" after disabled");
return 0;
# Local Variables:
# mode:perl
# End:
Supports Markdown
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