This is an automated email from the ASF dual-hosted git repository.

kamilbregula pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a405d2  [AIRFLOW-6931] Fixed migrations to find all dependencies for 
MSSQL (#9891)
8a405d2 is described below

commit 8a405d25fa869d8f3ab7f34b7ee9ca1d5909743b
Author: BaoshanGu <[email protected]>
AuthorDate: Tue Jul 21 19:11:39 2020 -0400

    [AIRFLOW-6931] Fixed migrations to find all dependencies for MSSQL (#9891)
---
 .../versions/74effc47d867_change_datetime_to_datetime2_6_on_mssql_.py   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/airflow/migrations/versions/74effc47d867_change_datetime_to_datetime2_6_on_mssql_.py
 
b/airflow/migrations/versions/74effc47d867_change_datetime_to_datetime2_6_on_mssql_.py
index 5e521b3..4e49e82 100644
--- 
a/airflow/migrations/versions/74effc47d867_change_datetime_to_datetime2_6_on_mssql_.py
+++ 
b/airflow/migrations/versions/74effc47d867_change_datetime_to_datetime2_6_on_mssql_.py
@@ -232,7 +232,7 @@ def get_table_constraints(conn, table_name):
      FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS tc
      JOIN INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE AS ccu ON 
ccu.CONSTRAINT_NAME = tc.CONSTRAINT_NAME
      WHERE tc.TABLE_NAME = '{table_name}' AND
-     (tc.CONSTRAINT_TYPE = 'PRIMARY KEY' or tc.CONSTRAINT_TYPE = 'Unique')
+     (tc.CONSTRAINT_TYPE = 'PRIMARY KEY' or UPPER(tc.CONSTRAINT_TYPE) = 
'UNIQUE')
     """.format(table_name=table_name)
     result = conn.execute(query).fetchall()
     constraint_dict = defaultdict(list)

Reply via email to