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

[15.0][MIG] database_cleanup #2219

Closed
wants to merge 96 commits into from

Conversation

damdam-s
Copy link
Member

@damdam-s damdam-s commented Dec 3, 2021

based on #1990

Stefan Rijnhart and others added 30 commits December 3, 2021 12:12
avoid ''NoneType' object has no attribute 'exists'' error when purging models
fix my change [email protected], wrong lines replaced...
    raw SQL query (but never read afterwards). Workaround for
    lp:1277899

[FIX] Preserve dangling workflow table which is in use

[RFR] Group models per table when detecting columns to purge
      to prevent problems with models sharing the same table

[ADD] Allow purging of dangling data entries

[FIX] Data purging now working

[IMP] Docstrings

[FIX] Label
[FIX] Catch attempt to unlink field from nonexisting model

[RFR] Flake8
[CHG] database_cleanup: move description to README.rst
[IMP] order wizard lines by name

[IMP] deal with modules whose models can't be loaded

[IMP] double quotes for docstring

[FIX] use exists query instead of huge in list

[IMP] hide unnecessary buttons in wizard II

[IMP] readability

[FIX] cope with purging nonexisting models
[ADD] test purging modules

[ADD] test purging tables
[FIX] database_cleanup reloads the registry

which has weird side effects during testing. Take care
database_cleanup's tests don't mess up the following tests
* [FIX] database_cleanup: Isolate build
* Isolate `database_cleanup` into its own build in Travis file to fix OCA#689

* [FIX] database_cleanup: Remove KeyError assertion
* Remove KeyError assertion in tests due to PR in comment being merged
* [ADD] allow creating missing indexes

* [FIX] tests; installation

* [ADD] allow purging properties

* [ADD] missing file

* [ADD] test purging properties

* [ADD] missing parent_id for menu entry

* [FIX] don't delete too many and wrong properties
Using new base model inheritance.
[FIX] don't try to uninstall uninstalled modules

[DEL] weird code

[FIX] actually cleanup where we can
Update version number
Use correct import
Update .pot to match new syntax
Adapt icon to fontawesome
Add models description
Rename field external id to new syntax <model>__<field>
@JuanyDForgeflow
Copy link

@damdam-s Can you check the tests?

@sebalix sebalix changed the title [15.0][mig] database cleanup [15.0][MIG] database_cleanup May 19, 2022
@sebalix sebalix added this to the 15.0 milestone May 19, 2022
@gurneyalex
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 15.0-ocabot-merge-pr-2219-by-gurneyalex-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Jun 14, 2022
Signed-off-by gurneyalex
@OCA-git-bot
Copy link
Contributor

@gurneyalex your merge command was aborted due to failed check(s), which you can inspect on this commit of 15.0-ocabot-merge-pr-2219-by-gurneyalex-bump-nobump.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@leemannd
Copy link
Contributor

Original 14.0 PR has been superseed by -> database_cleanup #2390

<field name="state">code</field>
<field name="model_id" ref="database_cleanup.model_cleanup_purge_wizard_menu" />
<field name="code">
action = env.get('cleanup.purge.wizard').get_wizard_action()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
action = env.get('cleanup.purge.wizard').get_wizard_action()
action = env.get('cleanup.purge.wizard.menu').get_wizard_action()

Copy link
Contributor

Choose a reason for hiding this comment

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

I tested in local environment and get error "You are not allowed to create 'Purge stuff' (cleanup.purge.wizard) records." when click "Purge absolete menu entries". I think you should use the model of current menu.

@leemannd
Copy link
Contributor

Hello @damdam-s the 14.0 has been merged from another PR that superseeds the one you have been using. Do you have time to take a look at it?

@pedrobaeza
Copy link
Member

Superseded by #2547

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.