skip to Main Content

Delete migration In Laravel

  1. Manually delete the migration file under app/database/migrations/my_migration_file_name.php
  2. Reset the composer autoload files: composer dump-autoload

If you did run the migration (php artisan migrate), you may do this:

a) Run migrate:rollback – it is the right way to undo the last migration

b) If migrate:rollback does not work, do it manually:

  1. Manually delete the migration file under app/database/migrations/my_migration_file_name.php
  2. Reset the composer autoload files: composer dump-autoload
  3. Modify your database: Remove the last entry from the migrations table
Back To Top