diff --git a/migrations/m170307_100221_update_email_type.php b/migrations/m170307_100221_update_email_type.php new file mode 100644 index 00000000..9acbab96 --- /dev/null +++ b/migrations/m170307_100221_update_email_type.php @@ -0,0 +1,29 @@ +alterColumn('user', 'email', 'varchar(254)'); + } + + public function down() + { + echo "m170307_100221_update_email_type cannot be reverted.\n"; + + return false; + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/migrations/mysql.schema.sql b/migrations/mysql.schema.sql index 1e83df31..98b5ee1f 100644 --- a/migrations/mysql.schema.sql +++ b/migrations/mysql.schema.sql @@ -280,7 +280,7 @@ CREATE TABLE IF NOT EXISTS `user` ( `updated_at` int(11) NOT NULL, `registration_ip` varchar(15) DEFAULT NULL, `bind_to_ip` varchar(255) DEFAULT NULL, - `email` varchar(128) DEFAULT NULL, + `email` varchar(254) DEFAULT NULL, `email_confirmed` smallint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; diff --git a/views/auth/confirmEmail.php b/views/auth/confirmEmail.php index c21d1978..42d1a23d 100644 --- a/views/auth/confirmEmail.php +++ b/views/auth/confirmEmail.php @@ -34,7 +34,7 @@ 'validateOnBlur'=>false, ]); ?> - = $form->field($model, 'email')->textInput(['maxlength' => 255, 'autofocus'=>true]) ?> + = $form->field($model, 'email')->textInput(['maxlength' => 254, 'autofocus'=>true]) ?>