© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•14mo ago•
3 replies
Tshepo

Passing Supabase ENV variables to the migrations file

Is there a way to pass Supabase environment variables to a migrations file? I'm setting up a foreign data wrapper to access a table in different database, I need to pass in db credentials to the migrations file and I want to be able to pass in dynamic values based on what I have in the supabase environment variables. Any ideas?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Supabase behaves as though it cannot find the env variables
SupabaseSSupabase / help-and-questions
13mo ago
Supabase brancing - vercel preview env variables get overwritten
SupabaseSSupabase / help-and-questions
4w ago
Different migrations per env
SupabaseSSupabase / help-and-questions
7mo ago
Passing variables to RPC for RLS
SupabaseSSupabase / help-and-questions
3y ago