From a18819f408b1d9051ae181b5f6098853ec41fa32 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 22 Jun 2015 16:40:57 -0300 Subject: [PATCH] Bug 7793: DBRev 3.21.00.010 Signed-off-by: Tomas Cohen Arazi --- Koha.pm | 2 +- Koha/Schema/Result/MessageQueue.pm | 16 ++++++++++++++-- installer/data/mysql/updatedatabase.pl | 16 ++++++++++------ 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/Koha.pm b/Koha.pm index b0bd54d977..bd2ce73141 100644 --- a/Koha.pm +++ b/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 = "3.21.00.009"; +$VERSION = "3.21.00.010"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/MessageQueue.pm b/Koha/Schema/Result/MessageQueue.pm index 6612db54c8..346b463b89 100644 --- a/Koha/Schema/Result/MessageQueue.pm +++ b/Koha/Schema/Result/MessageQueue.pm @@ -131,6 +131,18 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 1 }, ); +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("message_id"); + =head1 RELATIONS =head2 borrowernumber @@ -169,8 +181,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YWxM2O2W/h34qqIOIpzOtw +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-06-22 16:37:20 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nQcmtLCbGEeLFLFP4jwy2g # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index c6f9404197..5171e8e313 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10606,13 +10606,17 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } -$DBversion = "3.21.00.XXX"; +$DBversion = "3.21.00.010"; if ( CheckVersion($DBversion) ) { - - $dbh->do("ALTER TABLE message_queue DROP message_id" ); - $dbh->do("ALTER TABLE message_queue ADD message_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST"); - - print "Upgrade to $DBversion done (Bug 7793 - redefine the field message_id as PRIMARY KEY of message_queue)\n"; + $dbh->do(q| + ALTER TABLE message_queue + DROP message_id + |); + $dbh->do(q| + ALTER TABLE message_queue + ADD message_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST + |); + print "Upgrade to $DBversion done (Bug 7793: redefine the field message_id as PRIMARY KEY of message_queue)\n"; SetVersion ($DBversion); } -- 2.39.5