lundi 27 février 2017

Rename an index in Laravel 5

I want to rename an index in Laravel 5.

In a previous migration a column was created for table named a like so:

$table->unsignedInteger('foo')->index('blah');

I want to rename the index so that it uses the default Laravel notation.

i.e. I want to rename the blah index to a_blah.

I know how to rename a normal column, like so:

$table->renameColumn('from', 'to');

But the documentation does not mention how to rename indexes.

How can I do this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire