Skip to content

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

276 B
Raw Blame
defmodule Plausible.Repo.Migrations.AddTeamsIdentifier do
  use Ecto.Migration

  def change do
    alter table(:teams) do
      add :identifier, :binary_id, null: false, default: fragment("gen_random_uuid()")
    end

    create unique_index(:teams, [:identifier])
  end
end