Sha256: 5ea87cd99a88091b4535bf99d8a7b98a48ecaa566d8cf0a6c8009e537a706d23

Contents?: true

Size: 861 Bytes

Versions: 120

Compression:

Stored size: 861 Bytes

Contents

class RenameHasAndBelongsToAssociationsToModelNames < ActiveRecord::Migration[4.2]
  def change
    {
      'spree_option_types_prototypes' => 'spree_option_type_prototypes',
      'spree_option_values_variants' => 'spree_option_value_variants',
      'spree_orders_promotions' => 'spree_order_promotions',
      'spree_products_promotion_rules' => 'spree_product_promotion_rules',
      'spree_taxons_promotion_rules' => 'spree_promotion_rule_taxons',
      'spree_promotion_rules_users' => 'spree_promotion_rule_users',
      'spree_properties_prototypes' => 'spree_property_prototypes',
      'spree_taxons_prototypes' => 'spree_prototype_taxons',
      'spree_roles_users' => 'spree_role_users',
      'spree_shipping_methods_zones' => 'spree_shipping_method_zones'
    }.each do |old_name, new_name|
      rename_table old_name, new_name
    end
  end
end

Version data entries

120 entries across 120 versions & 1 rubygems

Version Path
spree_core-4.0.9 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.1.15 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.2.7 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.3.3 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.2.6 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.3.2 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.3.1 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.3.0 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.3.0.rc3 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.3.0.rc2 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.3.0.rc1 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.2.5 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.1.14 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.0.8 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.2.4 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-3.7.14.1 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.2.3.1 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.1.13.1 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.0.7.1 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb
spree_core-4.2.3 db/migrate/20150726141425_rename_has_and_belongs_to_associations_to_model_names.rb