Remove recipients from activities schema
This commit is contained in:
parent
ae9da65e1b
commit
6318c16afe
|
@ -10,7 +10,6 @@ defmodule Clacks.Activity do
|
|||
field :data, :map
|
||||
field :local, :boolean
|
||||
field :actor, :string
|
||||
field :recipients, {:array, :string}, default: []
|
||||
|
||||
has_one :object, Clacks.Object, on_delete: :nothing, foreign_key: :id
|
||||
|
||||
|
@ -19,7 +18,7 @@ defmodule Clacks.Activity do
|
|||
|
||||
def changeset(%__MODULE__{} = schema, attrs) do
|
||||
schema
|
||||
|> cast(attrs, [:data, :local, :actor, :recipients])
|
||||
|> validate_required([:data, :local, :actor, :recipients])
|
||||
|> cast(attrs, [:data, :local, :actor])
|
||||
|> validate_required([:data, :local, :actor])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,6 @@ defmodule Clacks.Repo.Migrations.CreateActivities do
|
|||
add :data, :jsonb, null: false
|
||||
add :local, :boolean
|
||||
add :actor, :string
|
||||
add :recipients, {:array, :string}
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue