mirror of
https://github.com/plausible/analytics.git
synced 2024-12-18 23:11:43 +03:00
21 lines
352 B
Elixir
21 lines
352 B
Elixir
defmodule Plausible.Repo.Migrations.AddNameToEvents do
|
|
use Ecto.Migration
|
|
use Plausible.Repo
|
|
|
|
def change do
|
|
alter table(:events) do
|
|
add :name, :string
|
|
end
|
|
|
|
flush()
|
|
|
|
Repo.update_all(Plausible.Event, set: [name: "pageview"])
|
|
|
|
flush()
|
|
|
|
alter table(:events) do
|
|
modify :name, :string, null: false
|
|
end
|
|
end
|
|
end
|