-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent GreenField from being used in production mode #47
Comments
Might be hard for GWM to detect if it's running in production or not. Maybe there needs to be an explicit option to allow clean to make it harder to deploy GreenField to production? |
Not sure if i know what @mattiasnordqvist intends with #22, but i would assume that it involves deconstructing modes into separate actions so that one could compose what you want the migrator to do. In that case "clean" could maybe become something that is turned on only during development like this if (env.IsDevelopment())
{
migrator.EnableClean();
} |
I'm thinking we could run some checks before doing anything at all. So if I'd like to allow running greenfield on my own personal development computer, I must make sure to pass my sql servers hostname as a parameter, either through console input or a config file. That way, if my dev-config-file accidently gets deployed to a production server, the configuration of allowed greenfield connectionstrings won't match up with the database it is connected to. This will require some more initial setup (adding your server-name to the appconfig) before you can start developing, but I think its ok. At least it is better than accidently running greenfields destroy database in production. :) |
In one of the project that I work on we managed to forget to switch to LiveField before deploying the app to production. Now that we need to change from GreenField to LiveField we don't have a clear way of doing this. It would be nice if we could somehow prevent us, or at least make it a concious choice of the developer, from deploying to production while Galactic Waste is configured with GreenField.
The text was updated successfully, but these errors were encountered: