Sha256: effeba5aa4ad3b79bdab58cd2463c7dbb1cd1f9fa446a7ba321546ff08161b62
Contents?: true
Size: 537 Bytes
Versions: 9
Compression:
Stored size: 537 Bytes
Contents
module ActiveRecord::MysqlBackup def purge config = instance_variable_get("@config").easy_access recreate_database(config.database) end def sqldump(file) config = instance_variable_get("@config").easy_access cmd_opts = "" cmd_opts << "-h #{config.host} " if config.host? cmd_opts << "-u #{config.username} " if config.username? cmd_opts += "-p#{config.password} " if config.password? cmd = "mysqldump #{cmd_opts} #{config.database} > #{file}" STDERR.puts cmd `#{cmd}` end end
Version data entries
9 entries across 9 versions & 1 rubygems