How to migrate:refresh specific migration/table in Laravel
Sometimes we need to refresh only a specific migration/table but our command is for all migrations. So, we can use the trick which we already know and used to run single migration. We can also use it to refresh the specific migration or table.
php artisan migrate:refresh –path=/database/migration/date_create_tableName_table.php
As we can see in the above artisan command, we just need to declare the –path
for the migration. It will show that all other migrations are not found in the given path. It only found one migration and rollback and migrated successfully.
It may seem like an error in red colour but it is not the error it just says that other migrations are not found in the given path but that’s ok. We only need to refresh single migration that’s why we defined the path.
Hope you found it useful. See you in the next quick help.