From 28f2063f128cff1e696bbd0763aa6f1b592167bb Mon Sep 17 00:00:00 2001 From: Blou Date: Fri, 25 Oct 2013 14:20:32 -0400 Subject: [PATCH] Bug 8753 - Add forgot password link to OPAC Added the missing updatedatabase.pl script to add the table borrower_password_recovery and the preference OpacResetPassword. Modified kohastructure.sql to use InnoDB --- installer/data/mysql/kohastructure.sql | 12 ++++++------ installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 2d07097..acebf60 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3280,12 +3280,12 @@ ALTER TABLE `patron_list_patrons` -- this stores the unique ID sent by email to the patron, for future validation -- -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, - KEY `borrowernumber` (`borrowernumber`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +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, + KEY borrowernumber (borrowernumber) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index b031ed8..a334670 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7330,6 +7330,21 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.13.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OpacResetPassword','1','','Shows the ''Forgot your password?'' link in the OPAC','YesNo')"); + $dbh->do(q{ + 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, + KEY borrowernumber (borrowernumber) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + }); + print "Upgrade to $DBversion done (Bug 8753: Add forgot password link to OPAC)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) -- 1.7.10.4