code: def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table(
          "tab_state",
          sa.Column("created_on", sa.DateTime(), nullable=True),
          sa.Column("changed_on", sa.DateTime(), nullable=True),
          sa.Column("extra_json", sa.Text(), nullable=True),
          sa.Column(
              "id", sa.Integer(), nullable=False, autoincrement=True
          ),
          sa.Column("user_id", sa.Integer(), nullable=True),
          sa.Column("label", sa.String(length=256), nullable=True),
          sa.Column("active", sa.Boolean(), nullable=True),
          sa.Column("database_id", sa.Integer(), nullable=True),
          sa.Column("schema", sa.String(length=256), nullable=True),
          sa.Column("sql", sa.Text(), nullable=True),
          sa.Column("query_limit", sa.Integer(), nullable=True),
          sa.Column("latest_query_id", sa.String(11), nullable=True),
          sa.Column(
              "autorun", sa.Boolean(), nullable=False, default=False
          ),
          sa.Column("template_params", sa.Text(), nullable=True),
          sa.Column("created_by_fk", sa.Integer(), nullable=True),
          sa.Column("changed_by_fk", sa.Integer(), nullable=True),
          sa.ForeignKeyConstraint(["changed_by_fk"], ["ab_user.id"]),
          sa.ForeignKeyConstraint(["created_by_fk"], ["ab_user.id"]),
          sa.ForeignKeyConstraint(["database_id"], ["dbs.id"]),
          sa.ForeignKeyConstraint(
              ["latest_query_id"], ["query.client_id"]
          ),
          sa.ForeignKeyConstraint(["user_id"], ["ab_user.id"]),
          sa.PrimaryKeyConstraint("id"),
          sqlite_autoincrement=True,
      )
      op.create_index(
          op.f("ix_tab_state_id"), "tab_state", ["id"], unique=True
      )
      op.create_table(
          "table_schema",
          sa.Column("created_on", sa.DateTime(), nullable=True),
          sa.Column("changed_on", sa.DateTime(), nullable=True),
          sa.Column("extra_json", sa.Text(), nullable=True),
          sa.Column(
              "id", sa.Integer(), nullable=False, autoincrement=True
          ),
          sa.Column("tab_state_id", sa.Integer(), nullable=True),
          sa.Column("database_id", sa.Integer(), nullable=False),
          sa.Column("schema", sa.String(length=256), nullable=True),
          sa.Column("table", sa.String(length=256), nullable=True),
          sa.Column("description", sa.Text(), nullable=True),
          sa.Column("expanded", sa.Boolean(), nullable=True),
          sa.Column("created_by_fk", sa.Integer(), nullable=True),
          sa.Column("changed_by_fk", sa.Integer(), nullable=True),
          sa.ForeignKeyConstraint(["changed_by_fk"], ["ab_user.id"]),
          sa.ForeignKeyConstraint(["created_by_fk"], ["ab_user.id"]),
          sa.ForeignKeyConstraint(["database_id"], ["dbs.id"]),
          sa.ForeignKeyConstraint(
              ["tab_state_id"], ["tab_state.id"], ondelete="CASCADE"
          ),
          sa.PrimaryKeyConstraint("id"),
          sqlite_autoincrement=True,
      )
      op.create_index(
          op.f("ix_table_schema_id"),
          "table_schema",
          ["id"],
          unique=True,
      )
  
imports: import sqlalchemy
  from alembic import op
  from sqlalchemy.dialects import mysql
label_desc: Use image node_id 1 for calling a global function with example usage: upgrade() without return types