Fixes typo in migration name.
This commit is contained in:
parent
5d6b60af26
commit
de0ec82d48
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue