ERROR: cannot insert multiple commands into a prepared statement
When using supabase db diff command all my declarative schemas generate the baseline migration. And then supabase db reset chokes with this error.
ERROR: cannot insert multiple commands into a prepared statement (SQLSTATE 42601)
At statement: 317 CREATE OR REPLACE FUNCTION public.consume_book_credits_atomic(p_user_id uuid, p_project_id uuid, p_credits_to_consume integer)
RETURNS void
LANGUAGE plpgsql
SECURITY DEFINER
SET search_path TO ''
AS $function$ ERROR: cannot insert multiple commands into a prepared statement (SQLSTATE 42601)
At statement: 317 CREATE OR REPLACE FUNCTION public.consume_book_credits_atomic(p_user_id uuid, p_project_id uuid, p_credits_to_consume integer)
RETURNS void
LANGUAGE plpgsql
SECURITY DEFINER
SET search_path TO ''
AS $function$