niko craft
niko craft

Reputation: 2977

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?

Upvotes: 2

Views: 898

Answers (1)

parker_codes
parker_codes

Reputation: 3397

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.

Upvotes: 9

Related Questions