Skip to content
Snippets Groups Projects
Commit 41512382 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

change column type of admission_seminar_uer.comment and seminar_user.comment, fixes #830

parent 9348418c
No related branches found
No related tags found
No related merge requests found
<?php
final class ChangeSeminarUserCommentType extends Migration
{
public function description()
{
return 'Changes the type of the comment column of tables seminar_user '
. 'and admission_seminar_user to VARCHAR(255) instead of TINYTEXT';
}
protected function up()
{
$query = "ALTER TABLE `admission_seminar_user`
MODIFY COLUMN `comment` VARCHAR(255) NOT NULL DEFAULT ''";
DBManager::get()->exec($query);
$query = "ALTER TABLE `seminar_user`
MODIFY COLUMN `comment` VARCHAR(255) NOT NULL DEFAULT ''";
DBManager::get()->exec($query);
}
protected function down()
{
// Column seminar_user does not need to be changed since it's already
// VARCHAR(255) in db/studip.sql
$query = "ALTER TABLE `admission_seminar_user`
MODIFY COLUMN `comment` TINYTEXT";
DBManager::get()->exec($query);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment