analytics/priv/repo/migrations/20210513091653_add_currency_to_subscription.exs

16 lines
344 B
Elixir
Raw Normal View History

2021-05-13 12:42:01 +03:00
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