Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

311 B
Raw Blame
defmodule Plausible.IngestRepo.Migrations.PopulateLocationData do
  use Ecto.Migration

  def up do
    try do
      Location.load_all()
    rescue
      # Already loaded
      ArgumentError -> nil
    end

    Plausible.DataMigration.LocationsSync.run()
  end

  def down do
    raise "Irreversible"
  end
end