Manage your Laravel migrations with 1 click!

Have you ever want to migrate a single migration in Laravel?
You need to write a huge line of words in your command line to just migrate a migration.

Or have you ever tried to refresh or reset a migration?
In some cases the migration commands literall…


This content originally appeared on DEV Community and was authored by Reza Amini

Have you ever want to migrate a single migration in Laravel?
You need to write a huge line of words in your command line to just migrate a migration.

Or have you ever tried to refresh or reset a migration?
In some cases the migration commands literally aren't understandable and you may wonder what is the fresh or refresh and should I use refresh or reset or other commands and what is the difference between them?

Imagine that you have over 10 migrations and you just want to refresh just one of them, to do this you need to execute this command:

php artisan migrate:refresh --path=database/migrations/2021_09_14_153949_create_products_table.php

Hmmm, to me and lots of you it's not enjoyable and also it does take time to write in command line and if we type the wrong name we may lose our data in database.

So what should we do?

Here Migrator comes!

Migrator is a GUI migration manager for Laravel.

With Migrator you can manage your migration as easy as possible in a beautiful user interface.

Migrator features:

  • Create new migration
  • Migrate all migrations
  • Fresh migrations
  • Drop a single migration
  • Migrate a single migration
  • Delete and drop a migration
  • See the status of migrations
  • Refresh a migration (Drop then up)
  • Show the migration data in a better way!

Alt Text

So we have talked about the features, let's install Migrator in a minute.

Installing Migrator is super duper easy, you just need to run a single composer command:

composer require rezaamini-ir/migrator

Congrats! Migrator was installed successfully, now you will be to access the /migrator path in your project and if you want to change the authentication method or Migrator route you can publish config file with this command:

php artisan vendor:publish --tag=migrator-config

Then a new file will be created in your config directory called: migrator.php and you can change the middleware which authenticates the user and also the route of the package is editable.

To read more about the Migrator package you can check out the documentation:
https://github.com/rezaamini-ir/migrator

Don't forget to contribute to the project and Star it ⭐️ :)).


This content originally appeared on DEV Community and was authored by Reza Amini


Print Share Comment Cite Upload Translate Updates
APA

Reza Amini | Sciencx (2021-09-14T17:02:48+00:00) Manage your Laravel migrations with 1 click!. Retrieved from https://www.scien.cx/2021/09/14/manage-your-laravel-migrations-with-1-click/

MLA
" » Manage your Laravel migrations with 1 click!." Reza Amini | Sciencx - Tuesday September 14, 2021, https://www.scien.cx/2021/09/14/manage-your-laravel-migrations-with-1-click/
HARVARD
Reza Amini | Sciencx Tuesday September 14, 2021 » Manage your Laravel migrations with 1 click!., viewed ,<https://www.scien.cx/2021/09/14/manage-your-laravel-migrations-with-1-click/>
VANCOUVER
Reza Amini | Sciencx - » Manage your Laravel migrations with 1 click!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/09/14/manage-your-laravel-migrations-with-1-click/
CHICAGO
" » Manage your Laravel migrations with 1 click!." Reza Amini | Sciencx - Accessed . https://www.scien.cx/2021/09/14/manage-your-laravel-migrations-with-1-click/
IEEE
" » Manage your Laravel migrations with 1 click!." Reza Amini | Sciencx [Online]. Available: https://www.scien.cx/2021/09/14/manage-your-laravel-migrations-with-1-click/. [Accessed: ]
rf:citation
» Manage your Laravel migrations with 1 click! | Reza Amini | Sciencx | https://www.scien.cx/2021/09/14/manage-your-laravel-migrations-with-1-click/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.