Sha256: ff3304395f6dfb25ac3272cd529bd85fa8dc7b8c1648008f4b2b6d516a3c829f

Contents?: true

Size: 664 Bytes

Versions: 9

Compression:

Stored size: 664 Bytes

Contents

# This migration comes from spree (originally 20120929093553)
class RemoveUnusedPreferenceColumns < ActiveRecord::Migration[4.2]
  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 ApplicationRecord.connection.column_exists?(:spree_preferences, :name)
    remove_column :spree_preferences, :owner_id   if ApplicationRecord.connection.column_exists?(:spree_preferences, :owner_id)
    remove_column :spree_preferences, :owner_type if ApplicationRecord.connection.column_exists?(:spree_preferences, :owner_type)
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
spree_purchase_order-3.7.0 spec/dummy/db/migrate/20191113195714_remove_unused_preference_columns.spree.rb
spree_billing_sisow-0.9.2 spec/dummy/db/migrate/20190729091655_remove_unused_preference_columns.spree.rb
spree_billing_sisow-0.9.1 spec/dummy/db/migrate/20190729091655_remove_unused_preference_columns.spree.rb
spree_purchase_order-3.6.0 spec/dummy/db/migrate/20180516181843_remove_unused_preference_columns.spree.rb
spree_purchase_order-3.5.0 spec/dummy/db/migrate/20180516181843_remove_unused_preference_columns.spree.rb
spree_purchase_order-3.5.0.rc1 spec/dummy/db/migrate/20180516181843_remove_unused_preference_columns.spree.rb
spree_purchase_order-3.4.0 spec/dummy/db/migrate/20180516181843_remove_unused_preference_columns.spree.rb
spree_purchase_order-3.3.0 spec/dummy/db/migrate/20180516181843_remove_unused_preference_columns.spree.rb
spree_purchase_order-3.2.0 spec/dummy/db/migrate/20180516181843_remove_unused_preference_columns.spree.rb