Database Migration error


#1

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


#2

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


#3

On Fri, Mar 27, 2009 at 4:15 AM, Colin L. removed_email_address@domain.invalid
wrote:

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

Posted via http://www.ruby-forum.com/.

Which version of Rails are you using?

-Conrad


#4

Conrad T. wrote:

On Fri, Mar 27, 2009 at 4:15 AM, Colin L. removed_email_address@domain.invalid
wrote:

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

Posted via http://www.ruby-forum.com/.

Which version of Rails are you using?

-Conrad

Rails 2.0.2


#5

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

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


#6

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