Sha256: 6f941598dd44fbd9eab1832aabf209b21a77fdf778fafa47aa42810377915fc2
Contents?: true
Size: 473 Bytes
Versions: 1
Compression:
Stored size: 473 Bytes
Contents
namespace :db do desc "Run Sequel migrations" task :migrate => :environment, [:version] do |t, args| Sequel.extension :migration db = Sequel.connect(ENV.fetch("DATABASE_URL")) if args[:version] puts "Migrating to version #{args[:version]}" Sequel::Migrator.run(db, "#{$app_root}/db/migrations", target: args[:version].to_i) else puts "Migrating to latest" Sequel::Migrator.run(db, "#{$app_root}/db/migrations") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
daiku-0.2.0 | lib/daiku/plugins/sequel/_templates/db.rake.tt |