{"repo":"IFTTT/polo","free":true,"listed":false,"github":"https://github.com/IFTTT/polo","clone":"git clone https://github.com/IFTTT/polo.git","description":"Polo travels through your database and creates sample snapshots so you can work with real world data in development.","language":"Ruby","stars":789,"topics":["database","snapshot","productivity","activerecord"],"license":"MIT","category":"databases-storage","readme_excerpt":"Polo Polo travels through your database and creates sample snapshots so you can work with real world data in any environment. Polo takes an ActiveRecord::Base seed object and traverses every whitelisted ActiveRecord::Association generating SQL INSERTs along the way. You can then save those SQL INSERTS to .sql file and import the data to your favorite environment. Motivation Read our blog post or check out this presentation. Usage Given the following data model: Simple ActiveRecord Objects Where Chef is the seed object class, and 1 is the seed object id. Simple Associations Complex nested associations Advanced Usage Occasionally, you might have a dataset that you want to refresh. A production database that has data that might be useful on your local copy of the database. Polo doesn't have an opinion about your data; if you try to import data with a key that's already in your local database, Polo doesn't necessarily know how you want to handle that conflict. Advanced users will find the on duplicate option to be helpful in this context. It gives Polo instructions on how to handle collisions. Note: This feature is currently only supported for MySQL databases. (PRs for other databases are welcome!) There are two possible values for the on duplicate key: :ignore and :override . Ignore keeps the old data. Override keeps the new data. If there's a collision and the on duplicate param is not set, Polo will simpy stop importing the data. Ignore A.K.A the Ostrich Approach: stick your h","default_branch":null,"files":null,"tree":[],"storefront":"/r/IFTTT","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/IFTTT/polo/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."}