M Noronha created AIRFLOW-3138:
----------------------------------
Summary: Migration cc1e65623dc7 creates issues with postgres
Key: AIRFLOW-3138
URL: https://issues.apache.org/jira/browse/AIRFLOW-3138
Project: Apache Airflow
Issue Type: Bug
Components: db
Affects Versions: 1.10.0
Reporter: M Noronha
When trying to upgrade from 1.8.0 to 1.10.0, migration
cc1e65623dc7_add_max_tries_column_to_task_instance.py results in error:
sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'task_instance'
expected to update 1 row(s); 0 were matched.
That's due to a datatype mismatch between the database (TIMESTAMP before
migration 0e2a74e0fc9f) and the UtcDateTime.
Changing
55c54
< execution_date = Column(UtcDateTime, primary_key=True)
---
> execution_date = Column(sa.DateTime(), primary_key=True)
Seems to be enough to work in postgres. This also works in sqlite.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)