fix(migration): Check if table exists

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
This commit is contained in:
Git'Fellow 2024-11-25 17:47:14 +01:00 committed by GitHub
parent f1ba90d52d
commit 97c67ecb9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,11 +28,13 @@ class Version30000Date20240906095113 extends SimpleMigrationStep {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$table = $schema->getTable('taskprocessing_tasks');
$column = $table->getColumn('error_message');
if ($column->getLength() < 4000) {
$column->setLength(4000);
if ($schema->hasTable('taskprocessing_tasks')) {
$table = $schema->getTable('taskprocessing_tasks');
$column = $table->getColumn('error_message');
if ($column->getLength() < 4000) {
$column->setLength(4000);
}
}
return $schema;