Branching did not copy existing schema
This is the error in the newly branched logs I got. And my new branch is baisically an empty schema and it did not copied the schema from my main branch.

10 Replies
check the schema in your migrations file, i think they have an error that comes from db pull
this message chain https://discord.com/channels/839993398554656828/1416137881151344825/1416137881151344825 might be helpful where it suggests using a newer cli version
I removed the schema migration files by deleting the tables in supabase_migrations, and now it only copied the edge functions but not the schema.
are you using github here?
if you delete the tables then it wouldn't have any schema to copy over
Yes I am using GitHub since it’s required for me to link to GitHub.
But I only delete the tables in supabase migration. I suppose they use that sql to migrate the schema
Is there any way for me to restore it back
The first option is using git to get an earlier copy of the files, find the commit where you made the change where
git log -n
provides the last n commits (pick n to be large enough to see your change)
Then copy the files from there.
The main issue that you might face now is that if you have deleted migration files, your remote/local database might go out of sync.Also github is no longer a requirement since this article https://supabase.com/blog/branching-2-0
Introducing Branching 2.0
Create, review and merge Supabase branches all within the dashboard.
I saw the article but I am not sure why my supabase still required me to sync with github

ahh i think you need to enable it via user icon click -> branching via dashboard -> enable
but if you are using github then there is no need
i don't use it since i prefer the github flow
I've enabled branching via dahsboard, and got back my prev migration files, it now copied the schema but not the edge functions. This is the logs
That's strange, i just created a branch now (using the new feature) and the functions did not have any issues
These logs are from workflow in the branch and your functions a deployed on main?