Skip to content

Commit 0f35017

Browse files
committed
Fix some $table operations, show error when encountering unknown
1 parent da5d77a commit 0f35017

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/MigrationSquasher.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ protected function createMigrationFunctionCall(Table $table, $line, $matches)
243243
case 'timestamps' :
244244
case 'softDeletes' :
245245
case 'nullableTimestamps' :
246+
case 'rememberToken' :
246247
$segments[1] = $matches[0];
247248
case 'string' :
248249
case 'integer' :
@@ -256,6 +257,7 @@ protected function createMigrationFunctionCall(Table $table, $line, $matches)
256257
case 'boolean' :
257258
case 'date' :
258259
case 'dateTime' :
260+
case 'datetime' :
259261
case 'time' :
260262
case 'timestamp' :
261263
case 'text' :
@@ -270,6 +272,14 @@ protected function createMigrationFunctionCall(Table $table, $line, $matches)
270272
case 'enum' :
271273
$table->addColumn($this->createStandardColumn($matches, $segments, $line));
272274
break;
275+
case 'index' :
276+
case 'dropUnique' :
277+
echo "ERROR, cannot handle " . $matches[0] . PHP_EOL;
278+
var_dump($segments);
279+
break;
280+
default:
281+
echo "Unknown table operation: " . $matches[0] . PHP_EOL;
282+
exit;
273283
}
274284
$matches = null;
275285
}

0 commit comments

Comments
 (0)