44
44
use TheCodingMachine \TDBM \Utils \DefaultNamingStrategy ;
45
45
use TheCodingMachine \TDBM \Utils \PathFinder \PathFinder ;
46
46
use function stripos ;
47
+ use const PHP_EOL ;
47
48
48
49
abstract class TDBMAbstractServiceTest extends TestCase
49
50
{
@@ -380,12 +381,14 @@ private static function initSchema(Connection $connection): void
380
381
381
382
$ db ->junctionTable ('person ' , 'boats ' );
382
383
383
- $ db ->table ('base_objects ' )
384
- ->column ('id ' )->integer ()->primaryKey ()->autoIncrement ()
385
- ->column ('label ' )->string ();
386
- $ db ->table ('inherited_objects ' )
387
- ->column ('id ' )->integer ()->primaryKey ()->autoIncrement ()
388
- ->column ('base_object_id ' )->references ('base_objects ' )->unique ()->comment ('@JsonCollection ' );
384
+ if (!$ connection ->getDatabasePlatform () instanceof OraclePlatform) {
385
+ $ db ->table ('base_objects ' )
386
+ ->column ('id ' )->integer ()->primaryKey ()->autoIncrement ()
387
+ ->column ('label ' )->string ();
388
+ $ db ->table ('inherited_objects ' )
389
+ ->column ('id ' )->integer ()->primaryKey ()->autoIncrement ()
390
+ ->column ('base_object_id ' )->references ('base_objects ' )->unique ()->comment ('@JsonCollection ' );
391
+ }
389
392
390
393
$ targetTable = $ db ->table ('composite_fk_target ' )
391
394
->column ('id_1 ' )->integer ()
@@ -395,7 +398,7 @@ private static function initSchema(Connection $connection): void
395
398
->column ('id ' )->integer ()->primaryKey ()->autoIncrement ()
396
399
->column ('fk_1 ' )->integer ()
397
400
->column ('fk_2 ' )->integer ()
398
- ->then ()->getDbalTable ()->addForeignKeyConstraint ($ targetTable ->getDbalTable (), ['fk_1 ' , 'fk_2 ' ], ['id_1 ' , 'id_2 ' ]);
401
+ ->then ()->getDbalTable ()->addForeignKeyConstraint ($ targetTable ->getDbalTable (), [$ connection -> quoteIdentifier ( 'fk_1 ' ), $ connection -> quoteIdentifier ( 'fk_2 ' ) ], [$ connection -> quoteIdentifier ( 'id_1 ' ), $ connection -> quoteIdentifier ( 'id_2 ' ) ]);
399
402
400
403
// Test case, the problem here is:
401
404
// - `inheritance_agency` have an FK to `inheritance_society.**id_entity**`
0 commit comments