Holger Brunn
9 years ago
No known key found for this signature in database
GPG Key ID: 1C9760FECA3AE18
2 changed files with
1 additions and
9 deletions
-
database_cleanup/README.rst
-
database_cleanup/models/purge_tables.py
|
@ -33,11 +33,6 @@ For further information, please visit: |
|
|
|
|
|
|
|
|
* https://www.odoo.com/forum/help-1 |
|
|
* https://www.odoo.com/forum/help-1 |
|
|
|
|
|
|
|
|
Known issues / Roadmap |
|
|
|
|
|
====================== |
|
|
|
|
|
|
|
|
|
|
|
* ... |
|
|
|
|
|
|
|
|
|
|
|
Bug Tracker |
|
|
Bug Tracker |
|
|
=========== |
|
|
=========== |
|
|
|
|
|
|
|
|
|
@ -87,14 +87,11 @@ class CleanupPurgeWizardTable(models.TransientModel): |
|
|
# type m2m don't have _rel |
|
|
# type m2m don't have _rel |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
# Cannot pass table names as a psycopg argument |
|
|
|
|
|
known_tables_repr = ",".join( |
|
|
|
|
|
[("'%s'" % table) for table in known_tables]) |
|
|
|
|
|
self.env.cr.execute( |
|
|
self.env.cr.execute( |
|
|
""" |
|
|
""" |
|
|
SELECT table_name FROM information_schema.tables |
|
|
SELECT table_name FROM information_schema.tables |
|
|
WHERE table_schema = 'public' AND table_type = 'BASE TABLE' |
|
|
WHERE table_schema = 'public' AND table_type = 'BASE TABLE' |
|
|
AND table_name NOT IN (%s)""" % known_tables_repr) |
|
|
|
|
|
|
|
|
AND table_name NOT IN %s""", (tuple(known_tables),)) |
|
|
|
|
|
|
|
|
res = [(0, 0, {'name': row[0]}) for row in self.env.cr.fetchall()] |
|
|
res = [(0, 0, {'name': row[0]}) for row in self.env.cr.fetchall()] |
|
|
if not res: |
|
|
if not res: |
|
|