1
0

Version30000Date20240815080800.php 944 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2024 S1m <git@sgougeon.fr>
  5. * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  6. * SPDX-License-Identifier: AGPL-3.0-or-later
  7. */
  8. namespace OC\Core\Migrations;
  9. use Closure;
  10. use OCP\DB\ISchemaWrapper;
  11. use OCP\DB\Types;
  12. use OCP\Migration\Attributes\AddColumn;
  13. use OCP\Migration\Attributes\ColumnType;
  14. use OCP\Migration\IOutput;
  15. use OCP\Migration\SimpleMigrationStep;
  16. #[AddColumn(table: 'webauthn', name: 'user_verification', type: ColumnType::BOOLEAN)]
  17. class Version30000Date20240815080800 extends SimpleMigrationStep {
  18. public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
  19. /** @var ISchemaWrapper $schema */
  20. $schema = $schemaClosure();
  21. $table = $schema->getTable('webauthn');
  22. $table->addColumn('user_verification', Types::BOOLEAN, ['notnull' => false, 'default' => false]);
  23. return $schema;
  24. }
  25. }