Most of the laravel beginners face issues with migration, mostly the migration works but the rollback fails.
Here are a curated list of possibilities and work arounds for the same.
- You have changed table structure manually after migration – You are never expected to do this – All changes to the db structure be only through migrations.
- You have changed the migration filename or classname after migration
- Autoload failure [Class Not found ]. Normally after creating a migration the migrate works but on rollback it will be depending on the composer autoloader which fails to load the class, so just by refreshing the autoload file you will be able to get hold of the stuff. just go to the root folder and run “composer dumpautoload” you’re good to go then!
If you have any problem with migrations feel free to ask in the below comment section.