I am new to the Elixir, here's what my config file, and Repo. and a migration looks like
use Mix.Config
config :zeri, ecto_repos: [Zeri.Repo]
database_url = "postgresql://postgres:9835674725@localhost:5432/kaisa_db"
config :zeri, Zeri.Repo, url: database_url
defmodule Zeri.Repo do
use Ecto.Repo,
otp_app: :zeri,
adapter: Ecto.Adapters.Postgres
end
defmodule Zeri.Repo.Migrations.First do
use Ecto.Migration
def change do
execute("CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";", "")
create(table(:users, primary_key: false))
add :id, :uuid, primary_key: true, default: fragment("uuid_generate_v4()")
add :username, :text, null: true
end
end
end
when running 'mix ecto.migrate' i'm getting the following error
** (MatchError) no match of right hand side value: {:error, {:postgrex, {'no such file or directory', 'postgrex.app'}}}
(ecto_sql 3.8.3) lib/ecto/migrator.ex:136: Ecto.Migrator.with_repo/3
(ecto_sql 3.8.3) lib/mix/tasks/ecto.migrate.ex:141: anonymous fn/5 in Mix.Tasks.Ecto.Migrate.run/2
(elixir 1.13.4) lib/enum.ex:2396: Enum."-reduce/3-lists^foldl/2-0-"/3
(ecto_sql 3.8.3) lib/mix/tasks/ecto.migrate.ex:129: Mix.Tasks.Ecto.Migrate.run/2
(mix 1.13.4) lib/mix/task.ex:397: anonymous fn/3 in Mix.Task.run_task/3
(mix 1.13.4) lib/mix/cli.ex:84: Mix.CLI.run_task/2