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

ASF subversion and git services commented on AIRFLOW-3468:
----------------------------------------------------------

Commit f3156d771ae8cda5daf53e936dc0b3a258ce6924 in airflow's branch 
refs/heads/master from Ash Berlin-Taylor
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=f3156d7 ]

[AIRFLOW-3761] Fix `DROP TABLE user` migration for upgrades. (#4840)

If you are upgrading an old install you will likely have rows in the
user and known_event tables. We dropped the KnownEvent without a
migration to remove it (on purpose) in [AIRFLOW-3468] (#4421) but this
means if we have any rows in there we won't be able to drop the USER
table:

> sqlalchemy.exc.InternalError: (psycopg2.InternalError) cannot drop table 
> users because other objects depend on it
> DETAIL:  constraint known_event_user_id_fkey on table known_event depends on 
> table users

So we need to drop that FK constraint first (if the table exists, which
it won't on a fresh install, as the create migration has been deleted.)

> Refactor: Move KnownEventType out of models.py
> ----------------------------------------------
>
>                 Key: AIRFLOW-3468
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3468
>             Project: Apache Airflow
>          Issue Type: Task
>          Components: models
>    Affects Versions: 1.10.1
>            Reporter: Fokko Driesprong
>            Assignee: Fokko Driesprong
>            Priority: Major
>             Fix For: 2.0.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to