Created
September 22, 2014 18:21
-
-
Save replaid/5ed66edef03847e246b5 to your computer and use it in GitHub Desktop.
Save test data into tab-separated files.
This file contains 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
ActiveRecord::Base.connection.tables.each do |table_name| | |
ActiveRecord::Base.connection.execute("select * from #{table_name} into outfile '/tmp/datadump-#{table_name}.outfile'") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment