I tried to change the schema.rb line (t.string should become t.text), but I cannot change it directly through the file, because when I use rake db: migrate, the changes return to the previous state.
How can I change this line?
EDIT: If I didn't understand anything, I have to edit the file inside db / migrate. In my case, this is 2010110801532_create_posts.rb, where exactly will I have to place the change_column part?
This is my 2010110801532_create_posts.rb
class CreatePosts < ActiveRecord::Migration
def self.up
create_table :posts do |t|
t.string :nome
t.string :titolo
t.text :contenuto
t.timestamps
end
end
def self.down
drop_table :posts
end
end
source
share