mirror of
https://github.com/nextcloud/server.git
synced 2026-11-24 15:04:18 +01:00
Just make sure ColumnType has a method getName for compatibility purpose Signed-off-by: Carl Schwan <carl@carlschwan.eu>
30 lines
634 B
PHP
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;
|
|
}
|
|
}
|