In laravel 5.2 is possible to modify a column to make it auto_increment? I have an ID column, its primary already, but it's not auto_increment, and I need to make it, how can I do it? I have registers in the table (each of them have the corresponding ID) so I cannot delete the registers.
Did you try the change
method?
Schema::table('posts', function (Blueprint $table) {
$table->increments('id')->change();
});
See the documentation section on changing columns for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With