Created
September 21, 2011 15:38
-
-
Save jasonroelofs/1232407 to your computer and use it in GitHub Desktop.
Quick script to use the ar_dbcopy gem for moving data between databases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Script to copy over data from mysql to postgres | |
# | |
# gem install ar_dbcopy --ignore-dependencies | |
# | |
# db_copy.yml needs to look like: | |
# | |
# source: | |
# adapter: mysql | |
# host: localhost | |
# username: root | |
# password: | |
# database: bloomfire_dev | |
# | |
# target: | |
# adapter: postgresql | |
# host: localhost | |
# username: | |
# password: | |
# database: bloomfire_dev | |
## | |
require 'rubygems' | |
require 'mysql' | |
require 'pg' | |
require 'ar_dbcopy' | |
ARDBCopy.new("db_copy.yml").run! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment