diff --git a/admin/migration.php b/admin/migration.php index 25bc733..9eceac0 100644 --- a/admin/migration.php +++ b/admin/migration.php @@ -22,6 +22,7 @@ use Framadate\Migration\From_0_8_to_0_9_Migration; use Framadate\Migration\AddColumn_receiveNewComments_For_0_9; use Framadate\Migration\AddColumn_uniqId_In_vote_For_0_9; use Framadate\Migration\AddColumn_hidden_In_poll_For_0_9; +use Framadate\Migration\Alter_Comment_table_for_name_length; use Framadate\Migration\Migration; use Framadate\Utils; @@ -36,6 +37,7 @@ $migrations = [ new AddColumn_receiveNewComments_For_0_9(), new AddColumn_uniqId_In_vote_For_0_9(), new AddColumn_hidden_In_poll_For_0_9(), + new Alter_Comment_table_for_name_length(), ]; // --------------------------------------- diff --git a/app/classes/Framadate/Migration/Alter_Comment_table_for_name_length.php b/app/classes/Framadate/Migration/Alter_Comment_table_for_name_length.php new file mode 100644 index 0000000..99e0adb --- /dev/null +++ b/app/classes/Framadate/Migration/Alter_Comment_table_for_name_length.php @@ -0,0 +1,72 @@ +alterCommentTable($pdo); + + return true; + } + + private function alterCommentTable(\PDO $pdo) { + $pdo->exec(' + ALTER TABLE `' . Utils::table('comment') . '` + CHANGE `name` `name` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ;'); + } + +}