123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- declare(strict_types=1);
- /**
- * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
- namespace OCA\Files_Trashbin\Migration;
- use Closure;
- use OCP\DB\ISchemaWrapper;
- use OCP\DB\Types;
- use OCP\Migration\IOutput;
- use OCP\Migration\SimpleMigrationStep;
- class Version1020Date20240403003535 extends SimpleMigrationStep {
- /**
- * @param Closure(): ISchemaWrapper $schemaClosure
- */
- public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
- /** @var ISchemaWrapper $schema */
- $schema = $schemaClosure();
- if (!$schema->hasTable('files_trash')) {
- return null;
- }
- $table = $schema->getTable('files_trash');
- $table->addColumn('deleted_by', Types::STRING, [
- 'notnull' => false,
- 'length' => 64,
- ]);
- return $schema;
- }
- }
|