12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- declare(strict_types=1);
- namespace OC\Core\Migrations;
- use Closure;
- use OCP\DB\ISchemaWrapper;
- use OCP\Migration\IOutput;
- use OCP\Migration\SimpleMigrationStep;
- class Version23000Date20211203110726 extends SimpleMigrationStep {
- private const TABLE_NAME = 'profile_config';
-
- public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
-
- $schema = $schemaClosure();
- $table = $schema->getTable(self::TABLE_NAME);
- if ($table->hasIndex('user_id')) {
- $table->renameIndex('user_id', self::TABLE_NAME . '_user_id_idx');
- return $schema;
- }
- return null;
- }
- }
|