mobilizon/priv/repo/migrations/20190425075451_add_visibility_to_actor.exs

22 lines
400 B
Elixir
Raw Normal View History

defmodule Mobilizon.Repo.Migrations.AddVisibilityToActor do
use Ecto.Migration
2019-09-09 00:52:49 +02:00
alias Mobilizon.Actors.ActorVisibility
def up do
2019-09-09 00:52:49 +02:00
ActorVisibility.create_type()
alter table(:actors) do
2019-09-09 00:52:49 +02:00
add(:visibility, ActorVisibility.type(), default: "private")
end
end
def down do
alter table(:actors) do
remove(:visibility)
end
2019-09-09 00:52:49 +02:00
ActorVisibility.drop_type()
end
end