code: def upgrade():
      op.create_table(
          "json_storage",
          sa.Column("id", sa.Integer(), nullable=False),
          sa.Column("resource_group", sa.String(), nullable=True),
          sa.Column("resource_id", sa.Integer(), nullable=True),
          sa.Column("name", sa.String(), nullable=True),
          sa.Column("content", sa.JSON(), nullable=True),
          sa.Column("company_id", sa.Integer(), nullable=True),
          sa.PrimaryKeyConstraint("id"),
      )
  
      conn = op.get_bind()
      session = sa.orm.Session(bind=conn)
      predictors = conn.execute(
          sa.text(
              """
          select id, json_ai from predictor
      """
          )
      ).fetchall()
  
      for row in predictors:
          try:
              jai = json.loads(row["json_ai"])
          except Exception:
              continue
  
          if jai is None or len(jai) == 0:
              continue
  
          record = db.JsonStorage(
              resource_group=RESOURCE_GROUP.PREDICTOR,
              resource_id=row["id"],
              name="json_ai",
              content=jai,
              company_id=None,
          )
          session.add(record)
  
      session.commit()
  
      with op.batch_alter_table("predictor", schema=None) as batch_op:
          batch_op.drop_column("json_ai")
  
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 1 for calling a global function with example usage: upgrade() without return types