wms
wms copied to clipboard
[IMP] stock_available_to_promise_release: Improve migration/init script to initialize 'release_policy' field with default values
The upgrade script should initialize the value with the sql default instead updating every existing record (maybe billions).
@jbaudoux @mt-software-de
This is the magic:
Many thanks yes this was missing. Why did not set the release_policy as it is done here? https://github.com/OCA/wms/blob/111d87780457fa740dc0cc5609c47ab26be5916d/stock_available_to_promise_release/migrations/16.0.3.1.0/post-migrate.py#L5
Many thanks yes this was missing. Why did not set the release_policy as it is done here?
https://github.com/OCA/wms/blob/111d87780457fa740dc0cc5609c47ab26be5916d/stock_available_to_promise_release/migrations/16.0.3.1.0/post-migrate.py#L5
Here, I initialize the field with the default value, so, it should be done in pre script.
I've put it also in pre-init as the module can be installed on huge database too
Many thanks yes this was missing. Why did not set the release_policy as it is done here? https://github.com/OCA/wms/blob/111d87780457fa740dc0cc5609c47ab26be5916d/stock_available_to_promise_release/migrations/16.0.3.1.0/post-migrate.py#L5
Here, I initialize the field with the default value, so, it should be done in pre script.
I've put it also in pre-init as the module can be installed on huge database too
Many thanks yes this was missing. Why did not set the release_policy as it is done here? https://github.com/OCA/wms/blob/111d87780457fa740dc0cc5609c47ab26be5916d/stock_available_to_promise_release/migrations/16.0.3.1.0/post-migrate.py#L5
Here, I initialize the field with the default value, so, it should be done in pre script.
I've put it also in pre-init as the module can be installed on huge database too
Yes i have seen this, but why we don't remove the post_migration and moving the post_migration part into the new init method?
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.