aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migration/data
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-11-21 14:54:32 +0100
committerMarc Alexander <admin@m-a-styles.de>2019-11-21 14:54:32 +0100
commit2a023c9e15ffd03f07770adf6e8372d3b4e23057 (patch)
tree242e90b696746171f94d31bbf7c24afcf0550a92 /phpBB/phpbb/db/migration/data
parent289524938ca527816a902f1a2acb9cf385c2598d (diff)
parentc628cd7e151a09e25ca0d980620b5fa3fe36a763 (diff)
downloadforums-2a023c9e15ffd03f07770adf6e8372d3b4e23057.tar
forums-2a023c9e15ffd03f07770adf6e8372d3b4e23057.tar.gz
forums-2a023c9e15ffd03f07770adf6e8372d3b4e23057.tar.bz2
forums-2a023c9e15ffd03f07770adf6e8372d3b4e23057.tar.xz
forums-2a023c9e15ffd03f07770adf6e8372d3b4e23057.zip
Merge pull request #5727 from marc1706/ticket/16167
[ticket/16167] Use user_email column for checking duplicates
Diffstat (limited to 'phpBB/phpbb/db/migration/data')
-rw-r--r--phpBB/phpbb/db/migration/data/v330/remove_email_hash.php57
1 files changed, 57 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migration/data/v330/remove_email_hash.php b/phpBB/phpbb/db/migration/data/v330/remove_email_hash.php
new file mode 100644
index 0000000000..dc43678625
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v330/remove_email_hash.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @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 remove_email_hash extends \phpbb\db\migration\migration
+{
+ public function update_schema()
+ {
+ return [
+ 'add_index' => [
+ $this->table_prefix . 'users' => [
+ 'user_email' => ['user_email'],
+ ],
+ ],
+ 'drop_keys' => [
+ $this->table_prefix . 'users' => [
+ 'user_email_hash',
+ ],
+ ],
+ 'drop_columns' => [
+ $this->table_prefix . 'users' => ['user_email_hash'],
+ ],
+ ];
+ }
+
+ public function revert_schema()
+ {
+ return [
+ 'add_columns' => [
+ $this->table_prefix . 'users' => [
+ 'user_email_hash' => ['BINT', 0],
+ ],
+ ],
+ 'add_index' => [
+ $this->table_prefix . 'users' => [
+ 'user_email_hash',
+ ],
+ ],
+ 'drop_keys' => [
+ $this->table_prefix . 'users' => [
+ 'user_email' => ['user_email'],
+ ],
+ ],
+ ];
+ }
+}