nextcloud_groupfolder_files.../lib/Migration/Version131Date20250219152900.php

36 lines
833 B
PHP
Raw Normal View History

<?php
namespace OCA\GroupfolderFilesystemSnapshots\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
class Version131Date20250219152900 extends SimpleMigrationStep {
const RESULTS_TABLE = "groupfolder_snapshots_task_results";
/**
* @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) {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$table = $schema->getTable(self::RESULTS_TABLE);
$table->modifyColumn('before_path', [
'length' => 2000,
]);
$table->modifyColumn('current_path', [
'length' => 2000,
]);
return $schema;
}
}