trouble setting up declarative schema
i'm testing setting up a declarative schema.
i created a brand new supabase project.
created new, empty local repo and linked to the project.
did
supabase db pull
to sync with the remote project.
then did supabase db dump --schema public > supabase/schemas/$(date +%Y%m%d%H%M%S)_remote_schema.sql
to start setting up my schema.
however, both the dump and the migration files include content like this:
\restrict cqc0H9DqzJcF9rVGRWAxMVqRNXwqyXFScoC9gC3tzKAkymcpw220JFgV3CHCCf5
which results in an error when running supabase db diff:
Applying migration 20250912181907_remote_schema.sql...
ERROR: syntax error at or near "\" (SQLSTATE 42601)
At statement: 0
\restrict cqc0H9DqzJcF9rVGRWAxMVqRNXwqyXFScoC9gC3tzKAkymcpw220JFgV3CHCCf5
^
is this expected behavior? why isn't this working?2 Replies
seems like this is fixed in supabase cli v2.41.2 which is not released yet https://github.com/supabase/cli/releases/tag/v2.41.2
GitHub
Release v2.41.2 · supabase/cli
Changelog
Bug fixes
48a39be: fix: remove psql meta commands from dump (#4145) (@sweatybridge)
Others
1059f3b: chore(deps): bump golang.org/x/net from 0.43.0 to 0.44.0 in the go-minor group acros...
You can use
npx supbase@2.41.2 db pull
to test it out with that version