namespace :qi do
  desc "TODO"
  task migrate_all: :environment do
    
    
    puts "test"
    Dir["#{Rails.root.join('db','migrate')}/*"].sort.each do |mf|
      version = mf.split('/')[-1].split('_')[0]
      puts version
      ENV['VERSION'] = version
      Rake::Task["db:migrate"].execute
      
      sleep(10)
    end
    
    
  end

end
