code: def upgrade():
      """Apply add processor_subdir to DagModel and SerializedDagModel"""
      conn = op.get_bind()
  
      with op.batch_alter_table("dag") as batch_op:
          if conn.dialect.name == "mysql":
              batch_op.add_column(
                  sa.Column(
                      "processor_subdir",
                      sa.Text(length=2000),
                      nullable=True,
                  )
              )
          else:
              batch_op.add_column(
                  sa.Column(
                      "processor_subdir",
                      sa.String(length=2000),
                      nullable=True,
                  )
              )
  
      with op.batch_alter_table("serialized_dag") as batch_op:
          if conn.dialect.name == "mysql":
              batch_op.add_column(
                  sa.Column(
                      "processor_subdir",
                      sa.Text(length=2000),
                      nullable=True,
                  )
              )
          else:
              batch_op.add_column(
                  sa.Column(
                      "processor_subdir",
                      sa.String(length=2000),
                      nullable=True,
                  )
              )
  
      with op.batch_alter_table("callback_request") as batch_op:
          batch_op.drop_column("dag_directory")
          if conn.dialect.name == "mysql":
              batch_op.add_column(
                  sa.Column(
                      "processor_subdir",
                      sa.Text(length=2000),
                      nullable=True,
                  )
              )
          else:
              batch_op.add_column(
                  sa.Column(
                      "processor_subdir",
                      sa.String(length=2000),
                      nullable=True,
                  )
              )
  
imports: from __future__ import annotations
  import sqlalchemy
  from alembic import op
label_desc: Use image node_id 1 for calling a global function with example usage: upgrade() without return types