Migration of Indico from 1.2 to 2.0 makes the SSH console unusable

When I try to migrate Indico from 1.2 to 2.0
under Linux Debian 10
by starting script “indico-migrate”
then the console becomes unusable by displaying garbled characters.

I follow the steps from the guide:
https://docs.getindico.io/en/stable/installation/upgrade_legacy/

and I reach the section “Running indico-migrate”.
Then an unexpected side effect appears.

See screenshots.

That looks very weird. From what I can see between all the garbage there was an SQL error. indico-migrate has a switch (--no-gui or something like that) to disable the UI and uses just plain text. Try re-running in that mode - you should get a readable error in that case. Or check the migration log file if there’s anything useful in there about what went wrong…

The error messages are:

sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation "oauth.applications" does not exist
LINE 1: INSERT INTO oauth.applications (name, description, client_id...
                    ^
 [SQL: 'INSERT INTO oauth.applications (name, description, client_id, client_secret, default_scopes, redirect_uris, is_enabled, is_trusted, system_app_type) VALUES (%(name)s, %(description)s, %(client_id)s, %(client_secret)s, %(default_scopes)s, %(redirect_uris)s, %(is_enabled)s, %(is_trusted)s, %(system_app_type)s) RETURNING oauth.applications.id'] [parameters: {'is_enabled': True, 'redirect_uris': [u'http://localhost'], 'name': u'Checkin App', 'is_trusted': True, 'client_id': UUID('952471a1-c45c-492e-b861-368b5ac076d6'), 'system_app_type': <SystemAppType.checkin: 1>, 'client_secret': UUID('3f3c8b24-2362-440c-964d-4eb232632f9a'), 'default_scopes': [u'registrants'], 'description': u'The checkin app for mobile devices allows scanning ticket QR codes and checking-in event participants.'}]

I attach the whole message.indico_error.log (5.7 KB)

Database encoding must be UTF8; got SQL_ASCII
Recreate your database using createdb -E UTF8 -T template0 ...

There we go. Looks like your postgres has some weird defaults. This should fix it:

su - postgres -c 'dropdb indico'
su - postgres -c 'createdb -O indico -E UTF8 -T template0 indico'
su - postgres -c 'psql indico -c "CREATE EXTENSION unaccent; CREATE EXTENSION pg_trgm;"'

I confirm that deleting the database and recreating it
has fixed the issue.

2 posts were split to a new topic: Could not fetch notices - Network is unreachable