Browse Source

Bug 20175: DBRev 17.12.00.013

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
18.05.x
Jonathan Druart 4 years ago
parent
commit
5373bbaf5d
  1. 2
      Koha.pm
  2. 10
      Koha/Schema/Result/ClubEnrollment.pm
  3. 1
      installer/data/mysql/atomicupdate/bug_xxxxx_club_enrollments.date_created.sql
  4. 11
      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.12.00.012";
$VERSION = "17.12.00.013";
sub version {
return $VERSION;

10
Koha/Schema/Result/ClubEnrollment.pm

@ -58,8 +58,7 @@ __PACKAGE__->table("club_enrollments");
data_type: 'timestamp'
datetime_undef_if_invalid: 1
default_value: '0000-00-00 00:00:00'
is_nullable: 0
is_nullable: 1
=head2 date_updated
@ -100,8 +99,7 @@ __PACKAGE__->add_columns(
{
data_type => "timestamp",
datetime_undef_if_invalid => 1,
default_value => "0000-00-00 00:00:00",
is_nullable => 0,
is_nullable => 1,
},
"date_updated",
{
@ -193,8 +191,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-04-26 16:17:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:a1uTIm+Y9A0jEBiumQ60jg
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-12 17:59:47
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ih/HQM4KIRDZ0ESXVR9FwA
# You can replace this text with custom content, and it will be preserved on regeneration

1
installer/data/mysql/atomicupdate/bug_xxxxx_club_enrollments.date_created.sql

@ -1 +0,0 @@
ALTER TABLE club_enrollments MODIFY date_created timestamp NOT NULL;

11
installer/data/mysql/updatedatabase.pl

@ -15336,6 +15336,17 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 15752 - Add system preference AutoSwitchPatron)\n";
}
$DBversion = '17.12.00.013';
if( CheckVersion( $DBversion ) ) {
$dbh->do(q|
ALTER TABLE club_enrollments MODIFY date_created timestamp NULL DEFAULT NULL;
|);
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 20175 - Set DEFAULT NULL value for club_enrollments.date_created)\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