mobilizon/priv/repo/migrations/20190425075451_add_visibility_to_actor.exs
Thomas Citharel 12116ba6fa
Add visibility to actors
Also use url helpers to generate urls properly

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-04-25 19:05:05 +02:00

22 lines
416 B
Elixir

defmodule Mobilizon.Repo.Migrations.AddVisibilityToActor do
use Ecto.Migration
alias Mobilizon.Actors.ActorVisibilityEnum
def up do
ActorVisibilityEnum.create_type()
alter table(:actors) do
add(:visibility, ActorVisibilityEnum.type(), default: "private")
end
end
def down do
alter table(:actors) do
remove(:visibility)
end
ActorVisibilityEnum.drop_type()
end
end