Sha256: 5cb0ba89815a93d42d9cbc022bfc4f90b4083c4c2fb136a582eaf0145fe0fd22
Contents?: true
Size: 1.3 KB
Versions: 45
Compression:
Stored size: 1.3 KB
Contents
module Wordmove module Deployer module Ssh class DefaultSqlAdapter < SSH private def backup_remote_db! download_remote_db(local_gzipped_backup_path) end def adapt_local_db! save_local_db(local_dump_path) adapt_sql(local_dump_path, local_options, remote_options) run compress_command(local_dump_path) import_remote_dump(local_gzipped_dump_path) end def after_push_cleanup! local_delete(local_gzipped_dump_path) end def backup_local_db! save_local_db(local_backup_path) run compress_command(local_backup_path) end def adapt_remote_db! download_remote_db(local_gzipped_dump_path) run uncompress_command(local_gzipped_dump_path) adapt_sql(local_dump_path, remote_options, local_options) run mysql_import_command(local_dump_path, local_options[:database]) end def after_pull_cleanup! local_delete(local_dump_path) end def adapt_sql(save_to_path, local, remote) return if options[:no_adapt] logger.task_step true, "Adapt dump" SqlAdapter::Default.new(save_to_path, local, remote).adapt! unless simulate? end end end end end
Version data entries
45 entries across 45 versions & 1 rubygems