-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6550 from morozov/implicit-index-names
Simplify tracking implicitly created indexes
- Loading branch information
Showing
3 changed files
with
53 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\DBAL\Schema\Exception; | ||
|
||
use Doctrine\DBAL\Schema\SchemaException; | ||
use LogicException; | ||
|
||
use function sprintf; | ||
|
||
/** @psalm-immutable */ | ||
final class PrimaryKeyAlreadyExists extends LogicException implements SchemaException | ||
{ | ||
public static function new(string $tableName): self | ||
{ | ||
return new self( | ||
sprintf('Primary key was already defined on table "%s".', $tableName), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters