Fixes typo in migration name.

This commit is contained in:
Martin Edenhofer 2012-12-28 01:16:01 +01:00
parent 5d6b60af26
commit de0ec82d48

View file

@ -275,26 +275,26 @@ class Package < ApplicationModel
# down
if direction == 'reverse'
done = Package::Migration.where( :name => name, :version => version ).first
done = Package::Migration.where( :name => package, :version => version ).first
next if !done
puts "NOTICE: down package migration '#{migration}'"
load "#{location}/#{migration}"
classname = name.camelcase
Kernel.const_get(classname).down
record = Package::Migration.where( :name => name, :version => version ).first
record = Package::Migration.where( :name => package, :version => version ).first
if record
record.destroy
end
# up
else
done = Package::Migration.where( :name => name, :version => version ).first
done = Package::Migration.where( :name => package, :version => version ).first
next if done
puts "NOTICE: up package migration '#{migration}'"
load "#{location}/#{migration}"
classname = name.camelcase
Kernel.const_get(classname).up
Package::Migration.create( :name => name, :version => version )
Package::Migration.create( :name => package, :version => version )
end
}
end