Skip to content

Rename and change column definition at once #44912

Discussion options

You must be logged in to vote

It is now fixed on 10.x using native schema operations: #45487

$table->enum('difficulty', ['easy', 'hard'])->change();
$table->renameColumn('difficulty', 'hardness');

or simply on MySQL:

$table->enum('difficulty', ['easy', 'hard'])->renameTo('hardness')->change();

Replies: 4 comments 9 replies

Comment options

You must be logged in to vote
1 reply
@hafezdivandari
Comment options

Comment options

You must be logged in to vote
6 replies
@Sophist-UK
Comment options

@hafezdivandari
Comment options

@Sophist-UK
Comment options

@hafezdivandari
Comment options

@Sophist-UK
Comment options

Comment options

You must be logged in to vote
2 replies
@hafezdivandari
Comment options

@Sophist-UK
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by hafezdivandari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants