Ecto + Supabase: no tables visible

I have really weird issue with Ecto connecting to Supabase. Perhaps someone faced something similar.

I recently deployed an app to fly.io with database on Supabase. The app deployed, the migrations were run, I can see the tables in Supabase UI.

However, now I wanted to seed the database from my local machine. I have a separate repo with seeds. I put the connection config (same as a deployed app) onto it, but when I try to run the seeds I see an error that a relation cannot be found. At the same time I can see that a table with that name exists in Supabase UI. I can connect using the same config via psql = I see the tables. Only when connecting via Ecto the tables cannot be seen.

I tried querying for search path - looks ok. I tried executing raw SQL with table name prefixed by a schema - table not found. I can query pg_catalog and information_schema - all show no tables (except built-in ones) when queried via Ecto.

Any ideas what might be wrong here? The libraries like Ecto and Postgrex are in most recent versions, if that matters. Elixir i 1.18.2 on OTP27.

Update: Tried also with different version of Elixir (1.16) and OTP (26), but still the same result.

Ok, nevermind, I tried session pooler instead of direct connection and it worked now.

1 Like