kaxil commented on a change in pull request #9973:
URL: https://github.com/apache/airflow/pull/9973#discussion_r629692470
##########
File path:
airflow/migrations/versions/bbf4a7ad0465_remove_id_column_from_xcom.py
##########
@@ -35,6 +37,61 @@
depends_on = None
+def get_table_constraints(conn, table_name):
+ """
+ This function return primary and unique constraint
+ along with column name. some tables like task_instance
+ is missing primary key constraint name and the name is
+ auto-generated by sql server. so this function helps to
+ retrieve any primary or unique constraint name.
+ :param conn: sql connection object
Review comment:
```suggestion
retrieve any primary or unique constraint name.
:param conn: sql connection object
```
##########
File path:
airflow/migrations/versions/bbf4a7ad0465_remove_id_column_from_xcom.py
##########
@@ -35,6 +37,61 @@
depends_on = None
+def get_table_constraints(conn, table_name):
+ """
+ This function return primary and unique constraint
+ along with column name. some tables like task_instance
+ is missing primary key constraint name and the name is
+ auto-generated by sql server. so this function helps to
+ retrieve any primary or unique constraint name.
Review comment:
```suggestion
This function return primary and unique constraint
along with column name. Some tables like `task_instance`
is missing the primary key constraint name and the name is
auto-generated by the SQL server. so this function helps to
retrieve any primary or unique constraint name.
```
--
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]