uranusjr commented on code in PR #23444:
URL: https://github.com/apache/airflow/pull/23444#discussion_r864220700
##########
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:
One of these is not upper-cased! But do you really need `UPPER`? From what I
remember, other migrations don’t do this amd still work OK.
--
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]