After upgrading DLRN pip package (0.25.0 > 0.26.1), the existing database schema is now deprecated and builds no longer succeed.
According to the official documentation regarding upgrades and migrations, DLRN seems to be bundled with support for Alembic. Database migrations are supposedly as simple as running alembic with a provided alembic.ini configuration file.
When attempted, migrations fail with the following exception:
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 3c62b0d3ec34 -> 47ebe0522809, Scheme change due to SCM support moving to a plugin
Traceback (most recent call last):
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1901, in _execute_context
cursor, statement, parameters, context
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: duplicate column name: distgit_dir
The alembic.ini configuration file used is one adapted from the official code repository on GitHub.
It is important the database history is preserved between version updates so simply recreating the database from scratch using the new schema is not an option.