How to Rollback one specific migration in Laravel?
How to Rollback one specific migration in Laravel?
To rollback one specific migration in Laravel, you can use the --path option with the php artisan migrate:rollback command. This allows you to specify the path to the particular migration file you want to rollback. Here are the steps to achieve this:
Identify the Migration File: Determine the specific migration file you want to rollback. For example, let's say the file is 2014_10_12_100000_create_password_resets_table.php.
Run the Rollback Command: Use the --path option with the php artisan migrate:rollback command to specify the path to the migration file. The command would look like this:
php artisan migrate:rollback --path=/database/migrations/2014_10_12_100000_create_password_resets_table.php
Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.