You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/12/18 09:06:19 UTC

[GitHub] [airflow] mtomilov commented on issue #23453: airflow db upgrade: FOREIGN KEY constraint failed

mtomilov commented on issue #23453:
URL: https://github.com/apache/airflow/issues/23453#issuecomment-1356742939

   > I would not worry about sqlite. By definition it's only for development and testing and it's ok to remove any sqlite database and recreate it from the scratch. Should we close this issue @ephraimbuddy WDYT?
   
   Probably it should be reflected in the docs somewhere then.
   Because right now it's kinda misleading, sqlite migration code is [there](https://github.com/apache/airflow/blob/8e0df8881f22dd5c4c0ea71e7a9cd35b32889f47/airflow/migrations/versions/0119_2_4_3_add_case_insensitive_unique_constraint_for_username.py#L50
   ) but doesn't seem to be working at all.
   
   This seems to be enough btw to make migrations work, just like the alembic [note](https://alembic.sqlalchemy.org/en/latest/batch.html#dealing-with-referencing-foreign-keys) linked by @Gollum999 says.
   `batch_op.execute("PRAGMA foreign_keys = OFF;")`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org