Skip to content

[12.x] Add support for drop patterns to the make:migration command's TableGuesser. #56608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

amirhshokri
Copy link
Contributor

This PR adds support for detecting migrations that drop tables in the TableGuesser class.

Currently, TableGuesser can detect create and change patterns, but not drop migrations.

With this change, migrations like:

php artisan make:migration drop_users_table
php artisan make:migration drop_users

will now be correctly guessed.

@amirhshokri
Copy link
Contributor Author

amirhshokri commented Aug 10, 2025

@taylorotwell

Test failure is coming from Illuminate\Tests\Queue\FailOnExceptionMiddlewareTest::testMiddlewareDataProvider() method and unrelated.

@taylorotwell taylorotwell merged commit ab9e249 into laravel:12.x Aug 10, 2025
33 of 60 checks passed
@amirhshokri amirhshokri deleted the 12.x-improve-migration-table-name-guesser branch August 11, 2025 07:47
@amirhshokri amirhshokri changed the title [12.x] Add drop patterns support to TableGuesser for drop migrations [12.x] Add support for drop patterns to the make:migration command's TableGuesser. Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants