Uninstalling module to force re creation of table

Hi guys,

I’ve made a new module with ten fields. I’ve ran trytond-admin with --all option and the table was created perfectly. After that I decided to remove one field. I’ve changed the .py of my module and ran again trytond-admin with --all option but after requested the db I’ve seen that the field is still in the table.
So I’m wondering the best way to force the db modification, uninstall the module (is there a proper way ?) and re install it or something else ?

Finally removing manually the table did the job but I still don’t find a proper way to uninstall module…

Thanks in advance.


Tryton will never automatically remove columns / tables / indexes / constraints.

Uninstal exists, but can be finnicky, and AFAIK there is no way for now to “customize” the uninstall process.

If this is part of the development process, you can manually alter the table to remove the column.

If the original version was deployed, you should use the __register__ method to clean up the extra column.

Understood thanks Jean

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.