Bug 5087: DBRev 20.06.00.011

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2020-07-23 10:32:09 +02:00
parent c2d45ac0f4
commit 12e83a64ec
3 changed files with 21 additions and 20 deletions

View File

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "20.06.00.010";
$VERSION = "20.06.00.011";
sub version {
return $VERSION;

View File

@ -1,19 +0,0 @@
$DBversion = 'XXX';
if( CheckVersion( $DBversion ) ) {
unless( column_exists( 'export_format', 'staff_only' ) ) {
$dbh->do(q|
ALTER TABLE export_format
ADD staff_only TINYINT(1) NOT NULL DEFAULT 0 AFTER used_for,
ADD KEY `staff_only_idx` (`staff_only`);
|);
}
unless ( index_exists( 'export_format', 'used_for_idx' ) ) {
$dbh->do(q|
ALTER TABLE export_format
ADD KEY `used_for_idx` (`used_for` (191));
|);
}
NewVersion( $DBversion, 5087, "Add export_format.staff_only" );
}

View File

@ -22356,6 +22356,26 @@ if( CheckVersion( $DBversion ) ) {
NewVersion( $DBversion, 20815, "Add NoRefundOnLostReturnedItemsAge system preference" );
}
$DBversion = '20.06.00.011';
if( CheckVersion( $DBversion ) ) {
unless( column_exists( 'export_format', 'staff_only' ) ) {
$dbh->do(q|
ALTER TABLE export_format
ADD staff_only TINYINT(1) NOT NULL DEFAULT 0 AFTER used_for,
ADD KEY `staff_only_idx` (`staff_only`);
|);
}
unless ( index_exists( 'export_format', 'used_for_idx' ) ) {
$dbh->do(q|
ALTER TABLE export_format
ADD KEY `used_for_idx` (`used_for` (191));
|);
}
NewVersion( $DBversion, 5087, "Add export_format.staff_only" );
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';