vendredi 19 janvier 2018

Migrations in Laravel 5.5: Cannot declare class because the name is already in use

While running a migration in Laravel I got an error:

PHP Fatal error: Cannot declare class UpdateEnquiriesTable, because the name is already in use in /var/www/project/database/migrations/2018_01_17_160335_update_enquiries_table.php on line 33

Having done a bit of research, I see that each migration file needs a unique class name (I don't remember mention of that before, but that could be me).

According to another question, the recommendation is to change the name of one of the classes.

But then someone else recommends deleting the conflicting migrations.

Which would be the preferred option? Assuming either are valid.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2rshP1V
via IFTTT

Aucun commentaire:

Enregistrer un commentaire