12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- declare(strict_types=1);
- /**
- * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
- namespace OCA\Files_Sharing\Migration;
- use Closure;
- use OCP\DB\ISchemaWrapper;
- use OCP\Migration\IOutput;
- use OCP\Migration\SimpleMigrationStep;
- /**
- * Auto-generated migration step: Please modify to your needs!
- */
- class Version22000Date20210216084241 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();
- $table = $schema->getTable('share_external');
- if ($table->hasIndex('sh_external_user')) {
- $table->dropIndex('sh_external_user');
- }
- return $schema;
- }
- }
|