migrate:rollback not working

Posted 3 years ago by jeloqim

I created a migration using php artisan make:migration create_comment_user_vote_table and then filled in all of the necessary code to create columns, indexes, and whatever I need. Then I ran php artisan migrate . And it returned that it created the database table successfully. Then I realized that I named the database table 'comment_user_votes` in the Schema::create method and that actually I want to call the file that as well (that is the convention I have been using). So I changed the name of the file to create_comment_user_votes_table (added an s to end of vote) and changed the class name from CreateCommentUserVoteTable to CreateCommentUserVotesTable. Then I ran php artisan migrate:rollback and I got

:  Class 'CreateCommentUserVotesTable' not found in /vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php on line 336

  Class 'CreateCommentUserVotesTable' not found

Then I realized I probably can't just change the name. So I renamed the file and classname back to their original, ran composer dump-autoload and tried php artisan migrate:rollback but I get the same error. ANy ideas on how to fix this?

Please sign in or create an account to participate in this conversation.