Making changes to module and altering the database

49 views
Skip to first unread message

wela...@elshaden.com

unread,
Oct 20, 2017, 4:30:08 PM10/20/17
to tryton
Hello,

I am facing quite a peculiar issue that I hope someone can help me with. I made changes to a module and view (making a field unique & adding a new field), but when I go to update the Tryton module the effect isn't carried to the database table (basically an ALTER command).

HOWEVER, if I log in, create a new database, login to new database, the change is carried over to the new database and it shows on the system.

What is the issue here? Permissions?? It wouldn't make sense to create a new database to make a change to the system once its Live of course. There is the option of manually manipulating the table via PSQL but I don't want to encourage that...


Wanis

Cédric Krier

unread,
Oct 20, 2017, 5:10:06 PM10/20/17
to tryton
On 2017-10-20 12:38, wela...@elshaden.com wrote:
> I am facing quite a peculiar issue that I hope someone can help me
> with. I made changes to a module and view (making a field unique &
> adding a new field), but when I go to update the Tryton module the
> effect isn't carried to the database table (basically an ALTER
> command).

How did you update the module?

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

wela...@elshaden.com

unread,
Oct 22, 2017, 5:20:07 AM10/22/17
to tryton
trytond -d database -u module

wela...@elshaden.com

unread,
Oct 22, 2017, 5:20:09 AM10/22/17
to tryton
Maybe if I trigger a reinstallation of the module using the -I it would update it as intended? Because when a new database is created, the module installation is triggered anyway from the GUI and the new changes show.

Cédric Krier

unread,
Oct 22, 2017, 5:45:07 AM10/22/17
to tryton
On 2017-10-22 00:04, wela...@elshaden.com wrote:
> trytond -d database -u module

You must use trytond-admin but your command should have raise an error.

wela...@elshaden.com

unread,
Oct 22, 2017, 4:30:08 PM10/22/17
to tryton

I will check that out.

wela...@elshaden.com

unread,
Oct 22, 2017, 5:05:06 PM10/22/17
to tryton
Using Version 3.8.14

wela...@elshaden.com

unread,
Oct 23, 2017, 3:35:51 AM10/23/17
to tryton
On Sunday, October 22, 2017 at 11:05:06 PM UTC+2, wela...@elshaden.com wrote:
> Using Version 3.8.14

Ran trytond with verbose and go an idea of the issue. There were duplicate records preventing tryton from adding a constraint to the table. cleaned the duplicates and ran update again and it worked like a charm.

Reply all
Reply to author
Forward
0 new messages