My team frequently uses the production DB for testing new changes and on more than one occasion migrations have been created and applied before being code reviewed, creating issues in production.
There are so many things wrong with this situation, but I'm hoping to at least protect our prod DB by blocking migrations based on the state of an environment variable. Is this possible?