The help tells me I should unlock my encrypted wallet:

```
> help migratewallet

...
Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.
```

But when I do so and attempt to migrate the wallet I'm told that I've entered my password for needlessly:

```
> migratewallet

Error: migratewallet on encrypted wallets is currently unsupported.
```

<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

v24.0.1

if (!(path_type == fsfile_typenot_found || path_type == fsfile_typedirectory ||
          (path_type == fsfile_typesymlink && fsis_directory(_path)) ||
          (path_type == fsfile_typeregular && fsPathFromString(name).filename() == fsPathFromString(name)))) {
        error_string = Untranslated(strprintf(
              "Invalid - path '%s'. - path should point to a directory wher.dat and "
              "database/log.?????????? files can be stored, a location where such a directory could be created, "
              "or (for backwards compatibility) the name of an existing data file in -dir (%s)",
              name, fsquoted(fsPathToString(GetWalletDir()))));
        status = DatabaseStatusFAILED_BAD_PATH;
        return nullptr;
    }
    return MakeDatabase(_path, options, status, error_string);
}
stdshared_ptr<CWallet> CWalletCreate(WalletContext& context, const stdstring& name, stdunique_ptr<WalletDatabase> database, uint64_t _creation_flags, bilingual_str& error, stdvector<bilingual_str>& warnings)
{
    interfacesChain* chain = context.chain;
    ArgsManager& args = *Assert(context.args);
    const stdstring& File = database->Filename();
    const auto start{SteadyClocknow()};
    // TODO Can't use stdmake_shared because we need a custom deleter but
    // should be possible to use stdallocate_shared.
    stdshared_ptr<CWallet> Instance(new CWallet(chain, name, stdmove(database)), ReleaseWallet);
    Instance->m_keypool_size = stdmax(args.GetIntArg("-keypool", DEFAULT_KEYPOOL_SIZE), int64_t{1});
    Instance->m_notify_tx_changed_script = args.GetArg("-notify", "");
    // Load 
    bool rescan_required = false;
    DBErrors nLoadWalletRet = Instance->LoadWallet();
    if (nLoadWalletRet != DBErrorsLOAD_OK) {
        if (nLoadWalletRet == DBErrorsCORRUPT) {
            error = strprintf(_("Error loading %s Wallet corrupted"), File);