Closed emmyduruc closed 7 months ago
Thanks @emmyduruc — do any of the other local commands work? (ie: are you certain the project is linked correctly?)
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 supabase migration list
and share the output?
Could you run
supabase migration list
and share the output? here is the output from "supabase migration list"
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 supabase projects list
to check that you are linked to the right project?
If so, run supabase db pull
. This will pull down schema changes from remote to local so they are back in sync.
Can you run
supabase projects list
to check that you are linked to the right project?If so, run
supabase db pull
. This will pull down schema changes from remote to local so they are back in sync.
@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 | Local | Remote |
---|---|---|
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 supabase db diff
which should report no changes found.
One more question to check: have you saved all your local migrations to disk? This can be done with
supabase db diff
which should report no changes found.
Unfortunately did not help
Unfortunately did not help
What's the output from supabase db diff
and supabase db diff --linked
?
As a last resort, you can also reset your remote database: supabase db reset --linked
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
Start a local database
supabase db start
Backup your migrations directory
mv supabase/migrations supabase/backup
Dump your remote schema
mkdir supabase/migrations
supabase db dump -f supabase/migrations/0_schema.sql
Save local diff as a migration file
supabase db diff -f schema_drift
Repair your migration history and push
supabase migration repair --status reverted
supabase migration repair --status applied 0
supabase db push
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.
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.