analytics/priv/repo/migrations/20210406073254_add_name_to_shared_links.exs

16 lines
308 B
Elixir
Raw Normal View History

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