0
0
mirror of https://github.com/nextcloud/server.git synced 2024-12-30 17:08:35 +00:00
nextcloud_server/apps/user_ldap/lib/Migration/Version1130Date20220110154719.php
Andy Scherzinger 8d8891c5bc
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-30 15:49:33 +02:00

40 lines
944 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\User_LDAP\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version1130Date20220110154719 extends SimpleMigrationStep {
public function getName() {
return 'Drop ldap_group_mapping_backup';
}
/**
* @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();
if ($schema->hasTable('ldap_group_mapping_backup')) {
$schema->dropTable('ldap_group_mapping_backup');
return $schema;
}
return null;
}
}