What are the types of migration

For several months now I hesitated to do the 6.2 and 6.4 update, because I don’t know how to handle the manual parts.
May I ask for a list of all “manual” types which can occur? Thanks to my friend @edbo I learned that “SQL” commands can be copied into a prompt issued with the

$ psql -d [name-new-database-new-version] -U [name-of-database-owner]

command. But what should I do with [CONSOLE]? - The “About Migration” section of the site might be a good place - especially if it would be pinned on top of the list.

Cheers,
Wolf

cd [tryton_installation]
bin/trytond-console -d [name-new-database-new-version]

or in docker:

docker run --rm -ti tryton/tryton trytond-console -d [name-new-database-new-version]

1 Like

I updated the about migration place to explain all the types of migrations, thanks for your suggestion!

2 Likes

Adding a bit of background: The console is a kind of client command line in Tryton using the Python interpreter. You can use it to do some operations in the database but doing it through Tryton so you have all the checks and extra commands in the background etc. You can start the console the same way you start Tryton or do an update. As @mindaugas says:

trytond-console -c [name-of-your config-file] -d [name-new-database-new-version]

You will enter the Python console, and you can start adding the commands from the migration.
You can exit the console by entering quit() or exit()

1 Like

Topics listing the upgrade process between each series in addition to the database update.

There are several types of actions to be done:

  • [SQL]: You should execute the mentioned query on your database. We normally include the BEFORE or AFTER keyword to indicate if the sql should be execute before or after the update processs.
  • [CONSOLE]: The python code should be executed inside a trytond-console
  • [PY]: You should update the Python code of your custom modules
  • [XML]: You should update the XML code of your custom modules

Also note that some actions depen on the activated modules and can be skipped if the modules is not activated on your database.

1 Like

@pokoli: Thank you so much for extending instructions on the update process. Such really is crucial - at least if you want non-programmers and geeks as tryton users.

Here is a suggestion for some further extension - I think it’s necessary; at least I never came in touch with the trytond-console within 2 years of trytoning and DO need explanation at this point.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
There are several types of actions to be done:

[SQL]

You should execute the mentioned query on your database. We normally include the BEFORE or AFTER keyword to indicate if the sql should be execute before or after the update processs.

In docker, you need to use a command like

xxx xxx xxx

With a pip setup, go like:

psql -d [name-of-new-database-new-version] -U [name-of-database-owner]

This opens a psql prompt for the listed [SQL] commands

[CONSOLE]

In docker, go:

docker run --rm -ti tryton/tryton trytond-console -d [name-new-database-new-version]

In a pip setup:

$ cd [path-to-tryton_installation]
$ bin/trytond-console -d [name-new-database-new-version]

This opens a trytond-console for the listed [CONSOLE] commands

[PY]

You should update the Python code of your custom modules.
xxx more details

[XML]

You should update the XML code of your custom modules
xxx more details

Also note that some actions depend on the activated modules and can be skipped if the modules are not activated on your database.

1 Like