Db upgrade fails with 0.4.2
Running python manage.py management db upgrade heads after the installation of outflow 0.4.2 fails with :
2021-09-09 15:49:29,754 - alembic.runtime.migration - migration.py:556 - INFO - Running upgrade 0001.outflow.management -> aa9c83a108be, add targets
/Users/flo/Documents/Missions-Instruments/ROC/Outflow/outflow/outflow/management/models/versions/default/aa9c83a108be_add_targets.py:58: SAWarning: Can't validate argument 'back_populates'; can't locate any SQLAlchemy dialect named 'back'
sa.Column(
Traceback (most recent call last):
File "/Users/flo/Documents/Missions-Instruments/ROC/Outflow/outflow/outflow/core/db/alembic/env.py", line 129, in run_migrations_online
connectable = engine_from_config(
File "/Users/flo/.virtualenvs/OUTFLOW38/lib/python3.8/site-packages/sqlalchemy/engine/create.py", line 742, in engine_from_config
url = options.pop("url")
KeyError: 'url'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/flo/.virtualenvs/OUTFLOW38/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1771, in _execute_context
self.dialect.do_execute(
File "/Users/flo/.virtualenvs/OUTFLOW38/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 717, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.NotNullViolation: column "workflow_id" contains null values
We have to populate the table workflow with a line dedicated to the tasks with no workflow. The default value for tasks.workflow_id will be the id of this dedicated line.