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
As Media Type Handlers documents, a CREATE DOMAIN command is needed to return custom media types. However, supabase db diff does not add these commands to the generated migration, so pushing the migration to other systems will fail.
To Reproduce
Create a custom domain and a function returning it, for example:
create domain "text/plain"astext;
CREATE OR REPLACEFUNCTIONecho_service(input text)
RETURNS "text/plain"
LANGUAGE plpgsql
AS $function$declare
begin-- Echo input back as plain text
perform set_config('response.headers', '[{"Content-Type": "text/plain"}]', true);
return input;
end;$function$
;
Create a migration calling supabase db diff --local.
Expected behavior
Both the create domain and the CREATE OR REPLACE FUNCTION commands are added to the migration.
Actual behavior
Only the CREATE OR REPLACE FUNCTION command is added to the migration.
As a result, ERROR: 42704: type "text/plain" does not exist will be thrown if trying to apply the migration elsewhere.
System information
All/latest.
The text was updated successfully, but these errors were encountered:
Bug report
Describe the bug
As Media Type Handlers documents, a CREATE DOMAIN command is needed to return custom media types. However,
supabase db diff
does not add these commands to the generated migration, so pushing the migration to other systems will fail.To Reproduce
Create a custom domain and a function returning it, for example:
Create a migration calling
supabase db diff --local
.Expected behavior
Both the
create domain
and theCREATE OR REPLACE FUNCTION
commands are added to the migration.Actual behavior
Only the
CREATE OR REPLACE FUNCTION
command is added to the migration.As a result,
ERROR: 42704: type "text/plain" does not exist
will be thrown if trying to apply the migration elsewhere.System information
All/latest.
The text was updated successfully, but these errors were encountered: