def METHOD_NAME() -> None:
    """Upgrade."""
    schema = config["schema"]
    staticschema = config["schema_static"]
    parentschema = config.get("parentschema")
    engine = op.get_bind().engine
    with engine.connect() as connection:
        if type(engine).__name__ != "MockConnection" and op.get_context().dialect.has_table(
            connection, "user", schema=staticschema
        ):
            return
    op.create_table(
        "user",
        Column("type", String(10), nullable=False),
        Column("id", Integer, primary_key=True),
        Column("username", Unicode, unique=True, nullable=False),
        Column("password", Unicode, nullable=False),
        Column("email", Unicode, nullable=False),
        Column("is_password_changed", Boolean, default=False),
        Column("role_name", String),
        schema=staticschema,
    )
    parent_column = ""
    parent_select = ""
    parent_join = ""
    if parentschema is not None and parentschema != "":
        op.add_column("user", Column("parent_role_name", String), schema=staticschema)
        parent_column = ", parent_role_name"
        parent_select = ", pr.name"
        parent_join = f"LEFT OUTER JOIN {parentschema!s}.role AS pr ON (pr.id = u.parent_role_id)"
    try:
        op.execute(
            "INSERT INTO %(staticschema)s.user "
            "(type, username, password, email, is_password_changed, role_name%(parent_column)s) ("
            "SELECT u.type, u.username, u.password, u.email, "
            "u.is_password_changed, r.name%(parent_select)s "
            "FROM %(schema)s.user AS u "
            "LEFT OUTER JOIN %(schema)s.role AS r ON (r.id = u.role_id) %(parent_join)s"
            ")"
            % {
                "staticschema": staticschema,
                "schema": schema,
                "parent_select": parent_select,
                "parent_column": parent_column,
                "parent_join": parent_join,
            }
        )
        op.drop_table("user", schema=schema)
    except Exception:
        op.execute(
            "INSERT INTO %(staticschema)s.user (type, username, email, password, role) "
            "VALUES ( 'user', 'admin', 'info@example.com', '%(pass)s', 'role_admin')"
            % {"staticschema": staticschema, "pass": sha1(b"admin").hexdigest()}  # nosec
        )