-
-
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 #6726 from morozov/remove-incomplete-sqlite-fk-int…
…rospection Do not introspect incomplete SQLite foreign key constraint
- Loading branch information
Showing
4 changed files
with
38 additions
and
25 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,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\DBAL\Schema\Exception; | ||
|
||
use Doctrine\DBAL\Schema\SchemaException; | ||
use RuntimeException; | ||
|
||
use function sprintf; | ||
|
||
/** @psalm-immutable */ | ||
final class UnsupportedSchema extends RuntimeException implements SchemaException | ||
{ | ||
public static function sqliteMissingForeignKeyConstraintReferencedColumns( | ||
string $constraintTableName, | ||
string $referencingTableName, | ||
): self { | ||
return new self(sprintf( | ||
'Unable to introspect foreign key constraint "%s" because the referenced column names are omitted,' | ||
. ' and the referenced table "%s" does not exist.', | ||
$constraintTableName, | ||
$referencingTableName, | ||
)); | ||
} | ||
} |
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