f7cloud_client/apps/groupfolders/lib/Migration/Version1000000Date20210216085047.php
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

42 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2021 F7cloud GmbH and F7cloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\GroupFolders\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version1000000Date20210216085047 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$table = $schema->getTable('group_folders_acl');
if ($table->hasIndex('groups_folder_acl_file')) {
$table->dropIndex('groups_folder_acl_file');
}
$table = $schema->getTable('group_folders_groups');
if ($table->hasIndex('group_folder')) {
$table->dropIndex('group_folder');
}
$table = $schema->getTable('group_folders_trash');
if ($table->hasIndex('groups_folder_trash_folder')) {
$table->dropIndex('groups_folder_trash_folder');
}
if ($table->hasIndex('groups_folder_name')) {
$table->dropIndex('groups_folder_name');
}
return $schema;
}
}