Never mind! I had changed DATABASE_URL and forgot to set it back.
I just ran a migration on Heroku that I had already run locally:
defmodule BookList.Repo.Migrations.AddStartAndFinishDateStrings do
use Ecto.Migration
def change do
alter table(:books) do
add :start_date_string, :string, default: ""
add :finish_date_string, :string, default: ""
end
end
end
It resulted in the error messages listed below, and an now non-functional remote app.
What the the heck went wrong? How do I fix this?
$ heroku run POOL_SIZE=2 mix ecto.migrate
Running POOL_SIZE=2 mix ecto.migrate on ⬢ arcane-cliffs-95237... up, run.8000 (Hobby)
05:24:24.103 [error] GenServer #PID<0.234.0> terminating
** (RuntimeError) Connect raised a KeyError error. The exception details are hidden, as
they may contain sensitive data such as database credentials.
(elixir) lib/keyword.ex:371: Keyword.fetch!/2
(postgrex) lib/postgrex/protocol.ex:98: Postgrex.Protocol.connect/1
(db_connection) lib/db_connection/connection.ex:135: DBConnection.Connection.connect/2
(connection) lib/connection.ex:622: Connection.enter_connect/5
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: nil
05:24:24.104 [error] GenServer #PID<0.235.0> terminating
** (RuntimeError) Connect raised a KeyError error. The exception details are hidden, as
they may contain sensitive data such as database credentials.
(elixir) lib/keyword.ex:371: Keyword.fetch!/2
(postgrex) lib/postgrex/protocol.ex:98: Postgrex.Protocol.connect/1
(db_connection) lib/db_connection/connection.ex:135: DBConnection.Connection.connect/2
(connection) lib/connection.ex:622: Connection.enter_connect/5
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: nil
** (exit) exited in: :gen_server.call(#PID<0.234.0>, {:checkout, #Reference<0.1109592044.1150025729.222907>, true, :infinity}, 5000)
** (EXIT) an exception was raised:
** (RuntimeError) Connect raised a KeyError error. The exception details are hidden, as
they may contain sensitive data such as database credentials.
(elixir) lib/keyword.ex:371: Keyword.fetch!/2
(postgrex) lib/postgrex/protocol.ex:98: Postgrex.Protocol.connect/1
(db_connection) lib/db_connection/connection.ex:135: DBConnection.Connection.connect/2
(connection) lib/connection.ex:622: Connection.enter_connect/5
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
(db_connection) lib/db_connection/poolboy.ex:112: DBConnection.Poolboy.checkout/3
(db_connection) lib/db_connection.ex:928: DBConnection.checkout/2
(db_connection) lib/db_connection.ex:750: DBConnection.run/3
(db_connection) lib/db_connection.ex:1141: DBConnection.run_meter/3
(db_connection) lib/db_connection.ex:592: DBConnection.prepare_execute/4
(ecto) lib/ecto/adapters/postgres/connection.ex:86: Ecto.Adapters.Postgres.Connection.execute/4
(ecto) lib/ecto/adapters/sql.ex:256: Ecto.Adapters.SQL.sql_call/6
(ecto) lib/ecto/adapters/sql.ex:198: Ecto.Adapters.SQL.query!/5