debianize-mobilizon/priv/repo/migrations/20190425075451_add_visibility_to_actor.exs
2019-09-09 00:52:49 +02:00

22 lines
400 B
Elixir

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