diff --git a/superset/migrations/versions/abe27eaf93db_add_extra_config_column_to_alerts.py b/superset/migrations/versions/abe27eaf93db_add_extra_config_column_to_alerts.py index 8052b85469646..c0cce0ac9e650 100644 --- a/superset/migrations/versions/abe27eaf93db_add_extra_config_column_to_alerts.py +++ b/superset/migrations/versions/abe27eaf93db_add_extra_config_column_to_alerts.py @@ -38,12 +38,12 @@ def upgrade(): with op.batch_alter_table("report_schedule") as batch_op: - op.add_column( - "report_schedule", + batch_op.add_column( sa.Column("extra", sa.Text(), nullable=True, default="{}",), ) - connection.execute(report_schedule.update().values({"extra": "{}"})) - batch_op.alter_column("extra", existing_type=sa.Text(), nullabe=False) + connection.execute(report_schedule.update().values({"extra": "{}"})) + with op.batch_alter_table("report_schedule") as batch_op: + batch_op.alter_column("extra", existing_type=sa.Text(), nullable=False) def downgrade():