Skip to content

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

344 B
Raw Blame
defmodule Plausible.Repo.Migrations.AddCurrencyToSubscription do
  use Ecto.Migration

  def change do
    alter table(:subscriptions) do
      add :currency_code, :string
    end

    execute "UPDATE subscriptions set currency_code='USD'"

    alter table(:subscriptions) do
      modify :currency_code, :string, null: false
    end
  end
end