airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M Noronha (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-3138) Migration cc1e65623dc7 creates issues with postgres
Date Mon, 01 Oct 2018 22:27:00 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-3138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16634703#comment-16634703
] 

M Noronha commented on AIRFLOW-3138:
------------------------------------

Based on the changes in AIRFLOW-2870 - created [https://github.com/apache/incubator-airflow/pull/3985].

Tested by installing and running:
{code:java}
alembic downgrade 127d2bf2dfa7
alembic upgrade +1
airflow upgradedb{code}
Confirmed on sqlite as well.

 

 

> 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
>            Priority: Major
>
> 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)

Mime
View raw message