Bug 8753: [QA Follow-up] Primary key and collation
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 22 Jan 2016 09:18:29 +0000 (10:18 +0100)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 27 Jan 2016 06:40:56 +0000 (06:40 +0000)
This patch includes:
[1] Adds primary key borrowernumber to new table.
[2] Fixes collation.
[3] Removes manual PK in DBIx schema file.
[4] Fixes typo CompletePasswordRevovery.
[5] Removes use strict from opac-password-recovery; Modern::Perl is used.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
C4/Passwordrecovery.pm
Koha/Schema/Result/BorrowerPasswordRecovery.pm
installer/data/mysql/atomicupdate/bug_8753-Add_forgot_password_link_to_OPAC.sql
installer/data/mysql/kohastructure.sql
opac/opac-password-recovery.pl

index d8420db..ea01e15 100644 (file)
@@ -164,7 +164,7 @@ sub SendPasswordRecoveryEmail {
 
 =head2 CompletePasswordRecovery
 
-    $bool = CompletePasswordRevovery($uuid);
+    $bool = CompletePasswordRecovery($uuid);
 
     Deletes a password recovery entry.
 
index 85d6343..c7f567d 100644 (file)
@@ -57,12 +57,23 @@ __PACKAGE__->add_columns(
   },
 );
 
+=head1 PRIMARY KEY
 
-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-11-03 12:08:20
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ORAWxUHIkefSfPSqrcfeXA
+=over 4
 
+=item * L</borrowernumber>
+
+=back
+
+=cut
 
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
 __PACKAGE__->set_primary_key("borrowernumber");
 
+
+# Created by DBIx::Class::Schema::Loader v0.07025 @ 2016-01-22 10:16:52
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:c4ehAGqOD6YHpGg85BX8YQ
+
+
+# You can replace this text with custom code or comments, and it will be preserved on regeneration
+
 1;
index 9719bee..f47e562 100644 (file)
@@ -5,8 +5,9 @@ CREATE TABLE IF NOT EXISTS borrower_password_recovery (
   borrowernumber int(11) NOT NULL,
   uuid varchar(128) NOT NULL,
   valid_until timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (borrowernumber),
   KEY borrowernumber (borrowernumber)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 
 INSERT IGNORE INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type)
 VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email');
index 3975f28..b98b017 100644 (file)
@@ -365,8 +365,9 @@ CREATE TABLE IF NOT EXISTS `borrower_password_recovery` ( -- holds information a
   `borrowernumber` int(11) NOT NULL, -- the user asking a password recovery
   `uuid` varchar(128) NOT NULL, -- a unique string to identify a password recovery attempt
   `valid_until` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- a time limit on the password recovery attempt
+  PRIMARY KEY (`borrowernumber`),
   KEY borrowernumber (borrowernumber)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 
 --
 -- Table structure for table borrower_sync
index 6cfc414..7e3eae2 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-use strict;
 use Modern::Perl;
 use CGI;