Skip to content

Commit f10ab35

Browse files
committed
Hotfix
1 parent dc99526 commit f10ab35

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Generator/MigrationGenerator.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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
);

0 commit comments

Comments
 (0)