Skip to content

Commit

Permalink
fix(migration): Check if table exists
Browse files Browse the repository at this point in the history
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
  • Loading branch information
solracsf authored Nov 25, 2024
1 parent f1ba90d commit 97c67ec
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/Migrations/Version30000Date20240906095113.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
/** @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;
Expand Down

0 comments on commit 97c67ec

Please sign in to comment.