© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
4 replies
Bardia

Migration timing out in Next.js Route

I am building an app where I am provisioning user's their own databases in Neon. I am currently running into an issue where after I create the user's database and connect to it, I try and run the migrate function and it just times out. Not sure if I'm doing it incorrectly or not.

I tried with two variations of the path to the migrations folder:
await migrate(userDb, {
        migrationsFolder: path.join(process.cwd(), 'drizzle/user/migrations'),
      });
await migrate(userDb, {
        migrationsFolder: path.join(process.cwd(), 'drizzle/user/migrations'),
      });


await migrate(userDb, {
        migrationsFolder: './drizzle/user/migrations'
      });
await migrate(userDb, {
        migrationsFolder: './drizzle/user/migrations'
      });

Neither have worked.

I know this isn't a typical use case but I'm not sure if I'm doing something wrong, it's not supported or if there are any workarounds?
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Next JS migration Error
Drizzle TeamDTDrizzle Team / help
3y ago
.prepare() in Next.js App Router
Drizzle TeamDTDrizzle Team / help
3y ago
Having to restart Next.js server after migration
Drizzle TeamDTDrizzle Team / help
2y ago
postgres-js migration configuration
Drizzle TeamDTDrizzle Team / help
3y ago