Bug 7793: DBRev 3.21.00.010
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 22 Jun 2015 19:40:57 +0000 (16:40 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 22 Jun 2015 19:51:03 +0000 (16:51 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha.pm
Koha/Schema/Result/MessageQueue.pm
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index b0bd54d..bd2ce73 100644 (file)
--- 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;
index 6612db5..346b463 100644 (file)
@@ -131,6 +131,18 @@ __PACKAGE__->add_columns(
   { data_type => "text", is_nullable => 1 },
 );
 
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</message_id>
+
+=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
index c6f9404..5171e8e 100755 (executable)
@@ -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);
 }