Skip to content

Commit

Permalink
Merge pull request #49477 from nextcloud/hasTableTaskprocessingTasks
Browse files Browse the repository at this point in the history
fix(migration): Check if table exists
  • Loading branch information
solracsf authored Dec 6, 2024
2 parents 9f0c113 + 97c67ec commit 0890a99
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 0890a99

Please sign in to comment.