Laravel 5.4 Specific Table Migration

前端 未结 21 1506
梦如初夏
梦如初夏 2020-12-07 10:38

Hi read all the included documentation here in https://laravel.com/docs/5.4/migrations.

Is there a way on how to migrate a certain migration file (1 migration only),

21条回答
  •  孤城傲影
    2020-12-07 10:45

    You can only rollback:

    php artisan migrate:rollback
    

    https://laravel.com/docs/5.4/migrations#rolling-back-migrations

    You can specify how many migrations to roll back to using the 'step' option:

    php artisan migrate:rollback --step=1
    

    Some tricks are available here:

    Rollback one specific migration in Laravel

提交回复
热议问题