Skip to content
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

[ADD] clean_transient_models #363

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

MiquelRForgeFlow
Copy link
Contributor

@MiquelRForgeFlow MiquelRForgeFlow commented Apr 5, 2024

clean_transient_models

Clean transient models to prevent possible issues due to chained data.

To be run at the base post-migration script for having a general scope.Only works on > v8.

Used in OCA/OpenUpgrade#4374.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StefanRijnhart is it OK for you?

@StefanRijnhart
Copy link
Member

Because model._transient_clean_rows_older_than uses a browse on the target model, is it not the case that, when called in the base module's migration script, this fails for any model not defined in the base module of the upgrade target version? As such, would it not be much more useful to implement the cleaning using SQL?

@MiquelRForgeFlow MiquelRForgeFlow force-pushed the master-add-clean_transient_models branch from 23c488f to d7c777a Compare April 5, 2024 08:23
@MiquelRForgeFlow MiquelRForgeFlow force-pushed the master-add-clean_transient_models branch from d7c777a to 3388a12 Compare April 5, 2024 09:04
@MiquelRForgeFlow MiquelRForgeFlow force-pushed the master-add-clean_transient_models branch 2 times, most recently from 17e0400 to e3967f2 Compare April 5, 2024 09:20
@MiquelRForgeFlow MiquelRForgeFlow force-pushed the master-add-clean_transient_models branch from e3967f2 to a827831 Compare April 5, 2024 09:47
@pedrobaeza pedrobaeza merged commit a6a665a into OCA:master Apr 5, 2024
2 checks passed
@MiquelRForgeFlow MiquelRForgeFlow deleted the master-add-clean_transient_models branch April 5, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants