New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CreateDefaultStock migration exception #5240
Comments
copying the whole migrations from zero does not exhibit the issue though, closing. |
Calling for reopening, the current master does not deploy nor migrate on a clean database. Reason: |
temporary workaround: added |
This might be an upgrading issue, though. Even if it does not happen in a completely fresh Spree store, it shouldn't happen for someone upgrading from 2.4 to 3.0, so this should be fixed or at least mentioned in the guides. |
This should already have been fixed: |
run rake db:migrate After save callback :process_backorders has not been defined `== 20161109013338 CreateDefaultStock: migrating =============================== After save callback :process_backorders has not been defined ArgumentError: After save callback :process_backorders has not been defined /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:641:in block (2 levels) in skip_callback' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:637:in each'/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:637:in block in skip_callback' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:568:in block in __update_callbacks'/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:566:in reverse_each' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:566:in __update_callbacks'/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.1/lib/active_support/callbacks.rb:636:in skip_callback' /home/ypill/db/migrate/20161109013338_create_default_stock.spree.rb:10:in up'/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:792:in exec_migration' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:773:in block (2 levels) in migrate'/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:772:in block in migrate' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in with_connection'/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:771:in migrate' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration/compatibility.rb:121:in migrate'/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:951:in migrate' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:1212:in block in execute_migration_in_transaction'/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:1280:in block in ddl_transaction' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in block in transaction'/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/transaction.rb:189:in within_new_transaction' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in transaction'/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/transactions.rb:211:in transaction' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:1280:in ddl_transaction'/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:1211:in execute_migration_in_transaction' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:1184:in block in migrate_without_lock'/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:1183:in each' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:1183:in migrate_without_lock'/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:1134:in migrate' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:1006:in up'/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/migration.rb:984:in migrate' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:161:in migrate'`
|
@99cm Open class CreateDefaultStock < ActiveRecord::Migration
def up
....
# Spree::StockItem.skip_callback(:save, :after, :process_backorders)
....
end
....
end |
using master, in
stock_location.rb
we can find this callback:the migration:
this raises:
The text was updated successfully, but these errors were encountered: