diff options
Diffstat (limited to 'core/Migrations/Version30000Date20240708160048.php')
-rw-r--r-- | core/Migrations/Version30000Date20240708160048.php | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/core/Migrations/Version30000Date20240708160048.php b/core/Migrations/Version30000Date20240708160048.php new file mode 100644 index 00000000000..a85eea2c974 --- /dev/null +++ b/core/Migrations/Version30000Date20240708160048.php @@ -0,0 +1,56 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OC\Core\Migrations; + +use Closure; +use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +/** + * + */ +class Version30000Date20240708160048 extends SimpleMigrationStep { + + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + if ($schema->hasTable('taskprocessing_tasks')) { + $table = $schema->getTable('taskprocessing_tasks'); + + $table->addColumn('scheduled_at', Types::INTEGER, [ + 'notnull' => false, + 'default' => 0, + 'unsigned' => true, + ]); + $table->addColumn('started_at', Types::INTEGER, [ + 'notnull' => false, + 'default' => 0, + 'unsigned' => true, + ]); + $table->addColumn('ended_at', Types::INTEGER, [ + 'notnull' => false, + 'default' => 0, + 'unsigned' => true, + ]); + + return $schema; + } + + return null; + } +} |