Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best alternative for data fixes in rails?

When a rails project grows a lot, you can find yourself having trouble with fixes for the data in the production database.

I have normally used migrations or specific rake tasks for this, but I was wondering if a system similar to migrations existed for keeping the database fixes and run them when needed.

like image 875
fuzzyalej Avatar asked Jan 31 '26 20:01

fuzzyalej


1 Answers

I know you probably figured this out by now but there IS a gem for this... it is called datafix

https://github.com/Casecommons/datafix

basically you create a datafix, like a migration, and a spec for it, then you can run it as needed on the server.

like image 116
jeffsaracco Avatar answered Feb 03 '26 09:02

jeffsaracco



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!