2

I have several migration file .
I want run php artisan migrate:rollback by file name like this

2016_05_16_131054_create_contries_table.php
paranoid
  • 6,799
  • 19
  • 49
  • 86
  • http://stackoverflow.com/questions/17697247/laravel-4-artisan-how-to-rollback-to-a-specific-migration-state?rq=1 – haakym May 16 '16 at 13:25

1 Answers1

2

You can't specify migration to rollback. You can only rollback the last migration batch (look migrations table).

The best you can do is to make changes in your table with new migration. Or you can save data, rollback all migrations and and migrate again.

Alexey Mezenin
  • 158,981
  • 26
  • 290
  • 279
  • I want to remove this file and drop table and remove fields from migration table. Is it correct and logical? – paranoid May 16 '16 at 13:35
  • Yes you can drop a table, use `Schema::drop('table');` https://laravel.com/docs/5.2/migrations#renaming-and-dropping-tables I still think you're missing the point though if you're wanting to remove the file also – haakym May 16 '16 at 13:57