When mix ecto.create
is executed the result is:
11:36:42.830 [error] GenServer #PID<0.179.0> terminating
** (KeyError) key :username not found in: [types: true, backoff_type: :stop, pool: DBConnection.Connection, database: "template1", otp_app: :blog, repo: Blog.Repo, adapter: Ecto.Adapters.Postgres, hostname: "localhost", pool_size: 10]
(elixir) lib/keyword.ex:343: Keyword.fetch!/2
(postgrex) lib/postgrex/protocol.ex:411: Postgrex.Protocol.startup/2
(postgrex) lib/postgrex/protocol.ex:361: Postgrex.Protocol.handshake/2
(db_connection) lib/db_connection/connection.ex:134: DBConnection.Connection.connect/2
(connection) lib/connection.ex:623: Connection.enter_connect/5
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
** (Mix) The database for Blog.Repo couldn't be created: an exception was raised:
** (KeyError) key :username not found in: [types: true, backoff_type: :stop, pool: DBConnection.Connection, database: "template1", otp_app: :blog, repo: Blog.Repo, adapter: Ecto.Adapters.Postgres, hostname: "localhost", pool_size: 10]
(elixir) lib/keyword.ex:343: Keyword.fetch!/2
(postgrex) lib/postgrex/protocol.ex:411: Postgrex.Protocol.startup/2
(postgrex) lib/postgrex/protocol.ex:361: Postgrex.Protocol.handshake/2
(db_connection) lib/db_connection/connection.ex:134: DBConnection.Connection.connect/2
(connection) lib/connection.ex:623: Connection.enter_connect/5
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
I don't know how to fix this error in order to explore and analyze this example of many_to_many relashion.