Skip to content

Commit

Permalink
Merge pull request #488 from nextcloud/fix/more-space-taskproc
Browse files Browse the repository at this point in the history
(fix): add more space to taskprocessing columns
  • Loading branch information
oleksandr-nc authored Jan 9, 2025
2 parents 8f34e92 + d344e2f commit 639cb83
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ to join us in shaping a more versatile, stable, and secure app landscape.
*Your insights, suggestions, and contributions are invaluable to us.*
]]></description>
<version>32.0.0-dev.0</version>
<version>32.0.0-dev.1</version>
<licence>agpl</licence>
<author mail="[email protected]" homepage="https://github.com/andrey18106">Andrey Borysenko</author>
<author mail="[email protected]" homepage="https://github.com/bigcat88">Alexander Piskun</author>
Expand Down
49 changes: 49 additions & 0 deletions lib/Migration/Version032000Date20250109162434.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\AppAPI\Migration;

use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

class Version032000Date20250109162434 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure(): ISchemaWrapper $schemaClosure
* @param array $options
* @return null|ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();

if ($schema->hasTable('ex_task_processing')) {
$table = $schema->getTable('ex_task_processing');

$name = $table->getColumn('name');
if ($name->getLength() < 255) {
$name->setLength(255);
}

$displayName = $table->getColumn('display_name');
if ($displayName->getLength() < 255) {
$displayName->setLength(255);
}

$taskType = $table->getColumn('task_type');
if ($taskType->getLength() < 255) {
$taskType->setLength(255);
}
}

return $schema;
}
}

0 comments on commit 639cb83

Please sign in to comment.