Support the ongoing development of Laravel.io →
Configuration Database
Last updated 2 years ago.
0

You probably can disable them, but why wouldn't you want to run the migrations on production? How else would you update the db schema?

Last updated 2 years ago.
0

I do want to be able to run migrations, but I want to make it hard for example to refresh the migrations by accident on the production env and not the development server.

Last updated 2 years ago.
0

Instead of making it hard, I'd get a proper deployment system set up that then deals with your migrations automatically. Rocketeer and Capistrano come to mind. That way you wouldn't have any reason to run these commands directly on production.

Last updated 2 years ago.
0

I've created a blank file on the server (outside the project root) and in my migration file I check if this file exists, if it does I skip the migration ;)

Last updated 2 years ago.
0

shabushabu said:

Instead of making it hard, I'd get a proper deployment system set up that then deals with your migrations automatically. Rocketeer and Capistrano come to mind. That way you wouldn't have any reason to run these commands directly on production.

Thanks! I'll look into rocketeer! Scanned the website and it seems to be what I was looking for.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.