Catch Migrations Up To Live Database

  eloquent, laravel

Kind of a backstory, I inherited a Laravel project that initially used migrations and Eloquent to handle schema changes on it’s database, but through the course of development the original developer decided it would be better to just ditch to migration workflow and directly make the changes to the schema via sql/ phpmyadmin and in code using the DB class.

As for the question, what would the best way be to return back to using migrations and Eloquent after all of these years of deviation?

I could:

  • Clear the original migrations and start over.
  • Try to update the models and create the new migrations while hoping it all works fine.

Are there any other, better methods for doing this?

Source: Laravel

Leave a Reply