better-auth CLI to detect the configuration since it's only looking for variables exported (when using D1 we construct the configuration with each request and we only have a function)getMigrations is still undocumented and probably abandoned since It's returning generic errors from D1 such as Error: D1_ERROR: not authorized: SQLITE_AUTHOpennext on Cloudflare Workers, everything else better-auth related works like a charm, but if we can't make migration generation is useless, applying the migrations can be done with wrangler against D1, but if we cannot generate the schema according to the current state of the DB we cannot add plugins efficiently by possible knowing what tables to alter and what to add or remove.