Skip to main content

lib/cmdc_memory_pg/repo.ex

defmodule CMDCMemoryPg.Repo do
  @moduledoc """
  Ecto Repo for cmdc_memory_pg。

  集成方在应用 supervisor 中启动:

      children = [
        CMDCMemoryPg.Repo
      ]

  并在 `config/runtime.exs` 配置连接:

      config :cmdc_memory_pg, CMDCMemoryPg.Repo,
        database: "cmdc_prod",
        username: System.fetch_env!("PGUSER"),
        ...
  """

  use Ecto.Repo,
    otp_app: :cmdc_memory_pg,
    adapter: Ecto.Adapters.Postgres
end