We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 351277e commit 7e73babCopy full SHA for 7e73bab
1 file changed
system/Database/MigrationRunner.php
@@ -538,14 +538,18 @@ protected function getMigrationNumber(string $migration): string
538
}
539
540
/**
541
- * Extracts the migration class name from a filename
+ * Extracts the migration name from a filename
542
+ *
543
+ * Note: The migration name should be the classname, but maybe they are
544
+ * different.
545
546
+ * @param string $migration A migration filename w/o path.
547
*/
548
protected function getMigrationName(string $migration): string
549
{
550
$parts = explode('_', $migration);
- array_shift($parts);
551
- return implode('_', $parts);
552
+ return array_pop($parts);
553
554
555
0 commit comments