-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supbase local migration not being updated in remote #2136
Comments
Thanks @emmyduruc — do any of the other local commands work? (ie: are you certain the project is linked correctly?) |
the project is linked correctly all other local commands works effectively |
Could you run |
It does seem like all your local migrations are already pushed to remote. Can you elaborate which migration file and which statement is missing on remote? |
They are pushed to remote but i do not see the new tables the local and remote tables looks totally different though the migrations are in sync |
Can you run If so, run |
@sweatybridge thanks for your comment.... i have checked the project list it seems i am connected to the right project i also pulled the remote yet they remain unsynced
I literally have no clue on how to resolve this as it seems super frustrating |
One more question to check: have you saved all your local migrations to disk? This can be done with |
Unfortunately did not help |
What's the output from |
As a last resort, you can also reset your remote database: This will delete all data in your remote database so make sure to have a backup. |
Any updates on this one? There's another way to sync up your schema
supabase db start
mv supabase/migrations supabase/backup
mkdir supabase/migrations
supabase db dump -f supabase/migrations/0_schema.sql
supabase db diff -f schema_drift
I think these steps will be simpler with declarative schema. But for now, you will have to fix the schema drift using those steps above. |
Thanks for that @sweatybridge, helped me a lot! 👍 |
Bug report
i am using the CLI migration locally is up-to-date and i can see new tables in studioURL but when i run $ "supabase db push"
Connecting to remote database...
Remote database is up to date.
and when i check my remote db the changes are not up-to-date
Describe the bug
the Remote db is not getting updated
A clear and concise description of what the bug is.
i am using the CLI migration locally is up-to-date and i can see new tables in studioURL but when i run $ "supabase db push"
Connecting to remote database...
Remote database is up to date.
To Reproduce
supabase create new migration
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
That the local changes should be in the remote when i run supabase db push
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: