Files
openfoodnetwork/db/migrate/20130207043542_remove_unused_preference_columns.spree.rb
2013-02-07 15:58:15 +11:00

10 lines
662 B
Ruby

# This migration comes from spree (originally 20120929093553)
class RemoveUnusedPreferenceColumns < ActiveRecord::Migration
def change
# Columns have already been removed if the application was upgraded from an older version, but must be removed from new apps.
remove_column :spree_preferences, :name if ActiveRecord::Base.connection.column_exists?(:spree_preferences, :name)
remove_column :spree_preferences, :owner_id if ActiveRecord::Base.connection.column_exists?(:spree_preferences, :owner_id)
remove_column :spree_preferences, :owner_type if ActiveRecord::Base.connection.column_exists?(:spree_preferences, :owner_type)
end
end