Version28000Date20231126110901.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Core\Migrations;
  8. use Closure;
  9. use OCP\DB\ISchemaWrapper;
  10. use OCP\Migration\IOutput;
  11. use OCP\Migration\SimpleMigrationStep;
  12. /**
  13. * Create new fields for type and lazy loading in appconfig for the new IAppConfig API.
  14. */
  15. class Version28000Date20231126110901 extends SimpleMigrationStep {
  16. public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
  17. return null;
  18. /**
  19. * this migration was needed during Nextcloud 28 to prep the migration to 29 and a
  20. * new IAppConfig as its API require 'lazy' and 'type' database field.
  21. *
  22. * some changes in the migration process and the expected result have made its execution
  23. * useless, therefore ignored.
  24. *
  25. * @see Version29000Date20240124132201
  26. * @see Version29000Date20240124132202
  27. */
  28. // /** @var ISchemaWrapper $schema */
  29. // $schema = $schemaClosure();
  30. //
  31. // if (!$schema->hasTable('appconfig')) {
  32. // return null;
  33. // }
  34. //
  35. // $table = $schema->getTable('appconfig');
  36. // if ($table->hasColumn('lazy')) {
  37. // return null;
  38. // }
  39. //
  40. // // type=2 means value is typed as MIXED
  41. // $table->addColumn('type', Types::INTEGER, ['notnull' => true, 'default' => 2]);
  42. // $table->addColumn('lazy', Types::BOOLEAN, ['notnull' => false, 'default' => false]);
  43. //
  44. // return $schema;
  45. }
  46. }