msardana94 commented on issue #13679: URL: https://github.com/apache/airflow/issues/13679#issuecomment-762864931
> We do not write SQL queries, but use an ORM that generates queries based on the model stored in the code. The model is identical to the database schema in most cases, so everything works fine. The problem arises when the model is different from the database schema because you have not done all the migrations. Then ORM can generate SQL queries that conform to the new database schema, but does not work properly with the older versions. This is just my guess and I am not sure if this is the cause of these problems. Yes I get that. I should have specified in the PR description that the issue is with the ORM code itself which generates an invalid SQL. I don't believe the error itself has anything to do with version of database schema. > `airflow upgrade db` works fine if there are no entries in the database. If you would like to test it well, you should migrate the database version compatible with Airflow 1.10. Add a few entries, and then run database migrations to see if the problem was detected. I will give that a try and see how that goes. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
