Bug 17672: DBRev 17.12.00.017

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2018-02-18 16:47:12 -03:00
parent 5977dedb94
commit 00bfa63dc7
3 changed files with 17 additions and 11 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 = "17.12.00.016";
$VERSION = "17.12.00.017";
sub version {
return $VERSION;

View File

@ -1,9 +0,0 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do( "ALTER TABLE items ADD COLUMN damaged_on DATETIME NULL AFTER damaged");
$dbh->do( "ALTER TABLE deleteditems ADD COLUMN damaged_on DATETIME NULL AFTER damaged");
# Always end with this (adjust the bug info)
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 17672: Add damaged_on to items and deleteditems tables)\n";
}

View File

@ -15543,10 +15543,25 @@ if( CheckVersion( $DBversion ) ) {
}
$dbh->do(q|SET foreign_key_checks = 1|);
print "Upgrade to $DBversion done (Bug 18336: Convert DB tables to utf8mb4 💩)\n";
print "Upgrade to $DBversion done (Bug 18336 - Convert DB tables to utf8mb4 💩)\n";
SetVersion($DBversion);
}
$DBversion = '17.12.00.017';
if( CheckVersion( $DBversion ) ) {
if( !column_exists( 'items', 'damaged_on' ) ) {
$dbh->do( "ALTER TABLE items ADD COLUMN damaged_on DATETIME NULL AFTER damaged");
}
if( !column_exists( 'deleteditems', 'damaged_on' ) ) {
$dbh->do( "ALTER TABLE deleteditems ADD COLUMN damaged_on DATETIME NULL AFTER damaged");
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 17672 - Add damaged_on to items and deleteditems tables)\n";
}
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.