# Database Migration error

**URL:** <https://www.ruby-forum.com/t/database-migration-error/164046>\
**Category:** Rails\
**Created:** [March 27, 2009, 8:42am UTC](https://www.ruby-forum.com/t/database-migration-error/164046 "2009-03-27T08:42:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![doelsengupta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cc9497/32.png) [@doelsengupta](https://www.ruby-forum.com/u/doelsengupta)\
**Post date:** [March 27, 2009, 8:42am UTC](https://www.ruby-forum.com/t/database-migration-error/164046/1 "2009-03-27T08:42:32Z")

</div>

This is my first post to the forum,  
when I try to run a migration that has a t.column, I get this:

rake aborted!  
undefined method `column’ for  
#ActiveRecord::ConnectionAdapters::TableDefinition:0x487c194

---

<div class="post-metadata">

**Author:** ![doelsengupta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cc9497/32.png) [@doelsengupta](https://www.ruby-forum.com/u/doelsengupta)\
**Post date:** [March 27, 2009, 12:17pm UTC](https://www.ruby-forum.com/t/database-migration-error/164046/2 "2009-03-27T12:17:00Z")

</div>

Can you supply some more code please, assuming it is not hundreds of  
lines  
then show us the migration .rb contents.

2009/3/27 Doel S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![doelsengupta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cc9497/32.png) [@doelsengupta](https://www.ruby-forum.com/u/doelsengupta)\
**Post date:** [March 27, 2009, 12:39pm UTC](https://www.ruby-forum.com/t/database-migration-error/164046/3 "2009-03-27T12:39:56Z")

</div>

On Fri, Mar 27, 2009 at 4:15 AM, Colin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > ## undefined method `column’ for #ActiveRecord::ConnectionAdapters::TableDefinition:0x487c194
> > 
> > Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

Which version of Rails are you using?

-Conrad

---

<div class="post-metadata">

**Author:** ![doelsengupta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cc9497/32.png) [@doelsengupta](https://www.ruby-forum.com/u/doelsengupta)\
**Post date:** [March 31, 2009, 2:03pm UTC](https://www.ruby-forum.com/t/database-migration-error/164046/4 "2009-03-31T14:03:34Z")

</div>

Conrad T. wrote:

> On Fri, Mar 27, 2009 at 4:15 AM, Colin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > > ## undefined method `column’ for #ActiveRecord::ConnectionAdapters::TableDefinition:0x487c194
> > > 
> > > Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> Which version of Rails are you using?
> 
> -Conrad

Rails 2.0.2

---

<div class="post-metadata">

**Author:** ![doelsengupta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cc9497/32.png) [@doelsengupta](https://www.ruby-forum.com/u/doelsengupta)\
**Post date:** [March 31, 2009, 2:03pm UTC](https://www.ruby-forum.com/t/database-migration-error/164046/5 "2009-03-31T14:03:00Z")

</div>

Colin L. wrote:

> Can you supply some more code please, assuming it is not hundreds of  
> lines  
> then show us the migration .rb contents.
> 
> 2009/3/27 Doel S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

I got it fixed by changing t.column to t. in my model.rb file

---

<div class="post-metadata">

**Author:** ![doelsengupta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cc9497/32.png) [@doelsengupta](https://www.ruby-forum.com/u/doelsengupta)\
**Post date:** [March 31, 2009, 3:36pm UTC](https://www.ruby-forum.com/t/database-migration-error/164046/6 "2009-03-31T15:36:46Z")

</div>

Doel S. wrote:

> I got it fixed by changing t.column to t. in my model.rb file

You might have been mixing syntaxes:

t.column :first\_name, :string

or

t.string :first\_name

will work
