code: def upgrade() -> None:
      # ### commands auto generated by Alembic - please adjust! ###
      with op.batch_alter_table("backends", schema=None) as batch_op:
          batch_op.alter_column(
              "type",
              existing_type=sa.VARCHAR(length=6),
              type_=sa.Enum(
                  "AWS",
                  "AZURE",
                  "DSTACK",
                  "GCP",
                  "LAMBDA",
                  "LOCAL",
                  "TENSORDOCK",
                  name="backendtype",
              ),
              existing_nullable=False,
          )
  
      with op.batch_alter_table("projects", schema=None) as batch_op:
          batch_op.add_column(
              sa.Column(
                  "owner_id",
                  sqlalchemy_utils.types.uuid.UUIDType(binary=False),
                  nullable=True,
              )
          )
          batch_op.create_foreign_key(
              batch_op.f("fk_projects_owner_id_users"),
              "users",
              ["owner_id"],
              ["id"],
              ondelete="SET NULL",
          )
  
      with op.batch_alter_table("repos", schema=None) as batch_op:
          batch_op.alter_column(
              "type",
              existing_type=sa.VARCHAR(length=6),
              type_=sa.Enum(
                  "REMOTE", "LOCAL", "VIRTUAL", name="repotype"
              ),
              existing_nullable=False,
          )
  
      with op.batch_alter_table("users", schema=None) as batch_op:
          batch_op.add_column(
              sa.Column("projects_quota", sa.Integer(), nullable=True)
          )
  
      # ### end Alembic commands ###
  
      op.execute(
          "UPDATE projects SET owner_id = (SELECT id FROM users WHERE name == 'admin') WHERE owner_id IS NULL"
      )
      op.execute(
          "UPDATE users SET projects_quota = 3 WHERE projects_quota IS NULL"
      )
  
imports: import sqlalchemy
  import sqlalchemy_utils
  from alembic import op
label_desc: Use image node_id 1 for calling a global function with example usage: upgrade() without return types