You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Supabase CLI supabase db diff command to to a DB diff and generate migration files, does not seem to handle PostgreSQL custom domains (https://www.postgresql.org/docs/current/sql-createdomain.html). Specifically, what I observed is the following. If I create a custom domain, then create a table with a column using that custom domain, the do supabase db diff, the DDL for creating the table is generated, but not the DDL for creating the domain. Consequently, a migration file created in this way is invalid and will fail. I tried it with the default, with --use-migra, with --use-pg-diff, and with --use-pgadmin and got the same result.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Install the Supabase CLI.
Initialize a project directory with supabase init.
Start local development with supabase start.
Connect to the local db with psql: psql $(supabase status --output json 2>/dev/null | jq -r '.DB_URL')
Create a custom domain: create domain foo as text
Create a table with the domain: create table bar (name foo)
Exit to a shell and generate a diff: supabase db diff
Observe that the diff has the create table statement but no create domain statement.
Expected behavior
I expected at least one of the diff tools to detect that DDL for custom domains needs to be emitted.
Screenshots
no applicable screenshots
System information
OS: Ubuntu 24.0.2
Version of supabase-js: 2.15.8
Version of Node.js: (running supabase cli binary)
Additional context
no other context
The text was updated successfully, but these errors were encountered:
Bug report
Describe the bug
The Supabase CLI
supabase db diff
command to to a DB diff and generate migration files, does not seem to handle PostgreSQL custom domains (https://www.postgresql.org/docs/current/sql-createdomain.html). Specifically, what I observed is the following. If I create a custom domain, then create a table with a column using that custom domain, the dosupabase db diff
, the DDL for creating the table is generated, but not the DDL for creating the domain. Consequently, a migration file created in this way is invalid and will fail. I tried it with the default, with--use-migra
, with--use-pg-diff
, and with--use-pgadmin
and got the same result.To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
supabase init
.supabase start
.psql $(supabase status --output json 2>/dev/null | jq -r '.DB_URL')
create domain foo as text
create table bar (name foo)
supabase db diff
create table
statement but nocreate domain
statement.Expected behavior
I expected at least one of the diff tools to detect that DDL for custom domains needs to be emitted.
Screenshots
no applicable screenshots
System information
Additional context
no other context
The text was updated successfully, but these errors were encountered: