Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2022-05-25 11:41:30 +02:00 коммит произвёл backportbot-nextcloud[bot]
Родитель dec2c83ec7
Коммит fe0b715846
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -92,7 +92,7 @@ class Version010200Date20200323141300 extends SimpleMigrationStep {
'notnull' => true, 'notnull' => true,
'length' => 256, 'length' => 256,
]); ]);
$table->addColumn('description', Types::STRING, [ $table->addColumn('description', Types::TEXT, [
'notnull' => false, 'notnull' => false,
'length' => 8192, 'length' => 8192,
]); ]);
@ -200,7 +200,7 @@ class Version010200Date20200323141300 extends SimpleMigrationStep {
$table->addColumn('question_id', Types::INTEGER, [ $table->addColumn('question_id', Types::INTEGER, [
'notnull' => true, 'notnull' => true,
]); ]);
$table->addColumn('text', Types::STRING, [ $table->addColumn('text', Types::TEXT, [
'notnull' => true, 'notnull' => true,
'length' => 4096, 'length' => 4096,
]); ]);
@ -351,7 +351,7 @@ class Version010200Date20200323141300 extends SimpleMigrationStep {
$id_mapping['currentSubmission'] = $qb_restore->getLastInsertId(); //Store submission-id to connect answers to submission. $id_mapping['currentSubmission'] = $qb_restore->getLastInsertId(); //Store submission-id to connect answers to submission.
} }
$last_vote = $vote; $last_vote = $vote;
//In case the old Answer would have been longer than current possible length, create a warning and shorten text to avoid Error on upgrade. //In case the old Answer would have been longer than current possible length, create a warning and shorten text to avoid Error on upgrade.
if (strlen($vote['vote_answer']) > 4096) { if (strlen($vote['vote_answer']) > 4096) {
$output->warning("Answer-text is too long for new Database: '" . $vote['vote_answer'] . "'"); $output->warning("Answer-text is too long for new Database: '" . $vote['vote_answer'] . "'");