0

I'm trying to convert a column from being :string to being :text non destructively.

Is there a straightforward method? It's PostgreSQL on Heroku.

Thanks! Chris.

cjm2671
  • 18,348
  • 31
  • 102
  • 161

1 Answers1

1

You can use the change_column in another migration

  • change_column(table_name, column_name, type, options): Changes the column to a different type using the same parameters as add_column.

Sourced from: http://api.rubyonrails.org/classes/ActiveRecord/Migration.html & http://apidock.com/rails/ActiveRecord/ConnectionAdapters/SchemaStatements/change_column

jamesy829
  • 428
  • 4
  • 7