Search code examples
pythonpostgresqlpython-2.7odooodoo-11

How to delete database table also while uninstalling module in odoo-11?


Currently, I am facing an issue to drop database table after uninstalling module in odoo.

I have created one simple module with one model name like 'test_table'. I installed that module in odoo 11.

But, When I am trying to uninstalling that module fields are deleted from the database. But 'test_table' still exist with odoo magic fields.

Is there any solution to drop table after uninstalling module in odoo?


Solution

  • You can Remove a table in PostGreSql.

    Either use the PGAdmin gui (noramlly on PORT 5432 )

    Or from the command line.

    http://www.postgresqltutorial.com/postgresql-drop-table/

    DROP TABLE [IF EXISTS] table_name [CASCADE | RESTRICT];