2019-03-01 17:11:28 +01:00
|
|
|
defmodule Mobilizon.Repo.Migrations.ActorGroupOpenness do
|
|
|
|
use Ecto.Migration
|
2019-09-09 00:52:49 +02:00
|
|
|
alias Mobilizon.Actors.ActorOpenness
|
2019-03-01 17:11:28 +01:00
|
|
|
|
|
|
|
def up do
|
2019-09-09 00:52:49 +02:00
|
|
|
ActorOpenness.create_type()
|
2019-03-01 17:11:28 +01:00
|
|
|
|
|
|
|
alter table(:actors) do
|
2019-09-09 00:52:49 +02:00
|
|
|
add(:openness, ActorOpenness.type(), default: "moderated")
|
2019-03-01 17:11:28 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def down do
|
|
|
|
alter table(:actors) do
|
|
|
|
remove(:openness)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|