mirror of
https://github.com/nextcloud/app_api.git
synced 2026-01-13 20:19:21 +00:00
All related PRs: https://github.com/cloud-py-api/nc_py_api/pull/284 https://github.com/cloud-py-api/app_api/pull/359 https://github.com/nextcloud/translate2/pull/11 Signed-off-by: Anupam Kumar <kyteinsky@gmail.com> Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
39 lines
905 B
PHP
39 lines
905 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2024 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\DB\Types;
|
|
use OCP\Migration\IOutput;
|
|
use OCP\Migration\SimpleMigrationStep;
|
|
|
|
class Version3000Date20240807085759 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();
|
|
|
|
$table = $schema->getTable('ex_task_processing');
|
|
if (!$table->hasColumn('provider')) {
|
|
$table->addColumn('provider', Types::TEXT, [
|
|
'notnull' => true,
|
|
]);
|
|
}
|
|
|
|
return $schema;
|
|
}
|
|
}
|