Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

changed migration class name, now migrations fail

I tried running composer dump-autoload and after that run migrate and got this error

Class 'CreateContentTemplateBlocksTable' not found

I renamed the file into 'CreateTemplateBlocksTable'.
Why is laravel still looking for the old file name? Is there cache somewhere?

like image 219
niko craft Avatar asked Aug 09 '26 18:08

niko craft


1 Answers

Change the migration class name to match, and then re-run composer dump-autoload. If that doesn't work, go to

vendor\composer\autoload_static.php

to change the name here as well.

The last place to check is your DB, which creates a table for all of your migrations (that's the table name). Edit the necessary names here as well.

like image 165
parker_codes Avatar answered Aug 13 '26 06:08

parker_codes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!