2018-01-29 07:14:56 -05:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2018-01-29 07:14:56 -05:00
|
|
|
/**
|
2024-05-24 13:43:47 -04:00
|
|
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2018-01-29 07:14:56 -05:00
|
|
|
*/
|
|
|
|
|
namespace OC\Core\Migrations;
|
|
|
|
|
|
|
|
|
|
use OCP\DB\ISchemaWrapper;
|
|
|
|
|
use OCP\Migration\IOutput;
|
2019-11-22 14:52:10 -05:00
|
|
|
use OCP\Migration\SimpleMigrationStep;
|
2018-01-29 07:14:56 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Delete the admin|personal sections and settings tables
|
|
|
|
|
*/
|
|
|
|
|
class Version14000Date20180129121024 extends SimpleMigrationStep {
|
2018-04-12 11:47:40 -04:00
|
|
|
public function name(): string {
|
|
|
|
|
return 'Drop obsolete settings tables';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function description(): string {
|
|
|
|
|
return 'Drops the following obsolete tables: "admin_sections", "admin_settings", "personal_sections" and "personal_settings"';
|
|
|
|
|
}
|
2018-01-29 07:14:56 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param IOutput $output
|
|
|
|
|
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
|
|
|
|
* @param array $options
|
|
|
|
|
* @return null|ISchemaWrapper
|
|
|
|
|
* @since 13.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
|
|
|
|
|
/** @var ISchemaWrapper $schema */
|
|
|
|
|
$schema = $schemaClosure();
|
|
|
|
|
|
|
|
|
|
$schema->dropTable('admin_sections');
|
|
|
|
|
$schema->dropTable('admin_settings');
|
|
|
|
|
$schema->dropTable('personal_sections');
|
|
|
|
|
$schema->dropTable('personal_settings');
|
|
|
|
|
|
|
|
|
|
return $schema;
|
|
|
|
|
}
|
|
|
|
|
}
|