Published 6 days ago by yocmen
hi, my question is related with how i manage the flow of my project (git) and migration in laravel, on local dev o can migrate.. refresh... etc... but what about for production enviroment? how can i make the new changes (on existing tables or new tables) without affect my current data??? thanks.
You you need to create a migration for each change to your database. New migrations include for example an extra column in your users table. You should never run
php artisan migrate:fresh on production, because it will delete everything and create everything again. You can only run
php artisan migrate. Your migrations should never delete data, unless it's a table or column you don't use anymore!