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
|
# down
|
||||||
if direction == 'reverse'
|
if direction == 'reverse'
|
||||||
done = Package::Migration.where( :name => name, :version => version ).first
|
done = Package::Migration.where( :name => package, :version => version ).first
|
||||||
next if !done
|
next if !done
|
||||||
puts "NOTICE: down package migration '#{migration}'"
|
puts "NOTICE: down package migration '#{migration}'"
|
||||||
load "#{location}/#{migration}"
|
load "#{location}/#{migration}"
|
||||||
classname = name.camelcase
|
classname = name.camelcase
|
||||||
Kernel.const_get(classname).down
|
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
|
if record
|
||||||
record.destroy
|
record.destroy
|
||||||
end
|
end
|
||||||
|
|
||||||
# up
|
# up
|
||||||
else
|
else
|
||||||
done = Package::Migration.where( :name => name, :version => version ).first
|
done = Package::Migration.where( :name => package, :version => version ).first
|
||||||
next if done
|
next if done
|
||||||
puts "NOTICE: up package migration '#{migration}'"
|
puts "NOTICE: up package migration '#{migration}'"
|
||||||
load "#{location}/#{migration}"
|
load "#{location}/#{migration}"
|
||||||
classname = name.camelcase
|
classname = name.camelcase
|
||||||
Kernel.const_get(classname).up
|
Kernel.const_get(classname).up
|
||||||
Package::Migration.create( :name => name, :version => version )
|
Package::Migration.create( :name => package, :version => version )
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue