Upgrading an old Pontoon instance failed

Rust organization has an old Pontoon instance that hasn’t been updated since 2020.
The source is hosted on https://github.com/rust-lang/pontoon.

We tried to upgrade it to the latest, but it failed with the following error during a migration:

Running migrations:
  Applying base.0001_squashed_0154_auto_20200206_1736...Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.9/site-packages/django/db/backends/utils.py", line 82, in _execute
    return self.cursor.execute(sql)
psycopg2.errors.DuplicateTable: relation "base_entity" already exists

We guess https://github.com/mozilla/pontoon/pull/1576 is related to the failure.
Yes, the main issue is that we haven’t updated the instance continuously, but we’d like to upgrade it somehow as our instance causes an authentication error and some users including me cannot log in successfully.
Any clue or procedure? Any help is much appreciated!

FWIW, the working log is here: https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/www.2Erust-lang.2Eorg.20Pontoon.20translations

Squashed migrations can be a problem for sure.

Maybe try to update to the parent of that squash first, https://github.com/mozilla/pontoon/tree/33b047d4871cf65190e23821ff046411ba18a75f/pontoon ?

1 Like