Migration doesn't know if it's being run on production or local environment, so whatever action you see on local environment you'll see it in production.
What happens when you run migrations on your production server?
I'm getting ready to deploy my first Laravel site to production in the next week or two and I had a question with regards to migrations which is probably silly but I havent really got my head round it.
Does my database get wiped when I run the migrations on my production server and then re-created based on the migrations ie I end up with the same structure but sans any data that was through user entry on the site?
The only migrations run are ones that have not been run before for that database. Laravel keeps track of the ones that have been run in the migrations table that it makes.
The only reason data/tables would be deleted is if you ran artisan migrate:rollback or artisan migrate:reset, which I do not recommend doing on a production database. Ever. Typically it not realistic to revert migrations in that type of environment.
Please or to participate in this conversation.