Merge pull request #49477 from nextcloud/hasTableTaskprocessingTasks

fix(migration): Check if table exists
This commit is contained in:
Git'Fellow 2024-12-06 14:45:54 +01:00 committed by GitHub
commit 0890a99cb4
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;