You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Version27000Date20230309104802.php 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. * Migrate oc_file_metadata.metadata as JSON type to oc_file_metadata.value a STRING type
  14. * @see \OC\Metadata\FileMetadata
  15. */
  16. class Version27000Date20230309104802 extends SimpleMigrationStep {
  17. /**
  18. * @param IOutput $output
  19. * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
  20. * @param array $options
  21. * @return null|ISchemaWrapper
  22. */
  23. public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
  24. // /** @var ISchemaWrapper $schema */
  25. // $schema = $schemaClosure();
  26. // $metadataTable = $schema->getTable('file_metadata');
  27. // if ($metadataTable->hasColumn('metadata')) {
  28. // $metadataTable->dropColumn('metadata');
  29. // return $schema;
  30. // }
  31. return null;
  32. }
  33. }