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

kaxilnaik pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

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

    [AIRFLOW-6931] Fixed migrations to find all dependencies for MSSQL (#9891)
    
    (cherry picked from commit 8a405d25fa869d8f3ab7f34b7ee9ca1d5909743b)
---
 .../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 a9ef785..c5630dd 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
@@ -231,7 +231,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