Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/Illuminate/Database/Console/Migrations/TableGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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];
}
}
}
}
8 changes: 0 additions & 8 deletions tests/Database/TableGuesserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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);
}
}
Loading