uranusjr commented on a change in pull request #20902:
URL: https://github.com/apache/airflow/pull/20902#discussion_r786414827
##########
File path: airflow/models/taskinstance.py
##########
@@ -343,7 +344,7 @@ class TaskInstance(Base, LoggingMixin):
task_id = Column(String(ID_LEN, **COLLATION_ARGS), primary_key=True,
nullable=False)
dag_id = Column(String(ID_LEN, **COLLATION_ARGS), primary_key=True,
nullable=False)
run_id = Column(String(ID_LEN, **COLLATION_ARGS), primary_key=True,
nullable=False)
- map_index = Column(Integer, primary_key=True, nullable=False, default=-1)
+ map_index = Column(Integer, primary_key=True, nullable=False,
server_default=text("-1"))
Review comment:
I checked some sources and realised `default` isn’t actually much useful
in ORM, only if we use the SQL expression builder. And with `server_default`
set, `default` only really matters for `UPDATE`, which actually seems a bit
wrong to me, so I’ll omit `default` until they are proven useful.
--
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]