Dev-iL commented on code in PR #55954:
URL: https://github.com/apache/airflow/pull/55954#discussion_r2370204236
##########
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:
This needs to be a String with a length, or a Text.
--
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]