ephraimbuddy commented on code in PR #24044:
URL: https://github.com/apache/airflow/pull/24044#discussion_r886001355


##########
airflow/models/serialized_dag.py:
##########
@@ -67,11 +67,11 @@ class SerializedDagModel(Base):
     dag_id = Column(String(ID_LEN), primary_key=True)
     fileloc = Column(String(2000), nullable=False)
     # The max length of fileloc exceeds the limit of indexing.
-    fileloc_hash = Column(BigInteger, nullable=False)
+    fileloc_hash = Column(BigInteger().with_variant(Integer, 'sqlite'), 
nullable=False)
     _data = Column('data', sqlalchemy_jsonfield.JSONField(json=json), 
nullable=True)
     _data_compressed = Column('data_compressed', LargeBinary, nullable=True)
     last_updated = Column(UtcDateTime, nullable=False)
-    dag_hash = Column(String(32), nullable=False)
+    dag_hash = Column(String(32), nullable=False, server_default='Hash not 
calculated yet')

Review Comment:
   It has a server_default in the DB: 
https://github.com/apache/airflow/blob/d19cb86660d40e665d8c4fe2b07d76b88532bd8b/airflow/migrations/versions/0056_1_10_12_add_dag_hash_column_to_serialized_dag_.py#L42



-- 
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]

Reply via email to