Skip to content

[18.0][MIG] database_cleanup: Migration to 18.0 #3064

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

Merged
merged 91 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
fce1da8
[ADD] Database cleanup module
Jan 28, 2014
a404549
remove relations when purging models
guewen Feb 3, 2014
841ecba
[FIX] Don't remove uid field from wkf_instance, which is written in
Feb 8, 2014
8c73582
[CHG] Migration to 8.0
anthony-muschang Dec 11, 2014
07c68a5
[IMP] hide unnecessary buttons in wizard
hbrunn Apr 28, 2015
23be5da
Missing templates and translations added
sysadminmatmoz Aug 11, 2015
cd95e3d
[ADD] allow to clean up menus
hbrunn Aug 28, 2015
c3deee1
[IMP] allow to select lines to purge in a tree view
hbrunn Jul 17, 2015
0474282
[ADD] migrate database_cleanup
hbrunn Jun 29, 2016
37ed58b
[RFR] Explicit access rights so that tests can run
StefanRijnhart Aug 9, 2016
57a3ccc
[FIX] purge uninstalled uninstallable modules instead of deleting
hbrunn Aug 2, 2016
deb5b8b
OCA Transbot updated translations from Transifex
oca-transbot Oct 5, 2015
7940d60
[IMP] call the button handler to also purge reverse dependencies
hbrunn Sep 15, 2016
06082e3
[FIX] don't crash if an xmlid refers to a nonexisting field (#559)
hbrunn Sep 26, 2016
debc546
[FIX] clean database menus was proposing good menus to purge (#562)
JordiBForgeFlow Sep 28, 2016
b64498c
fixes #587
florian-dacosta Nov 1, 2016
dc5080a
[FIX] database_cleanup: Fix test (#612)
moylop260 Nov 22, 2016
40ca75f
[9.0][FIX] database_cleanup: Isolate build (#719)
lasley Feb 7, 2017
89d7585
[ADD] allow creating missing indexes and purging properties (#736)
hbrunn Apr 19, 2017
bfccb06
[MIG] database_cleanup: Migration to version 10.0
eantones Jun 21, 2017
bfb8d94
[FIX] really uninstall modules and avoid a crash on cached data
hbrunn Aug 1, 2017
991a501
[ADD] [database_cleanup] migrate to 11.0
hbrunn Oct 3, 2017
c63bdef
OCA Transbot updated translations from Transifex
oca-transbot Mar 3, 2018
f89b99f
database_cleanup_fix_runbot_links
fanha99 Jul 20, 2018
442c97a
Global pylint cleanup
simahawk Sep 3, 2018
a740efb
[FIX] don't destroy values when there are empty default properties
hbrunn Feb 11, 2019
5967b0c
[FIX] show the redundant property's res_id, not the default one's
hbrunn Feb 11, 2019
a66bc47
[IMP] don't break on properties pointing to unknown models
hbrunn Feb 14, 2019
2353fc0
[MIG] database_cleanup: migration to 12.0
mart-e Oct 26, 2018
4057e1d
[FIX] database_cleanup: exclude password fields
mart-e Apr 8, 2019
0b7b3d8
[I18N] database_cleanup: reflect changes to en.po
mart-e Apr 16, 2019
7cc4a9d
[FIX] database_cleanup: filter on many2many fields
mart-e May 6, 2019
cacb0e6
[FIX] database_cleanup: ignore to_buy modules
mart-e May 9, 2019
2b3afdc
[UPD] Update database_cleanup.pot
oca-travis May 31, 2019
6bfaf3c
Update translation files
oca-transbot Jun 16, 2019
2f27eb6
[FIX][#1580]database_cleanup: Skip studio_customization module skippe…
bizzappdev Aug 5, 2019
cdf5e7e
[UPD] Update database_cleanup.pot
oca-travis Aug 11, 2019
d57308d
database_cleanup 12.0.1.0.1
OCA-git-bot Aug 11, 2019
d862a2c
Update translation files
oca-transbot Aug 26, 2019
56c43d5
Translated using Weblate (Portuguese (Brazil))
Aug 30, 2019
9544188
Translated using Weblate (Chinese (Simplified))
liweijie0812 Aug 31, 2019
90afa45
Translated using Weblate (Chinese (Simplified))
liweijie0812 Sep 1, 2019
940850f
[IMP] database_cleanup: black, isort, prettier
Jan 12, 2021
cbd59cf
[MIG] database_cleanup: Migration to 14.0
Jan 12, 2021
3ab4fe4
fixup! [MIG] database_cleanup: Migration to 14.0
Aug 17, 2022
1220f03
[UPD] Update database_cleanup.pot
Aug 30, 2022
4b67074
[UPD] README.rst
OCA-git-bot Aug 30, 2022
b79e327
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 2, 2022
9ec9cbd
Translated using Weblate (Italian)
francesco-ooops Sep 15, 2022
f426bd4
[MIG] database_cleanup: Migration to 16.0
JoelZilli Nov 24, 2022
d29b2cb
[FIX] database_cleanup: unused code + wrong modules clean
JoelZilli May 3, 2023
5c20f00
[IMP] database_cleanup: Readability of modules to remove
miikanissi Oct 26, 2023
6a0f9e0
[FIX] database_cleanup: TransactionCase already does rollback
miikanissi Dec 28, 2023
4e4379c
[IMP] database_cleanup: Unlink with new cursor
miikanissi Dec 28, 2023
9417fc5
[FIX] database_cleanup: preserve spaces in quoted identifiers
StefanRijnhart Jun 5, 2023
53a9510
[IMP] database_cleanup: improve tests
yankinmax Feb 9, 2023
f4a8fcc
[UPD] Update database_cleanup.pot
Dec 29, 2023
ce90257
[BOT] post-merge updates
OCA-git-bot Dec 29, 2023
4ee8487
Update translation files
weblate Dec 29, 2023
185d4d1
Translated using Weblate (Spanish)
Ivorra78 Dec 29, 2023
705b904
Translated using Weblate (Italian)
mymage Jan 9, 2024
cb0b336
Translated using Weblate (Italian)
mymage Jan 10, 2024
00101d4
[IMP] database_cleanup: pre-commit execution
augusto-weiss Jan 10, 2024
48cea0a
[MIG] database_cleanup: Migration to 17.0
augusto-weiss Jan 10, 2024
6175cee
[UPD] Update database_cleanup.pot
Jan 17, 2024
d5efcb2
[BOT] post-merge updates
OCA-git-bot Jan 17, 2024
0d3009d
Update translation files
weblate Feb 3, 2024
eb7060d
Update translation files
weblate Feb 3, 2024
8d3aefa
Translated using Weblate (Italian)
francesco-ooops Feb 12, 2024
79b4540
[FIX] *: Pre-commit fixes
pedrobaeza May 2, 2024
c105e02
[BOT] post-merge updates
OCA-git-bot May 2, 2024
6edead2
[ADD] database_cleanup: Purge fields (ir.model.fields) added
ypapouin Dec 6, 2022
e18be6c
[FIX] database_cleanup: Check that the model is automatically managed…
ypapouin Feb 12, 2024
eb08e78
[MIG] adapt code for V17
astirpe May 7, 2024
8f6f627
[MIG] add tests for purge fields
astirpe Apr 12, 2024
3c31d25
[UPD] Update database_cleanup.pot
May 23, 2024
e594b6b
[BOT] post-merge updates
OCA-git-bot May 23, 2024
aaec767
Update translation files
weblate May 23, 2024
4cb67fa
Translated using Weblate (Italian)
mymage May 24, 2024
b17b8a8
[IMP] database_cleanup : delete also obsolete SQL views
legalsylvain Jun 1, 2021
0a2c356
[UPD] Update database_cleanup.pot
May 24, 2024
38e49ca
[BOT] post-merge updates
OCA-git-bot May 24, 2024
c8771cd
Update translation files
weblate May 24, 2024
107203f
Translated using Weblate (Italian)
mymage May 27, 2024
0a0e6b5
Translated using Weblate (Chinese (Simplified) (zh_CN))
xtanuiha Jun 16, 2024
09f9279
[FIX] database_cleanup: fix logging error introduced by #2098
Feb 2, 2024
ac32a22
[BOT] post-merge updates
OCA-git-bot Sep 16, 2024
9871be7
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 18, 2024
2888b3c
Prevent deletion of columns added in the init method of the model.
MrGigSolutions Feb 20, 2024
b5fc77d
oca-port: blacklist PR(s) 2523, 2744 for database_cleanup
nguyenminhchien Oct 10, 2024
bf4b81e
[MIG] database_cleanup: Migration to 18.0
nguyenminhchien Oct 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .oca/oca-port/blacklist/database_cleanup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"pull_requests": {
"2523": "(auto) Nothing to port from PR #2523",
"2744": "(auto) Nothing to port from PR #2744"
}
}
105 changes: 105 additions & 0 deletions database_cleanup/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
================
Database cleanup
================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0cfcda2589a9f11270616e22be3e3560c3360bb96421bba926a9dfd30735398d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/18.0/database_cleanup
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-database_cleanup
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Clean your Odoo database from remnants of modules, models, columns and
tables left by uninstalled modules (prior to 7.0) or a homebrew database
upgrade to a new major version of Odoo.

Caution! This module is potentially harmful and can *easily* destroy the
integrity of your data. Do not use if you are not entirely comfortable
with the technical details of the Odoo data model of *all* the modules
that have ever been installed on your database, and do not purge any
module, model, column or table if you do not know exactly what you are
doing.

**Table of contents**

.. contents::
:local:

Usage
=====

After installation of this module, go to the Settings menu -> Technical
-> Database cleanup. This menu is only available to members of the
*Access Rights* group. Go through the modules, models, columns and
tables entries under this menu (in that order) and find out if there is
orphaned data in your database. You can either delete entries by line,
or sweep all entries in one big step (if you are *really* confident).

|Try me on Runbot|

.. |Try me on Runbot| image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:target: https://runbot.odoo-community.org/runbot/149/11.0

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20database_cleanup%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Therp BV

Contributors
------------

- Stefan Rijnhart <[email protected]>
- Holger Brunn <[email protected]>
- Stéphane Mangin <[email protected]>
- `360ERP <https://www.360erp.com>`__:

- Andrea Stirpe

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/18.0/database_cleanup>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions database_cleanup/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright 2014-2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models
26 changes: 26 additions & 0 deletions database_cleanup/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2014-2016 Therp BV <http://therp.nl>
# Copyright 2021 Camptocamp SA <https://camptocamp.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Database cleanup",
"version": "18.0.1.0.0",
"author": "Therp BV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-tools",
"depends": ["base"],
"license": "AGPL-3",
"category": "Tools",
"data": [
"views/purge_wizard.xml",
"views/purge_menus.xml",
"views/purge_modules.xml",
"views/purge_models.xml",
"views/purge_fields.xml",
"views/purge_columns.xml",
"views/purge_tables.xml",
"views/purge_data.xml",
"views/create_indexes.xml",
"views/menu.xml",
"security/ir.model.access.csv",
],
"installable": True,
}
Loading
Loading