Class: SolidusLegacyPromotions::Migrations::PromotionWithCodeHandlers::RaiseException

Inherits:
Base
  • Object
show all
Defined in:
lib/solidus_legacy_promotions/migrations/promotions_with_code_handlers.rb

Instance Attribute Summary

Attributes inherited from Base

#migration_context, #promotions

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from SolidusLegacyPromotions::Migrations::PromotionWithCodeHandlers::Base

Instance Method Details

#callObject

Raises:

  • (StandardError)


22
23
24
25
26
27
28
29
30
31
32
# File 'lib/solidus_legacy_promotions/migrations/promotions_with_code_handlers.rb', line 22

def call
  # Please note that this will block the current migration and rollback all
  # the previous ones run with the same "rails db:migrate" command.
  #
  raise StandardError, "You are trying to drop 'code' column from "\
    "spree_promotions table but you have at least one record with that "\
    "column filled. Please take care of that or you could lose data. See:" \
    "\n" \
    "https://github.com/solidusio/solidus/pull/3028"\
    "\n"
end