mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Do not use AbstractPlatform::canEmulateSchemas()
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Upgrade to 3.0
|
||||
|
||||
## BC BREAK: Removed support for schema emulation.
|
||||
|
||||
The ORM no longer attempts to emulate schemas on SQLite.
|
||||
|
||||
## BC BREAK: Remove `Setup::registerAutoloadDirectory()`
|
||||
|
||||
Use Composer's autoloader instead.
|
||||
|
||||
@@ -3668,10 +3668,6 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
$schemaName = $this->getSchemaName();
|
||||
if ($schemaName) {
|
||||
$sequencePrefix = $schemaName . '.' . $tableName;
|
||||
|
||||
if (! $platform->supportsSchemas() && $platform->canEmulateSchemas()) {
|
||||
$sequencePrefix = $schemaName . '__' . $tableName;
|
||||
}
|
||||
}
|
||||
|
||||
return $sequencePrefix;
|
||||
|
||||
@@ -41,10 +41,6 @@ class DefaultQuoteStrategy implements QuoteStrategy
|
||||
|
||||
if (! empty($class->table['schema'])) {
|
||||
$tableName = $class->table['schema'] . '.' . $class->table['name'];
|
||||
|
||||
if (! $platform->supportsSchemas() && $platform->canEmulateSchemas()) {
|
||||
$tableName = $class->table['schema'] . '__' . $class->table['name'];
|
||||
}
|
||||
}
|
||||
|
||||
return isset($class->table['quoted'])
|
||||
@@ -90,8 +86,7 @@ class DefaultQuoteStrategy implements QuoteStrategy
|
||||
$schema = '';
|
||||
|
||||
if (isset($association['joinTable']['schema'])) {
|
||||
$schema = $association['joinTable']['schema'];
|
||||
$schema .= ! $platform->supportsSchemas() && $platform->canEmulateSchemas() ? '__' : '.';
|
||||
$schema = $association['joinTable']['schema'] . '.';
|
||||
}
|
||||
|
||||
$tableName = $association['joinTable']['name'];
|
||||
|
||||
@@ -393,7 +393,7 @@ class SchemaTool
|
||||
}
|
||||
}
|
||||
|
||||
if (! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) {
|
||||
if (! $this->platform->supportsSchemas()) {
|
||||
$schema->visit(new RemoveNamespacedAssets());
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class DDC2825Test extends OrmFunctionalTestCase
|
||||
|
||||
$platform = $this->_em->getConnection()->getDatabasePlatform();
|
||||
|
||||
if (! $platform->supportsSchemas() && ! $platform->canEmulateSchemas()) {
|
||||
if (! $platform->supportsSchemas()) {
|
||||
self::markTestSkipped('This test is only useful for databases that support schemas or can emulate them.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,12 +74,7 @@ final class GH7079Test extends OrmFunctionalTestCase
|
||||
|
||||
private function getTableFullName(array $table): string
|
||||
{
|
||||
$join = '.';
|
||||
if (! $this->platform->supportsSchemas() && $this->platform->canEmulateSchemas()) {
|
||||
$join = '__';
|
||||
}
|
||||
|
||||
return $table['schema'] . $join . $table['name'];
|
||||
return $table['schema'] . '.' . $table['name'];
|
||||
}
|
||||
|
||||
private function createClassMetadata(string $className): ClassMetadata
|
||||
|
||||
Reference in New Issue
Block a user