Answer the question
In order to leave comments, you need to log in
How to make a migration to production without affecting the database rows?
Created another migration file that adds a column to the db table. I do php artisan migrate on the local server, the last migration rolls, everything is fine. I do the same thing on the prod server, it rolls out the error "Base table or view already exists". That is, it runs the previous migration files, not just the latest one - the new one. How to deal with this, roll migrations and, most importantly, not lose data from the database
Answer the question
In order to leave comments, you need to log in
check the migrations table in the sales database and update it with data from the locale if anything
Perhaps you just copied the dump to production without the migrations table, which stores the order in which migrations are performed. Create it and fill it in likeness from the local database.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question