[Rails] Where is create_table method defined?

G

grz01

Hi

When scaffolding a model with Rails, you will get a migration file,
say 001_create_items.rb
that looks something like this:

class CreateItems < ActiveRecord::Migration
def self.up
create_table :items do |t|
...
end
end

def self.down
drop_table :items
end
end

My question is: Where is this method 'create_table' defined in Rails?
I was expecting to find it in the superclass ActiveRecord::Migration
which I think is defined in file .../lib/active_record/migration.rb
But I cannot find it there.

Anyone has a clue?

TIA
------------- grz01
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top