Sha256: 566e3b744f640ec94be89f3ff49fc6c13b4d6f9c2719d340c9523b68617b9fe0

Contents?: true

Size: 555 Bytes

Versions: 1

Compression:

Stored size: 555 Bytes

Contents

namespace :db do
  namespace :fourth_base do
    task "drop:_unsafe" do
      FourthBase.on_base { Rake::Task['db:drop:_unsafe'].execute }
    end

    namespace :migrate do
      task :reset => ['db:fourth_base:drop:_unsafe', 'db:fourth_base:create', 'db:fourth_base:migrate']
    end
  end
end

%w{
  drop:_unsafe
}.each do |name|
  task = Rake::Task["db:#{name}"] rescue nil
  next unless task && FourthBase::Railtie.run_with_db_tasks?
  task.enhance do
    Rake::Task["db:load_config"].invoke
    Rake::Task["db:fourth_base:#{name}"].invoke
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fourthbase-2.1.2 lib/fourth_base/databases_rails_five.rake