analytics/priv/repo/migrations/20210406073254_add_name_to_shared_links.exs
Uku Taht 58cff47b6f
Add name to shared links (#910)
* Add name to shared links

* Add changelog entry
2021-04-06 14:32:38 +03:00

16 lines
308 B
Elixir

defmodule Plausible.Repo.Migrations.AddNameToSharedLinks do
use Ecto.Migration
def change do
alter table(:shared_links) do
add :name, :string
end
execute "UPDATE shared_links SET name=slug"
alter table(:shared_links) do
modify :name, :string, null: false
end
end
end