diff --git a/src/Illuminate/Database/Console/Migrations/TableGuesser.php b/src/Illuminate/Database/Console/Migrations/TableGuesser.php index 2c90387b06fc..30bd53096e06 100644 --- a/src/Illuminate/Database/Console/Migrations/TableGuesser.php +++ b/src/Illuminate/Database/Console/Migrations/TableGuesser.php @@ -14,11 +14,6 @@ class TableGuesser '/.+_(to|from|in)_(\w+)$/', ]; - const DROP_PATTERNS = [ - '/^drop_(\w+)_table$/', - '/^drop_(\w+)$/', - ]; - /** * Attempt to guess the table name and "creation" status of the given migration. * @@ -38,11 +33,5 @@ public static function guess($migration) return [$matches[2], $create = false]; } } - - foreach (self::DROP_PATTERNS as $pattern) { - if (preg_match($pattern, $migration, $matches)) { - return [$matches[1], $create = false]; - } - } } } diff --git a/tests/Database/TableGuesserTest.php b/tests/Database/TableGuesserTest.php index d0a04c07d16f..f983995e4dd5 100644 --- a/tests/Database/TableGuesserTest.php +++ b/tests/Database/TableGuesserTest.php @@ -28,10 +28,6 @@ public function testMigrationIsProperlyParsed() [$table, $create] = TableGuesser::guess('drop_status_column_from_users_table'); $this->assertSame('users', $table); $this->assertFalse($create); - - [$table, $create] = TableGuesser::guess('drop_users_table'); - $this->assertSame('users', $table); - $this->assertFalse($create); } public function testMigrationIsProperlyParsedWithoutTableSuffix() @@ -55,9 +51,5 @@ public function testMigrationIsProperlyParsedWithoutTableSuffix() [$table, $create] = TableGuesser::guess('drop_status_column_from_users'); $this->assertSame('users', $table); $this->assertFalse($create); - - [$table, $create] = TableGuesser::guess('drop_users'); - $this->assertSame('users', $table); - $this->assertFalse($create); } }