File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1010use Doctrine \DBAL \Platforms \OraclePlatform ;
1111use Doctrine \DBAL \Platforms \PostgreSQLPlatform ;
1212use Doctrine \DBAL \Schema \AbstractSchemaManager ;
13+ use Doctrine \DBAL \Schema \NamedObject ;
1314use Doctrine \DBAL \Schema \Schema ;
1415use Doctrine \DBAL \Schema \Table ;
1516use Doctrine \DBAL \Types \Type ;
@@ -1104,7 +1105,12 @@ protected function dropAndCreateTable(Table $table): void
11041105 {
11051106 $ schemaManager = $ this ->createSchemaManager ();
11061107 $ platform = $ this ->_em ->getConnection ()->getDatabasePlatform ();
1107- $ tableName = $ table ->getQuotedName ($ platform );
1108+
1109+ if ($ table instanceof NamedObject) {
1110+ $ tableName = $ table ->getObjectName ()->toSQL ($ platform );
1111+ } else {
1112+ $ tableName = $ table ->getQuotedName ($ platform );
1113+ }
11081114
11091115 $ this ->dropTableIfExists ($ tableName );
11101116 $ schemaManager ->createTable ($ table );
You can’t perform that action at this time.
0 commit comments