This is what happened to me.
I realized that the string field that I had in the table is not enough to store its contents, so I created a migration containing:
def self.up change_column :articles, :author_list, :text end
However, after the migration, the scheme had:
create_table "articles", :force => true do |t| t.string "title" t.text "author_list", :limit => 255 end
That was not OK . So, I redid the migration as follows:
def self.up # careful, it "nil", not "null" change_column :articles, :author_list, :text, :limit => nil end
This time the limit ended in schema.rb:
create_table "articles", :force => true do |t| t.string "title" t.text "author_list" end
Giuseppe Dec 29 '10 at 2:08 a.m. 2010-12-29 14:08
source share