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


##########
airflow/migrations/versions/0122_2_5_0_add_is_orphaned_to_datasetmodel.py:
##########
@@ -39,9 +39,16 @@
 
 def upgrade():
     """Add is_orphaned to DatasetModel"""
-    op.add_column("dataset", sa.Column("is_orphaned", sa.Boolean, 
nullable=False, server_default="False"))
+    # We pass in sa.sql.False_() for server_default, since that handles the 
string
+    # representation of False for different databases for us
+    # 
https://github.com/miguelgrinberg/Flask-Migrate/issues/265#issuecomment-937057519
+    with op.batch_alter_table("dataset") as batch_op:
+        batch_op.add_column(
+            sa.Column("is_orphaned", sa.Boolean, nullable=False, 
server_default=sa.sql.False_())

Review Comment:
   ```suggestion
               sa.Column("is_orphaned", sa.Boolean, nullable=False, 
server_default='0')
   ```



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