Don't require content for items
This commit is contained in:
parent
60a2dcd73f
commit
fd42f20920
|
@ -45,7 +45,7 @@ defmodule Frenzy.Item do
|
||||||
end
|
end
|
||||||
|
|
||||||
schema "items" do
|
schema "items" do
|
||||||
field :content, :string
|
field :content, :string, default: ""
|
||||||
field :content_type, :string
|
field :content_type, :string
|
||||||
field :date, :utc_datetime
|
field :date, :utc_datetime
|
||||||
field :creator, :string
|
field :creator, :string
|
||||||
|
@ -94,7 +94,7 @@ defmodule Frenzy.Item do
|
||||||
:tombstone,
|
:tombstone,
|
||||||
:feed_id
|
:feed_id
|
||||||
])
|
])
|
||||||
|> validate_required([:guid, :url, :date, :content, :feed_id])
|
|> validate_required([:guid, :url, :date, :feed_id])
|
||||||
|> unique_constraint([:feed_id, :guid], name: :items_feed_guid_index)
|
|> unique_constraint([:feed_id, :guid], name: :items_feed_guid_index)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue