# Where is create\_table method defined?

**URL:** <https://www.ruby-forum.com/t/where-is-create-table-method-defined/196593>\
**Category:** Ruby\
**Created:** [February 9, 2008, 4:50am UTC](https://www.ruby-forum.com/t/where-is-create-table-method-defined/196593 "2008-02-09T04:50:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 9, 2008, 4:50am UTC](https://www.ruby-forum.com/t/where-is-create-table-method-defined/196593/1 "2008-02-09T04:50:43Z")

</div>

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
