File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -95,15 +95,17 @@ public function generate(array $modelNames): array
9595 $ migratables = $ this ->sortMigrations ($ migratables );
9696
9797 foreach ($ migratables as $ table => $ migratable ) {
98- $ source = $ sourceMap [$ table ];
98+ $ source = $ sourceMap [ltrim ( $ table, ' _ ' ) ];
9999
100100 if ($ migratable instanceof SimplifyingBlueprint) {
101101 $ migrationData [$ table ] = $ this ->getMigrationItem ($ source , $ migratable );
102102 } else {
103103 /** @var BlueprintDiff $migratable */
104104 $ migratable ->applyColumnIndexes ();
105105 $ migratable ->applyColumnIndexes (true );
106- $ migrationData [$ this ->existingBlueprints [$ source ]->getTable ()] = $ this ->getMigrationItem (
106+ $ key = isset ($ this ->existingBlueprints [$ source ])
107+ ? $ this ->existingBlueprints [$ source ]->getTable () : $ table ;
108+ $ migrationData [$ key ] = $ this ->getMigrationItem (
107109 $ source ,
108110 $ migratable ,
109111 );
You can’t perform that action at this time.
0 commit comments