thoughtbot / parity

Shell commands for development, staging, and production parity for Heroku apps
https://thoughtbot.com
MIT License
895 stars 57 forks source link

Post restore tasks #127

Closed jfilipe closed 7 years ago

jfilipe commented 7 years ago

Hi there,

When I'm copying the production db to staging or development, I'd like to kick off an obfuscation process. Changing users email addresses, resetting password hashes and removing any sensitive PII data. Does parity allow for any hooks to run post restore? Like executing some sql or kicking off a rake task?

geoffharcourt commented 7 years ago

Hi!

We don't have any feature to allow custom post-process hooks. Since the obfuscation process is (I assume?) app-dependent, it's probably easiest to do this by making a shell script that executes the restore and then runs the obfuscation for your chosen remote environment.

If there's an easy way to do this in Parity that isn't language or framework dependent maybe we could discus a PR, but I'm wary of expanding the footprint of Parity or making it more coupled to Rails than it currently is.