lib/tasks/sequel/rollback_missing_migrations.rake in umbrellio-sequel-plugins-0.7.0.52 vs lib/tasks/sequel/rollback_missing_migrations.rake in umbrellio-sequel-plugins-0.8.0.73
- old
+ new
@@ -8,11 +8,11 @@
# Extract migrations
def extract_migrations(path)
Dir.glob("#{path}/db/migrate/*.rb").map { |filename| File.basename(filename).to_i }
end
- old_migrations = extract_migrations(ENV["OLD_RELEASE"])
- new_migrations = extract_migrations(ENV["NEW_RELEASE"])
+ old_migrations = extract_migrations(ENV.fetch("OLD_RELEASE"))
+ new_migrations = extract_migrations(ENV.fetch("NEW_RELEASE"))
migrations_to_rollback = old_migrations - new_migrations
next if migrations_to_rollback.empty?
puts "Rolling back migrations:"