Fix migration timestamp type
[akkoma] / lib / pleroma / repo.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Repo do
6 use Ecto.Repo,
7 otp_app: :pleroma,
8 adapter: Ecto.Adapters.Postgres,
9 migration_timestamps: [type: :naive_datetime_usec]
10
11 @doc """
12 Dynamically loads the repository url from the
13 DATABASE_URL environment variable.
14 """
15 def init(_, opts) do
16 {:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
17 end
18 end