Sha256: 735f32bb1ed72a4245210c6bfdeb0e33075ae3c9bbadcd328027b73ea06f0646

Contents?: true

Size: 465 Bytes

Versions: 4

Compression:

Stored size: 465 Bytes

Contents

namespace :db do
  desc 'Dump all database'
  task :dump do
    list = Rake::Task.tasks.map(&:name)
    %w(mysql:dump postgresql:dump mongodb:dump).each do |name|
      Rake::Task[name].execute if list.include?(name)
    end
  end

  desc 'Restore all database'
  task :restore do
    list = Rake::Task.tasks.map(&:name)
    %w(mysql:restore postgresql:restore mongodb:restore).each do |name|
      Rake::Task[name].execute if list.include?(name)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
h2ocube_rails_tasks-0.0.14 lib/h2ocube_rails_tasks/tasks/db.rb
h2ocube_rails_tasks-0.0.13 lib/h2ocube_rails_tasks/tasks/db.rb
h2ocube_rails_tasks-0.0.12 lib/h2ocube_rails_tasks/tasks/db.rb
h2ocube_rails_tasks-0.0.11 lib/h2ocube_rails_tasks/tasks/db.rb