Add lib/Migration/Version131Date20250219152900.php

This commit is contained in:
Jonathan Treffler 2025-02-19 15:53:55 +01:00
parent 19362233f5
commit d8b0331d5e

View file

@ -0,0 +1,35 @@
<?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;
}
}