0

When creating a model in Rails, I forgot to add a column "strong text" that I want. How can I add it to the model later?

CSDev
  • 3,177
  • 6
  • 19
  • 37

2 Answers2

1

in your command line rails g migration add_strong_text_to_model strong_text:string and rake db:migrate

duplicate of this

Abhishek Aravindan
  • 1,432
  • 6
  • 23
0

Write a migration on console/terminal as follows:

rails g migration AddColumnToModel column_name:column_type

then run migration console/terminal as:

rake db:migrate
404-Err
  • 59
  • 7