nextcloud/apps/files_sharing/lib/Migration/Version33000Date20251030081948.php
Carl Schwan 91d3c63222
fix: Remove auto increment from share_external
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-16 10:40:09 +01:00

29 lines
857 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Files_Sharing\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\Attributes\ColumnType;
use OCP\Migration\Attributes\ModifyColumn;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
use Override;
#[ModifyColumn(table: 'share_external', name: 'id', type: ColumnType::BIGINT, description: 'Remove auto-increment')]
class Version33000Date20251030081948 extends SimpleMigrationStep {
#[Override]
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$schema->dropAutoincrementColumn('share_external', 'id');
return null;
}
}