Laravel delete migration

2020-09-28 11:37:54 Neel Patel Laravel

How to delete a migration file in Laravel?

Sometime we accidentally create a migration in laravel later we identify the particular migration is not required. In this post I am going to show how to delete migration in Laravel.

Step1: Delete the migration file from app/database/migrations/ directory.

Step2: Run composer dump-autoload command to reset autoload files.

Step3: Run migrate:rollback command to rollback the migration table from database.

if step 3 does not work please drop the table manually from database.

This post is submitted by one of our members. You may submit a new post here.

Related Tricks