ephraimbuddy commented on a change in pull request #21273:
URL: https://github.com/apache/airflow/pull/21273#discussion_r803364049
##########
File path:
airflow/migrations/versions/6e96a59344a4_make_taskinstance_pool_not_nullable.py
##########
@@ -42,25 +38,8 @@
ID_LEN = 250
-class TaskInstance(Base): # type: ignore
- """Minimal model definition for migrations"""
-
- __tablename__ = "task_instance"
-
- task_id = Column(String(), primary_key=True)
- dag_id = Column(String(), primary_key=True)
- execution_date = Column(UtcDateTime, primary_key=True)
- pool = Column(String(50), nullable=False)
-
-
def upgrade():
"""Make TaskInstance.pool field not nullable."""
- with create_session() as session:
- session.query(TaskInstance).filter(TaskInstance.pool.is_(None)).update(
- {TaskInstance.pool: 'default_pool'}, synchronize_session=False
- ) # Avoid select updated rows
- session.commit()
Review comment:
Because of `server_default` below
--
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]