mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
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.
18 lines
651 B
Ruby
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
|