1
0

Version14000Date20180129121024.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OC\Core\Migrations;
  7. use OCP\DB\ISchemaWrapper;
  8. use OCP\Migration\IOutput;
  9. use OCP\Migration\SimpleMigrationStep;
  10. /**
  11. * Delete the admin|personal sections and settings tables
  12. */
  13. class Version14000Date20180129121024 extends SimpleMigrationStep {
  14. public function name(): string {
  15. return 'Drop obsolete settings tables';
  16. }
  17. public function description(): string {
  18. return 'Drops the following obsolete tables: "admin_sections", "admin_settings", "personal_sections" and "personal_settings"';
  19. }
  20. /**
  21. * @param IOutput $output
  22. * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
  23. * @param array $options
  24. * @return null|ISchemaWrapper
  25. * @since 13.0.0
  26. */
  27. public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
  28. /** @var ISchemaWrapper $schema */
  29. $schema = $schemaClosure();
  30. $schema->dropTable('admin_sections');
  31. $schema->dropTable('admin_settings');
  32. $schema->dropTable('personal_sections');
  33. $schema->dropTable('personal_settings');
  34. return $schema;
  35. }
  36. }