cli icon indicating copy to clipboard operation
cli copied to clipboard

NOTICE messages from migrations cause supabase start to fail

Open britt opened this issue 3 years ago • 1 comments

Bug report

Describe the bug

If you run SQL statements that generate NOTICE non-fatal error output this causes supabase start to terminate after starting the database without starting any of the other services. For example, if you try to add an extension that already exists

create extension if not exists pgcrypto with schema extensions;

it will show the NOTICEs generated by the migration and stop the startup sequence without starting the API, Studio, etc. even though the migration was successful.

ᐅ supabase start
Error: Error starting database: NOTICE:  extension "uuid-ossp" already exists, skipping
NOTICE:  extension "pgcrypto" already exists, skipping
NOTICE:  extension "pgjwt" already exists, skipping
NOTICE:  extension "pg_graphql" already exists, skipping

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a migration and include the statement
create extension if not exists pgcrypto with schema extensions;
  1. Run supabase start
  2. Look at the command line output
  3. Run docker containers ls
  4. See that only postgres is running

Expected behavior

supabase should continue its startup sequence and start the rest of the services

System information

  • OS: macOS
  • Version of supabase-cli: 0.24.5

britt avatar Apr 19 '22 20:04 britt

Thanks for the report! This should be resolved in the latest version. Can you upgrade and try again?

soedirgo avatar Apr 21 '22 07:04 soedirgo

Feel free to open this ticket again if the problem persists.

sweatybridge avatar Aug 19 '22 04:08 sweatybridge