Fixed issue #8675: Migration issue from 1.90 to 2.05 if using Postgres - patch by atisne