# Buggy code
async def migrate(
    cur_driver_cls: Type[BaseDriver], new_driver_cls: Type[BaseDriver]
) -> None:
    """Migrate from one driver type to another."""
    # Get custom group data
    core_conf = Config.get_core_conf()
    core_conf.init_custom("CUSTOM_GROUPS", 2)
    all_custom_group_data = await core_conf.custom("CUSTOM_GROUPS").all()

    await cur_driver_cls.migrate_to(new_driver_cls, all_custom_group_data)


# Traceback (RuntimeError)
Traceback (most recent call last):
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/bin/redbot-setup", line 8, in <module>
sys.exit(run_cli())
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/setup.py", line 429, in run_cli
cli()  # pylint: disable=no-value-for-parameter  # click
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/setup.py", line 398, in convert
new_storage_details = loop.run_until_complete(do_migration(current_backend, target))
File "/home/zephyrkul/.pyenv/versions/3.8.1/lib/python3.8/asyncio/base_events.py", line 612, in run_until_complete
return future.result()
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/setup.py", line 210, in do_migration
await config.migrate(cur_driver_cls, new_driver_cls)
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/core/config.py", line 1460, in migrate
core_conf = Config.get_core_conf()
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/core/config.py", line 708, in get_core_conf
return cls.get_conf(
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/core/config.py", line 683, in get_conf
driver = get_driver(cog_name, uuid)
File "/home/zephyrkul/.pyenv/versions/red-V3-3.8.1/lib/python3.8/site-packages/redbot/core/drivers/__init__.py", line 113, in get_driver
raise RuntimeError(
RuntimeError: Please convert to JSON first to continue using the bot.Mongo support was removed in 3.2.

# Fixed code
async def migrate(
    cur_driver_cls: Type[BaseDriver], new_driver_cls: Type[BaseDriver]
) -> None:
    """Migrate from one driver type to another."""
    # Get custom group data
    core_conf = Config.get_core_conf(allow_old=True)
    core_conf.init_custom("CUSTOM_GROUPS", 2)
    all_custom_group_data = await core_conf.custom("CUSTOM_GROUPS").all()

    await cur_driver_cls.migrate_to(new_driver_cls, all_custom_group_data)