Commit d23b535f authored by Leigh Stoller's avatar Leigh Stoller

Add updater fields to apt_profile_versions to make it easier to

distinguish original creator from updater.
parent 28a11ed0
......@@ -331,6 +331,8 @@ CREATE TABLE `apt_profile_versions` (
`gid_idx` mediumint(8) unsigned NOT NULL default '0',
`creator` varchar(8) NOT NULL default '',
`creator_idx` mediumint(8) unsigned NOT NULL default '0',
`updater` varchar(8) NOT NULL default '',
`updater_idx` mediumint(8) unsigned NOT NULL default '0',
`created` datetime default NULL,
`published` datetime default NULL,
`deleted` datetime default NULL,
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("apt_profile_versions", "updater")) {
DBQueryFatal("alter table apt_profile_versions " .
" add `updater` varchar(8) NOT NULL default '' ".
" after creator_idx, ".
" add `updater_idx` mediumint(8) unsigned NOT NULL default '0'".
" after updater");
DBQueryFatal("update apt_profile_versions set ".
" updater=creator,updater_idx=creator_idx");
}
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