mailpoet
/
vendor-prefixed
/
doctrine
/
dbal
/
src
/
Schema
/
Exception
/
NamedForeignKeyRequired.php
ColumnAlreadyExists.php
2 years ago
ColumnDoesNotExist.php
2 years ago
ForeignKeyDoesNotExist.php
2 years ago
IndexAlreadyExists.php
2 years ago
IndexDoesNotExist.php
2 years ago
IndexNameInvalid.php
2 years ago
InvalidTableName.php
2 years ago
NamedForeignKeyRequired.php
2 years ago
NamespaceAlreadyExists.php
2 years ago
SequenceAlreadyExists.php
2 years ago
SequenceDoesNotExist.php
2 years ago
TableAlreadyExists.php
2 years ago
TableDoesNotExist.php
2 years ago
UniqueConstraintDoesNotExist.php
2 years ago
UnknownColumnOption.php
2 years ago
index.php
2 years ago
NamedForeignKeyRequired.php
17 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\DBAL\Schema\Exception; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use MailPoetVendor\Doctrine\DBAL\Schema\ForeignKeyConstraint; |
| 6 | use MailPoetVendor\Doctrine\DBAL\Schema\SchemaException; |
| 7 | use MailPoetVendor\Doctrine\DBAL\Schema\Table; |
| 8 | use function implode; |
| 9 | use function sprintf; |
| 10 | final class NamedForeignKeyRequired extends SchemaException |
| 11 | { |
| 12 | public static function new(Table $localTable, ForeignKeyConstraint $foreignKey) : self |
| 13 | { |
| 14 | return new self(sprintf('The performed schema operation on "%s" requires a named foreign key, ' . 'but the given foreign key from (%s) onto foreign table "%s" (%s) is currently unnamed.', $localTable->getName(), implode(', ', $foreignKey->getColumns()), $foreignKey->getForeignTableName(), implode(', ', $foreignKey->getForeignColumns()))); |
| 15 | } |
| 16 | } |
| 17 |