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.
I feel embarrased that this is the second follow up of my last
migration: https://github.com/openfoodfoundation/openfoodnetwork/pull/3126
The last migration didn't change any database structure, but the schema
still needs the latest migration version. Otherwise it will display
pending migrations when setting up the database.
This commit allows to run `bundle exec rake db:reset` in development
without the following message:
Run `rake db:migrate` to update your database then try again.
You have 1 pending migrations:
20181123012635 AssociateCustomersToUsers
The next pull request with a migration would have solved this problem as
well.
This adds a data migration to fix those cases. It defaults to showing
1 unit of the specified weight. That is, if the user chose Kg, it'll
display 1 as unit.
Note that migration logs the process in a log/migrate.log file separate
from the regular Rails log/production.log file.
When you run the migration you'll see something like:
Fixing variants missing unit_value...
Processing variant 12...
Succesfully fixed variant 12
Done!
This helps auditing the changes applied and debug any possible failure
scenarios. You can delete it once all is ok.
* master: (125 commits)
Fix syntax error in GETTING_STARTED.md
Fix syntax error in README.md
Fix link syntax errors in REAME.md and GETTING_STARTED.md
Style recently merged code
Update gem i18n-js to pick up locale changes
Fix embedded shopfront menu responsiveness
Add communications links to README
Fix script/setup by making it less clever
Change import and reset logic to work with first page
Move options to first page
Fix wrong sort predicates in customer index
Reset reverse when clicking another column to sort
Move logic for toggling by column into SortOptions
Generalize sorting through SortOptions service
Remove unused sorting preferences in ColumnsCtrl
Fix frontend sorting in "Bulk Order Management"
Fix frontend sorting in "Customers" index
Change sorting to be done in ascending order first
Wrap rows in customer index with TBODY tag
Update .rubocop_todo.yml
...
* master: (206 commits)
embedded groups layout changes
embedded groups initial test
Allow html requests for OrderCycleController#update
Move applicator calls to OrderCycleForm
Refactor OrderCycleForm to make logic clearer
Extract schedule syncing logic into OrderCycleForm
Add basic specs for OrderCyclesController#create
Add basic OrderCycleForm to handle create/update logic
Remove unnecessary respond_to blocks from OrderCyclesController
Include admin users as managers on new enterprises
Remove obsolete goWithoutHashFragments
Simplify Navigation.go, not preserving hash fragments
Only show change warning for open order cycles
Use a SubscriptionsCount query object to provide counts to IndexOrderCycleSerializer
Preload subscription counts for serialization in order cycle collection actions
Request the subscription count for change warning each time, don't cache
Ask user to confirm oc date change for open order cycles with subsciptions
Fix ordering of Gemfile.lock
Add rack-rewrite to handle redirects
Renames product bulk edit action to index
...