Migration helpers seem to be outdated
Trying to run a few migrations and am running into "Uncaught Error: migrations:aiOwners is not a functionReference" I assume from the changes with some of the recent updates
7 Replies
Sounds like the code is using old style function identifier strings, which still work at runtime but don't typecheck in TypeScript. You could use
"migrations:aiOwners" as any
to bypass TypeScript or move to api.migrations.aiOwners
.It seems like I was having a bit trouble at runtime. Do you think I just need to tweak the same code to add the new function identifiers?
This sounds like a real issue, can you point me to the code that's running into the exception?
Yeah definitely one second I'll see if I can grab that; I made some changes as a workaround in the meantime
@Michal Srb https://github.com/get-convex/convex-helpers/blob/main/convex/lib/migrations.ts running into this whenever the "runMigration" action is triggered via the UI when passing the name of the migration
GitHub
convex-helpers/convex/lib/migrations.ts at main · get-convex/convex...
A collection of useful code to complement the official packages. - get-convex/convex-helpers
Ah as I suspected, that is a bug on our side. What you can do to unblock yourself is to hardcode the mutation name in the
runMigration
function to something like internal.foo.myMutatiton
.
We'll try to get a fix out ASAP.Thanks appreciate it!