You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/07 16:10:57 UTC
[GitHub] [airflow] ashb commented on a change in pull request #8176: Improve
add_dag_code_table migration
ashb commented on a change in pull request #8176: Improve add_dag_code_table migration
URL: https://github.com/apache/airflow/pull/8176#discussion_r404933503
##########
File path: airflow/migrations/versions/952da73b5eff_add_dag_code_table.py
##########
@@ -38,6 +37,18 @@
def upgrade():
+ from sqlalchemy.ext.declarative import declarative_base
+
+ Base = declarative_base()
+
+ class SerializedDagModel(Base):
+ __tablename__ = 'serialized_dag'
+
+ # There are other columns here, but these are the only ones we need for the SELECT/UPDATE we are doing
+ dag_id = sa.Column(sa.String(250), primary_key=True)
+ fileloc = sa.Column(sa.String(2000), nullable=False)
+ fileloc_hash = sa.Column(sa.BigInteger, nullable=False)
Review comment:
Yup.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services