lib/pave/database.rb in pave-0.6.2 vs lib/pave/database.rb in pave-0.6.3

- old
+ new

@@ -41,11 +41,12 @@ def remote_url(remote="live") "#{Pave::Remote.server(remote)}:#{Pave::Remote.directory(remote)}" end def dump_file(which_db) - "#{Time.now.strftime("%Y-%m-%d")}-#{name}-#{which_db}.sql.gz" + @dump_file_name ||= {} + @dump_file_name[which_db] ||= "#{Time.now.strftime("%Y-%m-%d_%H-%M-%S")}-#{name}-#{which_db}.sql.gz" end def dump if !File.directory?('db') sh "mkdir ./db" @@ -92,9 +93,10 @@ def push(remote="live") # Upload the project's local database and replace the live database. dump dump_remote(remote) # for backup purposes + download(remote) upload(remote) execute_remote(remote) end def pull(remote="live")