vincbeck commented on code in PR #55954:
URL: https://github.com/apache/airflow/pull/55954#discussion_r2370575030


##########
airflow-core/src/airflow/models/team.py:
##########
@@ -19,16 +19,27 @@
 
 import uuid6
 from sqlalchemy import Column, ForeignKey, Index, String, Table
-from sqlalchemy.orm import relationship
+
+try:
+    from sqlalchemy.orm import mapped_column
+except ImportError:
+    # fallback for SQLAlchemy < 2.0
+    def mapped_column(*args, **kwargs):
+        from sqlalchemy import Column
+
+        return Column(*args, **kwargs)
+
+
+from sqlalchemy.orm import Mapped, relationship
 from sqlalchemy_utils import UUIDType
 
 from airflow.models.base import Base
 
 dag_bundle_team_association_table = Table(
     "dag_bundle_team",
     Base.metadata,
-    Column("dag_bundle_name", ForeignKey("dag_bundle.name", 
ondelete="CASCADE"), primary_key=True),
-    Column("team_id", ForeignKey("team.id", ondelete="CASCADE"), 
primary_key=True),
+    Column("dag_bundle_name", String, ForeignKey("dag_bundle.name", 
ondelete="CASCADE"), primary_key=True),

Review Comment:
   Indeed, fixed :)



-- 
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