code: def upgrade():
      """
      First migration.
      Generates a migration script by difference between model and database and executes it
      """
  
      target_metadata = Base.metadata
  
      mc = context.get_context()
  
      migration_script = produce_migrations(mc, target_metadata)
  
      autogen_context = api.AutogenContext(mc, autogenerate=True)
  
      # Seems to be the only way to apply changes to the database
      template_args = {}
      render._render_python_into_templatevars(
          autogen_context, migration_script, template_args
      )
  
      code = template_args["upgrades"]
      code = code.replace("\n    ", "\n")
      logger.info("\nPerforming database changes:")
      logger.info(code)
      exec(code)
  
imports: import datetime
  from alembic.autogenerate import produce_migrations, render, api
  from alembic import context
  from sqlalchemy import UniqueConstraint
  from sqlalchemy.orm import declarative_base
  from sqlalchemy import Column, Integer, String, DateTime, Boolean, Index
  from alembic import op
  import sqlalchemy
  import mindsdb.interfaces.storage.db
  from mindsdb.interfaces.storage.db import Json, Array
  from mindsdb.utilities import log
label_desc: Use image node_id 1 for calling a global function with example usage: upgrade() without return types