From f41c51d1ecc36bc6e5dffc70ad7a5ed50d4ec7ea Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 9 Aug 2019 22:43:04 +0200 Subject: [ticket/11327] Add reset token columns & config setting PHPBB3-11327 --- .../db/migration/data/v330/reset_password.php | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v330/reset_password.php (limited to 'phpBB/phpbb/db/migration/data/v330/reset_password.php') diff --git a/phpBB/phpbb/db/migration/data/v330/reset_password.php b/phpBB/phpbb/db/migration/data/v330/reset_password.php new file mode 100644 index 0000000000..87131c6e93 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v330/reset_password.php @@ -0,0 +1,48 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\db\migration\data\v330; + +class reset_password extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v330\dev', + ); + } + + public function update_schema() + { + return [ + 'add_columns' => [ + $this->table_prefix . 'users' => [ + 'reset_token' => ['VCHAR:64', '', 'after' => 'user_actkey'], + 'reset_token_expiration' => ['TIMESTAMP', 0, 'after' => 'reset_token'], + ], + ], + ]; + } + + public function revert_schema() + { + return [ + 'drop_columns' => [ + $this->table_prefix . 'users' => [ + 'reset_token', + 'reset_token_expiration', + ], + ], + ]; + } +} -- cgit v1.2.1 From 7a3e351178fde9d8b785867868fb40cbae4c8ab2 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 22 Aug 2019 14:05:58 +0200 Subject: [ticket/11327] Clean up code style a bit PHPBB3-11327 --- phpBB/phpbb/db/migration/data/v330/reset_password.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/phpbb/db/migration/data/v330/reset_password.php') diff --git a/phpBB/phpbb/db/migration/data/v330/reset_password.php b/phpBB/phpbb/db/migration/data/v330/reset_password.php index 87131c6e93..953d478ccc 100644 --- a/phpBB/phpbb/db/migration/data/v330/reset_password.php +++ b/phpBB/phpbb/db/migration/data/v330/reset_password.php @@ -17,9 +17,9 @@ class reset_password extends \phpbb\db\migration\migration { static public function depends_on() { - return array( + return [ '\phpbb\db\migration\data\v330\dev', - ); + ]; } public function update_schema() -- cgit v1.2.1