{"repo":"evilmartians/evil-seed","free":true,"listed":false,"github":"https://github.com/evilmartians/evil-seed","clone":"git clone https://github.com/evilmartians/evil-seed.git","description":"A Gem for creating partial anonymized dumps of your database using your app model relations.","language":"Ruby","stars":566,"topics":["ruby","activerecord","rails","seeds","postgresql","mysql","database","database-dump","replication"],"license":"MIT","category":"databases-storage","readme_excerpt":"EvilSeed EvilSeed is a tool for creating partial anonymized dump of your database based on your app models. EvilSeed is built by Evil Martians , an American design and engineering consultancy for developer tools, AI, and cybersecurity startups . Motivation Using production-like data in your staging environment could be very useful, especially for debugging intricate production bugs. The easiest way to achieve this is to use production database backups. But that's not an option for rather large applications for two reasons: - production dump can be extremely large, and it just can't be dumped and restored in a reasonable time - you should care about sensitive data (anonymization). EvilSeed aims to solve these problems. Installation Add this line to your application's Gemfile: And then execute: $ bundle Or install it yourself as: $ gem install evil-seed Usage Configuration Creating dump Just call the #dump method and pass a path where you want your SQL dump file to appear! Caveats, tips, and tricks 1. Specify root s for dictionaries and system-wide models like Role at the top without constraints and with all associations excluded. 2. Use exclude aggressively. You will be amazed, how much your app's models graph is connected. This, in conjunction with the fact that this gem traverses associations in deep-first fashion, sometimes leads to unwanted results: some records will get into dump even if you don't want them. 3. Look at the resulted dump: there are some useful debug commen","default_branch":null,"files":null,"tree":[],"storefront":"/r/evilmartians","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/evilmartians/evil-seed/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}