Koha/installer/data/mysql/db_revs/220600085.pl
Tomas Cohen Arazi 9d68cae0d2
Bug 32154: DBRev 22.06.00.085
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 08:56:05 -03:00

18 lines
525 B
Perl

use Modern::Perl;
return {
bug_number => "32030",
description => "Add primary key to erm_user_roles",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
unless ( column_exists('erm_user_roles', 'user_role_id') ) {
$dbh->do(q{
ALTER TABLE `erm_user_roles`
ADD COLUMN `user_role_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key' FIRST,
ADD PRIMARY KEY(`user_role_id`);
});
}
}
};