471 B · text History e569b6d
defmodule CartosnapApp.Repo.Migrations.EnablePostgis do
  @moduledoc """
  Photos and trips have geometry columns. The postgis/postgis image enables
  the extension only in the database it was started with, so a database
  made afterwards (the test one) needs it asked for. Dated before the first
  geometry column; a no-op where PostGIS is already on.
  """

  use Ecto.Migration

  def up, do: execute("CREATE EXTENSION IF NOT EXISTS postgis")

  def down, do: :ok
end