From 3a549aba2dd92b0c5279534324a15c4808660555 Mon Sep 17 00:00:00 2001 From: Olle Haerstedt Date: Fri, 1 Dec 2017 15:06:00 +0100 Subject: [PATCH] Dev: Decrease length of email field (too long key) --- installer/create-database.php | 2 +- tests/data/sql/create-mysql.258.sql | 4 ++-- tests/data/sql/create-mysql.315.sql | 4 ++-- tests/helpers/UpdateDbHelperTest.php | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/installer/create-database.php b/installer/create-database.php index acb27825cbe..d5c48fe7bac 100644 --- a/installer/create-database.php +++ b/installer/create-database.php @@ -379,7 +379,7 @@ function createDatabase($oDB){ 'srid' => "integer NOT NULL default '0'", 'identifier' => "text NOT NULL", 'access_code' => "text NOT NULL", - 'email' => "string(254)", + 'email' => "string(192)", 'ip' => "text NOT NULL", 'saved_thisstep' => "text NOT NULL", 'status' => "string(1) NOT NULL default ''", diff --git a/tests/data/sql/create-mysql.258.sql b/tests/data/sql/create-mysql.258.sql index 0c128aa832b..3e6e488f78a 100644 --- a/tests/data/sql/create-mysql.258.sql +++ b/tests/data/sql/create-mysql.258.sql @@ -342,7 +342,7 @@ CREATE TABLE `prefix_saved_control` ( `srid` int(11) NOT NULL default '0', `identifier` text NOT NULL, `access_code` text NOT NULL, - `email` varchar(254), + `email` varchar(192), `ip` text NOT NULL, `saved_thisstep` text NOT NULL, `status` varchar(1) NOT NULL default '', @@ -541,7 +541,7 @@ CREATE TABLE `prefix_users` ( `full_name` varchar(50) NOT NULL, `parent_id` int(11) NOT NULL, `lang` varchar(20), - `email` varchar(254), + `email` varchar(192), `htmleditormode` varchar(7) default 'default', `templateeditormode` varchar(7) NOT NULL default 'default', `questionselectormode` varchar(7) NOT NULL default 'default', diff --git a/tests/data/sql/create-mysql.315.sql b/tests/data/sql/create-mysql.315.sql index c7fbf53ec89..bcd215c7d18 100644 --- a/tests/data/sql/create-mysql.315.sql +++ b/tests/data/sql/create-mysql.315.sql @@ -343,7 +343,7 @@ CREATE TABLE `prefix_saved_control` ( `srid` int(11) NOT NULL default '0', `identifier` text NOT NULL, `access_code` text NOT NULL, - `email` varchar(254), + `email` varchar(192), `ip` text NOT NULL, `saved_thisstep` text NOT NULL, `status` varchar(1) NOT NULL default '', @@ -530,7 +530,7 @@ CREATE TABLE `prefix_users` ( `full_name` varchar(50) NOT NULL, `parent_id` int(11) NOT NULL, `lang` varchar(20), - `email` varchar(254), + `email` varchar(192), `htmleditormode` varchar(7) default 'default', `templateeditormode` varchar(7) NOT NULL default 'default', `questionselectormode` varchar(7) NOT NULL default 'default', diff --git a/tests/helpers/UpdateDbHelperTest.php b/tests/helpers/UpdateDbHelperTest.php index 27d1b7e3157..2a36b70e16b 100644 --- a/tests/helpers/UpdateDbHelperTest.php +++ b/tests/helpers/UpdateDbHelperTest.php @@ -158,7 +158,6 @@ protected function compareAux(array $upgradeTables, $upgradedFrom) */ \Yii::app()->cache->flush(); - \Yii::app()->cache->gc(); self::$testHelper->teardownDatabase('__test_install_script_compare'); $connection = self::$testHelper->connectToNewDatabase('__test_install_script_compare');