jackc / tern

The SQL Fan's Migrator
MIT License
925 stars 68 forks source link

Confirmation step for production #41

Open jackc opened 2 years ago

jackc commented 2 years ago

It might be nice to optionally have some sort of guard rail or required confirmation step for production migrations. I typically use ctrl+r to get my migrate command from my shell history. It is too easy to accidentally get and run the production migrate command when wanting to migrate development.

It would be nice to have a confirmation step that required typing the name of the environment.

This could be toggled in the config files locally or with a special table remotely. Local config might be simpler, but it could be more difficult when deploy target is determined by environment variable or program argument. Also, if it was a remote table it could not be bypassed as easily.