require "logger" require "minitest/test_task" Minitest::TestTask.create namespace :db do desc "Run migrations" task :migrate, [:version] do |t, args| require_relative "db" require "sequel/core" Sequel.extension :migration version = args[:version].to_i if args[:version] Sequel::Migrator.run(DB, "db/migrations", target: version, use_transactions: true) end end