## Bug description

async migrations celery task id will always be "" through the migration

## Expected behavior

It will be set

## How to reproduce

1. Start a migration

## Environment

- [x] PostHog Cloud
- [ ] self-hosted PostHog (ClickHouse-based), version/commit: _please provide_
- [ ] self-hosted PostHog (Postgres-based, legacy), version/commit: _please provide_

## Additional context

The cause is a bad state machine: We set it in #trigger_migration but #mark_async_migration_as_running later in the chain always resets it.

cc @tiina303 and @yakkomajuri for prioritization

#### *Thank you* for your bug report – we love squashing them!

posthog/async_migrations/utils.py
from datetime import datetime
from typing import Optional
from django.db import transaction
from posthog.async_migrations.definition import AsyncMigrationOperation
from posthog.async_migrations.setup import DEPENDENCY_TO_ASYNC_MIGRATION
from posthog.celery import app
from posthog.constants import AnalyticsDBMS
from posthog.models.async_migration import AsyncMigration, MigrationStatus
from posthog.settings import ASYNC_MIGRATIONS_DISABLE_AUTO_ROLLBACK
def execute_op(op: AsyncMigrationOperation, query_id: str, rollback: bool = False):
    """
    sync execute the migration against the analytics db (ClickHouse) and then
    run the side effect if it is defined
    """
    sql = op.rollback if rollback else op.sql
    if op.database == AnalyticsDBMS.CLICKHOUSE:
        execute_op_clickhouse(sql, query_id, op.timeout_seconds)
    else:
        execute_op_postgres(sql, query_id)
def execute_op_clickhouse(sql: str, query_id: str, timeout_seconds: int):