Skip to content
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

[9.x] Add ability to drop an index when modifying a column #45513

Merged
merged 1 commit into from
Jan 16, 2023
Merged

[9.x] Add ability to drop an index when modifying a column #45513

merged 1 commit into from
Jan 16, 2023

Conversation

hafezdivandari
Copy link
Contributor

-> We can already chain an index method on the column definition to add an index:

$table->string('name')->unique();

-> We could also modify a column to drop its attribute, e.g. set not null:

$table->string('name')->nullable(false)->change();

This PR adds the ability to drop an index (by its conventional name) when modifying a column:

$table->string('name')->unique(false)->change();

@hafezdivandari hafezdivandari marked this pull request as ready for review January 5, 2023 00:08
@taylorotwell taylorotwell merged commit 8124ca8 into laravel:9.x Jan 16, 2023
@hafezdivandari hafezdivandari deleted the patch-1 branch January 16, 2023 21:56
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