Problem changing database adapter in umbrella app

I have an umbrella app where one of the apps was created with the --database mysql. I added a new app with but forgot to specify the database. So I converted it to mysql afterwards. Remove the postres dep, added mariaex dep. Changed the config files to use MySQL adapter. But I’m still getting the error below. I’ve searched everything I can think of but cant find where is pulling in postgress

02:05:01.849 [info] Application ucc_users exited: UccUsers.Application.start(:normal, []) returned an error: shutdown: failed to start child: UccUsers.Repo
    ** (EXIT) an exception was raised:
        ** (RuntimeError) could not find Ecto.Adapters.Postgres.Connection.

Please verify you have added :postgrex as a dependency:

    {:postgrex, ">= 0.0.0"}

And remember to recompile Ecto afterwards by cleaning the current build:

    mix deps.clean --build ecto

            (ecto) lib/ecto/adapters/sql.ex:336: Ecto.Adapters.SQL.child_spec/4
            (ecto) lib/ecto/repo/supervisor.ex:109: Ecto.Repo.Supervisor.init/1
            (stdlib) supervisor.erl:272: :supervisor.init/1
            (stdlib) gen_server.erl:328: :gen_server.init_it/6
            (stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3

I have deleted _build and deps, mix.lock. Still does not fix the issue.

Has anyone seen this issue before?

try running this if on unix.

find . -type f -exec grep -H ostgres {} ;

On my machine, only config/config.exs contains reference to Postgres.

Maybe You can show us this file?

1 Like

This is a bit difficult to diagnose without seeing code or config files. Is this project open source by any chance?

@lukerollans Fully understand its hard to answer without seeing the source. Unfortunately, its not open source. That’s why I asked if anyone has seen an issue like this below :).

WTF, it was an unsaved buffer in my editor. I didn’t save the adapter change. Now I’m embarrassed.

My searches in subl did not find the issue. However, @kokolegorille suggested find did find the issue. Thanks everyone!!