Edit on GitHub

Add missing delete from migration #34.

 1"""Add missing delete from migration #34."""
 2
 3
 4def migrate(state_sync, **kwargs):  # type: ignore
 5    engine_adapter = state_sync.engine_adapter
 6    schema = state_sync.schema
 7    plan_dags_table = "_plan_dags"
 8    if state_sync.schema:
 9        plan_dags_table = f"{schema}.{plan_dags_table}"
10
11    # At the time of migration plan_dags table is only needed for in-flight DAGs and therefore we can safely
12    # just delete it instead of migrating it
13    # If reusing this code verify that this is still the case
14    engine_adapter.delete_from(plan_dags_table, "TRUE")
def migrate(state_sync, **kwargs):
 5def migrate(state_sync, **kwargs):  # type: ignore
 6    engine_adapter = state_sync.engine_adapter
 7    schema = state_sync.schema
 8    plan_dags_table = "_plan_dags"
 9    if state_sync.schema:
10        plan_dags_table = f"{schema}.{plan_dags_table}"
11
12    # At the time of migration plan_dags table is only needed for in-flight DAGs and therefore we can safely
13    # just delete it instead of migrating it
14    # If reusing this code verify that this is still the case
15    engine_adapter.delete_from(plan_dags_table, "TRUE")