Migration problem


I seem to have a fundamental misunderstaning or Rake, Ruby, or
Migrations.(or perhaps all three)

I have done dozens of simple Migrations with just a self.up and
self.down... Now I have one that is more complex and I want to call
other methods within the migration.. but it doesn't work...
Here is my self.up:
  def self.up

here is the error message:
undefined method `drop_old_tables' for

I have a drop_old_tables method defined lower down.

Thanks in anticipation for any help


I figured it out myself!

All the methods must be class methods as there is no instance I
ie self.drop_old_tables etc.


giorgio wrote:

Make sure the other methods are defined on the same class and as class
methods with "def self.x"


giorgio wrote: