Files
Carl Schwan f9bcbd3f9f refactor(dbal): Merge ColumnType and IType
Just make sure ColumnType has a method getName for compatibility purpose

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2026-08-11 16:03:02 +02:00

30 lines
634 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\DB\Schema;
use Doctrine\DBAL\Schema\ForeignKeyConstraint as DBALForeignKeyConstraint;
use OCP\DB\Schema\IForeignKeyConstraint;
use Override;
class ForeignKeyConstraint implements IForeignKeyConstraint {
public function __construct(
private readonly DBALForeignKeyConstraint $keyConstraint,
) {
}
#[Override]
public function getName(): string {
/** @var non-empty-string $value */
$value = $this->keyConstraint->getName();
return $value;
}
}