Skip to content

Commit 594fed4

Browse files
committed
added a case to detect an error about auto-pivot tables
1 parent 6c1bc9f commit 594fed4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/TDBMAbstractServiceTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,11 @@ private static function initSchema(Connection $connection): void
434434
->column('track_id')->references('tracks')
435435
->column('artist_id')->references('artists')->comment('@JsonKey("feat") @JsonInclude');
436436

437+
$db->table('artists_relations')
438+
->column('id')->integer()->primaryKey()->autoIncrement()
439+
->column('parent_id')->references('artists')
440+
->column('child_id')->references('artists');
441+
437442
$sqlStmts = $toSchema->getMigrateFromSql($fromSchema, $connection->getDatabasePlatform());
438443

439444
foreach ($sqlStmts as $sqlStmt) {

0 commit comments

Comments
 (0)