Laravel

How to migrate:refresh specific migration/table in Laravel

Share your learning

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.

Satpal

Recent Posts

How to Switch PHP Versions in XAMPP Easily: Managing Multiple PHP Versions on Ubuntu

Today we are going to learn about managing multiple PHP versions on ubuntu with xampp.…

1 year ago

How to Use Coding to Improve Your Website’s SEO Ranking?

Let's understand about how to use coding to improve your website's SEO. In today’s computerized…

1 year ago

Most Important Linux Commands for Web Developers

Let's understand the most important linux commands for web developers. Linux, as an open-source and…

1 year ago

Top 75+ Laravel Interview Questions Asked by Top MNCs

Today we are going to discuss top 75+ Laravel interview questions asked by top MNCs.Laravel,…

1 year ago

Mailtrap Integration for Email Testing with Laravel 10

Today we will discuss about the Mailtrap integration with laravel 10 .Sending and receiving emails…

1 year ago

Firebase Cloud Messaging (FCM) with Ionic 6: Push Notifications

Today we are going to integrate FCM (Firebase Cloud Messaging) push notifications with ionic application.Firebase…

1 year ago