You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2018/10/12 11:07:00 UTC

[jira] [Resolved] (AIRFLOW-3138) Migration cc1e65623dc7 creates issues with postgres

     [ https://issues.apache.org/jira/browse/AIRFLOW-3138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ash Berlin-Taylor resolved AIRFLOW-3138.
----------------------------------------
    Resolution: Fixed

> 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
>             Fix For: 1.10.1
>
>
> 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)