Skip to content

Commit 70c652a

Browse files
committed
Inheritance: test case for different column name in inheritance
1 parent 7358a3f commit 70c652a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/TDBMAbstractServiceTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,14 @@ private static function initSchema(Connection $connection): void
466466
->column('fk_2')->integer()
467467
->then()->getDbalTable()->addForeignKeyConstraint($targetTable->getDbalTable(), ['fk_1', 'fk_2'], ['id_1', 'id_2']);
468468

469+
$db->table('tmp_entite')
470+
->column('id')->integer()->primaryKey()->autoIncrement();
471+
$db->table('tmp_societe')
472+
->column('id_entite')->references('tmp_entite')->primaryKey()
473+
->then();
474+
$db->table('tmp_agence')
475+
->column('id_entite')->references('tmp_entite')->primaryKey()
476+
->column('id_societe_parent')->references('tmp_societe');
469477

470478
$sqlStmts = $toSchema->getMigrateFromSql($fromSchema, $connection->getDatabasePlatform());
471479

0 commit comments

Comments
 (0)