hello, facing an issue with diff in two databases - please help! Ty

I'm trying to diff two databases - I know there's one additional table in the public schema of the source db, but it doesn't exist in the target db. and yet, when i do the diff (using pgAdmin4, or the supabase CLI version), it doesn't show up in the diff sql. Any solutions to this please?
4 Replies
iLikeBikes
iLikeBikes3y ago
I just started working with the CLI today and was trying to use supabase db diff this is not a in the list of acceptable commands. It seems like it has moved to supabase db changes, but I am finding that the --use-migra and -f flags do no work on it output from supabase db diff
supabase db diff
Usage:
supabase db [command]

Available Commands:
branch Manage branches. Each branch is associated with a separate database.
changes Diffs the local database with current migrations, then print the diff to standard output.
commit Diffs the local database with current migrations, writing it as a new migration.
push Push new migrations to the remote database.
remote
reset Resets the local database to reflect current migrations. Any changes on the local database that is not committed will be lost.
switch Switch branches.

Flags:
-h, --help help for db
supabase db diff
Usage:
supabase db [command]

Available Commands:
branch Manage branches. Each branch is associated with a separate database.
changes Diffs the local database with current migrations, then print the diff to standard output.
commit Diffs the local database with current migrations, writing it as a new migration.
push Push new migrations to the remote database.
remote
reset Resets the local database to reflect current migrations. Any changes on the local database that is not committed will be lost.
switch Switch branches.

Flags:
-h, --help help for db
not sure if this helps you @rbkayz but I had installed the cli a while back with homebrew and reinstalled with npm and it seems to be working now for me.
rbkayz
rbkayzOP3y ago
Thank you @iLikeBikes. will try this again However, for some reason, whenever I try and diff even with pgAdmin, the public schema doesn't show up at all in the diff. It just shows up as schema objects. Is that normal?
No description
iLikeBikes
iLikeBikes3y ago
no...? not sure really. are you trying to migrate records or just schema updates
rbkayz
rbkayzOP3y ago
just schema just can't seem to diff the public schema

Did you find this page helpful?