Koha/installer/data/mysql/db_revs/211200040.pl
Fridolin Somers a8a32f1124 Bug 30565: DBRev 21.12.00.040
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-02 11:22:57 -10:00

19 lines
620 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => 30565,
description => "Update table stockrotationrotas",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
if( !unique_key_exists('stockrotationrotas', 'stockrotationrotas_title') ) {
$dbh->do( q|
ALTER TABLE stockrotationrotas ADD CONSTRAINT UNIQUE KEY stockrotationrotas_title (title)
|);
}
# Make sure that description is NOT NULL
$dbh->do( q|
ALTER TABLE stockrotationrotas MODIFY COLUMN description text NOT NULL COMMENT 'Description for this rota'
|);
},
};