Files
openfoodnetwork/db/migrate/20190701002454_convert_string_fields_to_text.rb
Jon Leighton 4398ea12b8 Convert several fields from string to text
See discussion here:
https://github.com/openfoodfoundation/openfoodnetwork/pull/3751#issuecomment-503416955

Fixes #3192.

I have also done a pass over the schema to identify other fields which
would benefit from being a text rather than a string. However, I ignored
all `spree_*` tables because I didn’t want to mess up the ‘default’
Spree schema.
2019-07-09 13:11:30 +10:00

18 lines
651 B
Ruby

class ConvertStringFieldsToText < ActiveRecord::Migration
def up
change_column :enterprises, :description, :text
change_column :enterprises, :pickup_times, :text
change_column :exchanges, :pickup_time, :text
change_column :exchanges, :pickup_instructions, :text
change_column :exchanges, :receival_instructions, :text
end
def down
change_column :enterprises, :description, :string
change_column :enterprises, :pickup_times, :string
change_column :exchanges, :pickup_time, :string
change_column :exchanges, :pickup_instructions, :string
change_column :exchanges, :receival_instructions, :string
end
end