feluelle commented on a change in pull request #10151:
URL: https://github.com/apache/airflow/pull/10151#discussion_r464960841



##########
File path: airflow/migrations/env.py
##########
@@ -98,7 +98,19 @@ def run_migrations_online():
         )
 
         with context.begin_transaction():
+            if connection.dialect.name == 'mysql' and \
+                    connection.dialect.server_version_info[0] == 5 and \
+                    connection.dialect.server_version_info[1] == 7:

Review comment:
       ```suggestion
                       connection.dialect.server_version_info >= (5, 6):
   ```

##########
File path: airflow/migrations/env.py
##########
@@ -98,7 +98,19 @@ def run_migrations_online():
         )
 
         with context.begin_transaction():
+            if connection.dialect.name == 'mysql' and \
+                    connection.dialect.server_version_info[0] == 5 and \
+                    connection.dialect.server_version_info[1] == 7:
+                connection.execute(
+                    "select GET_LOCK('alembic',1800);"
+                )
             context.run_migrations()
+            if connection.dialect.name == 'mysql' and \
+                    connection.dialect.server_version_info[0] == 5 and \
+                    connection.dialect.server_version_info[1] == 7:

Review comment:
       ```suggestion
                       connection.dialect.server_version_info >= (5, 6):
   ```




----------------------------------------------------------------
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]


Reply via email to