2019-09-08 01:49:56 +02:00
|
|
|
defmodule Mobilizon.Storage.Repo do
|
2018-01-14 17:56:50 +01:00
|
|
|
@moduledoc """
|
2019-09-08 01:49:56 +02:00
|
|
|
Mobilizon Repo.
|
2018-01-14 17:56:50 +01:00
|
|
|
"""
|
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-09-28 19:40:37 +02:00
|
|
|
@spec init(any(), any()) :: any()
|
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
|