code: def downgrade():
      with op.batch_alter_table("predictor", schema=None) as batch_op:
          batch_op.add_column(
              sa.Column("json_ai", sa.JSON, nullable=True)
          )
  
      conn = op.get_bind()
      session = sa.orm.Session(bind=conn)
      jsons = conn.execute(
          sa.text(
              """
          select resource_id, name, content
          from json_storage
          where resource_group = 'predictor' and name = 'json_ai'
      """
          )
      ).fetchall()
  
      for row in jsons:
          predicrtor_record = (
              session.query(db.Predictor)
              .filter_by(company_id=None, id=row["resource_id"])
              .first()
          )
          if predicrtor_record is None:
              continue
          predicrtor_record.json_ai = row["content"]
  
      session.commit()
  
      op.drop_table("json_storage")
  
imports: import json
  from alembic import op
  import sqlalchemy
  import mindsdb.interfaces.storage.db
  from mindsdb.interfaces.storage.fs import RESOURCE_GROUP
label_desc: Use image node_id 2 for calling a global function with example usage: downgrade() without return types