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


##########
airflow/migrations/versions/0140_2_9_0_update_trigger_kwargs_type.py:
##########
@@ -45,26 +45,10 @@ def get_session() -> sa.orm.Session:
 
 
 def upgrade():
-    """Apply encrypt trigger kwargs"""
-    session = get_session()
-    try:
-        op.alter_column(table_name="trigger", column_name="kwargs", 
type_=sa.String())
-        for trigger in session.query(Trigger).all():
-            # convert dict to string and encrypt it
-            trigger.encrypted_kwargs = 
trigger._encrypt_kwargs(trigger.encrypted_kwargs)
-        session.commit()
-    finally:
-        session.close()
+    """Update trigger kwargs type to string"""
+    op.alter_column(table_name="trigger", column_name="kwargs", 
type_=sa.String())

Review Comment:
   ```suggestion
       op.alter_column(table_name="trigger", column_name="kwargs", 
type_=sa.Text())
   ```
   I think `Text` is in the ORM?



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