© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago
aaronksaunders

Error When Migrating Database schema extensions does not exist when migrating database

I have followed the information found here, #1416, and exported from my old database using the command below

pg_dump \
  -h db.thedatabase.supabase.co \
  -U postgres --schema-only \
  --clean --if-exists --schema=public \
  > supabase_schema.sql
pg_dump \
  -h db.thedatabase.supabase.co \
  -U postgres --schema-only \
  --clean --if-exists --schema=public \
  > supabase_schema.sql


when I try to import into my new database, I am getting the error above

psql --dbname "$MAINDB" --single-transaction --variable ON_ERROR_STOP=1 --file supabase_schema.sql
psql --dbname "$MAINDB" --single-transaction --variable ON_ERROR_STOP=1 --file supabase_schema.sql


on this statement in the SQL file

    id uuid DEFAULT extensions.uuid_generate_v4() NOT NULL,
    id uuid DEFAULT extensions.uuid_generate_v4() NOT NULL,


I have been googling around for the last few hours so any help will be appreciated
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

Error: schema "vaults" does not exist
SupabaseSSupabase / help-and-questions
6mo ago
ERROR: 42704: type "extensions.vector" does not exist
SupabaseSSupabase / help-and-questions
4mo ago
ERROR: schema "supabase_functions" does not exist
SupabaseSSupabase / help-and-questions
3y ago
schema "cron" does not exist
SupabaseSSupabase / help-and-questions
3y ago