mirror of
https://github.com/plausible/analytics.git
synced 2024-12-24 01:54:34 +03:00
16 lines
344 B
Elixir
16 lines
344 B
Elixir
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
|