© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•5mo ago•
2 replies
c3

How to seed between migrations, to test your new migrations work on existing data?

In prod, we already have a bunch of data, and some migrations have run. Now I want to run migrations which work on existing data (e.g. convert a pk from int to uuid). I'd like to test this carefully, with automated tests. I was hoping I could add some seed data before running any new migrations, to check the new migrations work correctly on existing data. However, it seems seed data is only run after all the migrations have completed.

Anyone have any advice on how I can robustly test a new migration that needs existing data?
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

Automate SQL Migrations based on local seed script
SupabaseSSupabase / help-and-questions
4y ago
Data Update Migrations
SupabaseSSupabase / help-and-questions
2w ago
Migrations preserving data
SupabaseSSupabase / help-and-questions
4y ago
How to migrate data between two Supabase accounts?
SupabaseSSupabase / help-and-questions
6mo ago