houqp commented on a change in pull request #13278:
URL: https://github.com/apache/airflow/pull/13278#discussion_r548956485
##########
File path: airflow/models/dagrun.py
##########
@@ -83,7 +84,7 @@ class DagRun(Base, LoggingMixin):
run_id = Column(String(ID_LEN))
creating_job_id = Column(Integer)
external_trigger = Column(Boolean, default=True)
- run_type = Column(String(50), nullable=False)
+ run_type = Column(Enum(DagRunType, native_enum=False,
create_constraint=False), nullable=False)
Review comment:
ok, turns out sqlalchmy's enum type uses field name instead of field
value as db value, so we ended up getting `SCHEDULED` instead of `scheduled` in
queries. I have changed it back to `String` column type for now and overwrite
`__str__` method to make it work for mysqlclient.
----------------------------------------------------------------
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]