2019-09-08 01:49:56 +02:00
|
|
|
defmodule Mobilizon.Storage.Repo do
|
2022-04-07 18:37:44 +02:00
|
|
|
@moduledoc false
|
2019-09-08 01:49:56 +02:00
|
|
|
|
2019-02-14 14:19:55 +01:00
|
|
|
use Ecto.Repo,
|
|
|
|
otp_app: :mobilizon,
|
|
|
|
adapter: Ecto.Adapters.Postgres
|
2017-12-08 09:58:14 +01:00
|
|
|
|
|
|
|
@doc """
|
2019-09-08 01:49:56 +02:00
|
|
|
Dynamically loads the repository url from the DATABASE_URL environment variable.
|
2017-12-08 09:58:14 +01:00
|
|
|
"""
|
2021-10-05 17:43:45 +02:00
|
|
|
@spec init(any(), any()) :: {:ok, Keyword.t()}
|
2017-12-08 09:58:14 +01:00
|
|
|
def init(_, opts) do
|
2021-02-01 14:57:58 +01:00
|
|
|
{:ok, opts}
|
2017-12-08 09:58:14 +01:00
|
|
|
end
|
|
|
|
end
|