uranusjr commented on code in PR #23444:
URL: https://github.com/apache/airflow/pull/23444#discussion_r864270954


##########
airflow/migrations/utils.py:
##########
@@ -35,7 +35,8 @@ def get_mssql_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 UPPER(tc.CONSTRAINT_TYPE) = 
'UNIQUE')
+     (tc.CONSTRAINT_TYPE = 'PRIMARY KEY' or UPPER(tc.CONSTRAINT_TYPE) = 
'UNIQUE'
+     or UPPER(tc.CONSTRAINT_TYPE) = 'FOREIGN KEY')

Review Comment:
   Hmm, and the other two can be in lower case? I would imagine we should be 
able to get rid of those `UPPER`;



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to