Browse Source

Bug 6758: DBRev 17.05.00.008

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17.11.x
Jonathan Druart 5 years ago
parent
commit
4270d24338
  1. 2
      Koha.pm
  2. 24
      installer/data/mysql/atomicupdate/bug_6758.perl
  3. 24
      installer/data/mysql/updatedatabase.pl

2
Koha.pm

@ -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.06.00.007";
$VERSION = "17.06.00.008";
sub version {
return $VERSION;

24
installer/data/mysql/atomicupdate/bug_6758.perl

@ -1,24 +0,0 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
unless ( column_exists( 'borrowers', 'date_renewed' ) ) {
$dbh->do(q{
ALTER TABLE borrowers ADD COLUMN date_renewed DATE NULL DEFAULT NULL AFTER dateexpiry;
});
}
unless ( column_exists( 'deletedborrowers', 'date_renewed' ) ) {
$dbh->do(q{
ALTER TABLE deletedborrowers ADD COLUMN date_renewed DATE NULL DEFAULT NULL AFTER dateexpiry;
});
}
unless ( column_exists( 'borrower_modifications', 'date_renewed' ) ) {
$dbh->do(q{
ALTER TABLE borrower_modifications ADD COLUMN date_renewed DATE NULL DEFAULT NULL AFTER dateexpiry;
});
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 6758 - Capture membership renewal date for reporting purposes)\n";
}

24
installer/data/mysql/updatedatabase.pl

@ -14637,6 +14637,30 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 10132 - MARCOrgCode on branch level (branches.marcorgcode))\n";
}
$DBversion = '17.06.00.008';
if( CheckVersion( $DBversion ) ) {
unless ( column_exists( 'borrowers', 'date_renewed' ) ) {
$dbh->do(q{
ALTER TABLE borrowers ADD COLUMN date_renewed DATE NULL DEFAULT NULL AFTER dateexpiry;
});
}
unless ( column_exists( 'deletedborrowers', 'date_renewed' ) ) {
$dbh->do(q{
ALTER TABLE deletedborrowers ADD COLUMN date_renewed DATE NULL DEFAULT NULL AFTER dateexpiry;
});
}
unless ( column_exists( 'borrower_modifications', 'date_renewed' ) ) {
$dbh->do(q{
ALTER TABLE borrower_modifications ADD COLUMN date_renewed DATE NULL DEFAULT NULL AFTER dateexpiry;
});
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 6758 - Capture membership renewal date for reporting purposes (borrowers.date_renewed))\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.

Loading…
Cancel
Save