Upgrade Issue: Database Migrations Alembic Version a28f2733897b

Id like to leave a Feedback for an Issue I’ve had when upgrading PrivacyIdea from 3.6.x to current 3.8.1:

There is an issue when Upgrading DB schema via privacyidea-pip-update:


(psycopg2.errors.DuplicateTable) FEHLER:  Relation »customuserattribute_seq« existiert bereits

[SQL: CREATE SEQUENCE customuserattribute_seq]
(Background on this error at: http://sqlalche.me/e/13/f405)
(psycopg2.errors.InFailedSqlTransaction) FEHLER:  aktuelle Transaktion wurde abgebrochen, Befehle werden bis zum Ende der Transaktion ignoriert

Because the relation is already existent, the transaction in Question has to be rolled back - or (for a workaround I did) commented out inside of the mentioned .py script:

#    try:
#        seq = Sequence('customuserattribute_seq')
#        create_seq(seq)
#    except Exception as exx:
#        print(exx)