Skip to content

[IMP] database_cleanup : delete also obsolete database views - #2098

Merged
OCA-git-bot merged 1 commit into
OCA:12.0from
legalsylvain:12.0-IMP-database_cleanup-clean-view
Aug 9, 2021
Merged

[IMP] database_cleanup : delete also obsolete database views#2098
OCA-git-bot merged 1 commit into
OCA:12.0from
legalsylvain:12.0-IMP-database_cleanup-clean-view

Conversation

@legalsylvain

@legalsylvain legalsylvain commented Jun 1, 2021

Copy link
Copy Markdown
Contributor

Context

  • database migrated with openupgrade from 8.0 to 12.0.
    when trying to cleanup the database, some tables are not dropable, for exemple stock_quant_move_rel with the following errors :
DETAIL:  view stock_history depends on table stock_quant_move_rel
HINT:  Use DROP ... CASCADE to drop the dependent objects too.

this PR improve the concept purge tables to also purges obsoletes views.

sample

image

Note

Materialized views are still not handled.

@legalsylvain

Copy link
Copy Markdown
Contributor Author

CC : original authors : @StefanRijnhart, @pedrobaeza, @hbrunn

@legalsylvain
legalsylvain marked this pull request as ready for review June 1, 2021 22:17
@StefanRijnhart StefanRijnhart changed the title [IMP] database_cleanup : delete also obsolete views [IMP] database_cleanup : delete also obsolete database views Jun 2, 2021
@pedrobaeza pedrobaeza added this to the 12.0 milestone Jun 2, 2021
Comment thread database_cleanup/models/purge_tables.py Outdated
Comment thread database_cleanup/models/purge_tables.py Outdated
@legalsylvain
legalsylvain force-pushed the 12.0-IMP-database_cleanup-clean-view branch 3 times, most recently from 01d10a4 to 3d4d4c4 Compare June 2, 2021 10:08
Co-authored-by: Pedro M. Baeza <pedro.baeza@tecnativa.com>
@legalsylvain
legalsylvain force-pushed the 12.0-IMP-database_cleanup-clean-view branch from 104c1d8 to 4f3a667 Compare June 2, 2021 21:38
@GSLabIt

GSLabIt commented Aug 9, 2021

Copy link
Copy Markdown
Contributor

@legalsylvain @pedrobaeza is this ready to merge?

@StefanRijnhart

Copy link
Copy Markdown
Member

I see @pedrobaeza 's comment was followed up, so I consider this ready for merge indeed.

/ocabot merge minor

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 12.0-ocabot-merge-pr-2098-by-StefanRijnhart-bump-minor, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 4f1d9bc into OCA:12.0 Aug 9, 2021
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at bbfd29a. Thanks a lot for contributing to OCA. ❤️

@legalsylvain

Copy link
Copy Markdown
Contributor Author

Thanks for merging.

HekkiMelody pushed a commit to PyTech-SRL/server-tools that referenced this pull request Jul 8, 2024
HekkiMelody pushed a commit to PyTech-SRL/server-tools that referenced this pull request Jul 8, 2024
HekkiMelody pushed a commit to PyTech-SRL/server-tools that referenced this pull request Jul 8, 2024
HekkiMelody pushed a commit to PyTech-SRL/server-tools that referenced this pull request Jul 8, 2024
HekkiMelody pushed a commit to PyTech-SRL/server-tools that referenced this pull request Jul 8, 2024
HekkiMelody pushed a commit to PyTech-SRL/server-tools that referenced this pull request Jul 8, 2024
HekkiMelody pushed a commit to PyTech-SRL/server-tools that referenced this pull request Jul 8, 2024
HekkiMelody pushed a commit to PyTech-SRL/server-tools that referenced this pull request Jul 8, 2024
nguyenminhchien pushed a commit to nguyenminhchien/server-tools that referenced this pull request Sep 27, 2024
nguyenminhchien pushed a commit to nguyenminhchien/server-tools that referenced this pull request Sep 27, 2024
nguyenminhchien pushed a commit to nguyenminhchien/server-tools that referenced this pull request Oct 10, 2024
nguyenminhchien pushed a commit to nguyenminhchien/server-tools that referenced this pull request Oct 21, 2024
mtelahun pushed a commit to mtelahun/server-tools that referenced this pull request Nov 29, 2024
angelvilaplana pushed a commit to angelvilaplana/server-tools that referenced this pull request Jun 26, 2025
bizzappdev pushed a commit to bizzappdev/server-tools that referenced this pull request Oct 27, 2025
bizzappdev pushed a commit to bizzappdev/server-tools that referenced this pull request Nov 25, 2025
nicomacr pushed a commit to adhoc-dev/server-tools that referenced this pull request Nov 26, 2025
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.

7 participants