Laravel 5.4 Specific Table Migration

前端 未结 21 1492
梦如初夏
梦如初夏 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:52

    php artisan help migrate
    

    You will see the option:

    --path[=PATH] The path to the migrations files to be executed

    By the way, you can probably indicate the root folder of the file that you want to migrate:

    php artisan migrate --path=/database/migrations/sample.php
    

    Or, You can create a new folder in migrations, then migrate all the migration files you want inside it:

    php artisan migrate --path=/database/migrations/new_folder
    

提交回复
热议问题