Make stock locations backorderable_default false.

This is required because when the default stock location is created, the backorderable_default column doesnt exist and when this column is created, the initial default is true. This is why we need to force it to false here. This column is the default value for on_demand which must be false.
This commit is contained in:
luisramos0
2019-05-06 20:56:19 +01:00
parent 7e9a149c8d
commit 189865fd80
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
class UpdateStockLocationsBackorderableDefault < ActiveRecord::Migration
def change
Spree::StockLocation.update_all(backorderable_default: false)
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20190504151144) do
ActiveRecord::Schema.define(:version => 20190506194625) do
create_table "adjustment_metadata", :force => true do |t|
t.integer "adjustment_id"