def get_step_name(dir, step):
    """Generates the name of the script conversion filename."""
    if dir == 'upgrade':
        first = step - 1
        second = step
    elif dir == 'downgrade':
        first = step + 1
        second = step
    else:
        first = step
        second = step
    step_name = f'{dir}_{first}_to_{second}'
    return step_name
