Added column
This commit is contained in:
parent
f9c2f7b8f2
commit
00274252f1
2 changed files with 14 additions and 1 deletions
|
|
@ -30,7 +30,9 @@ defmodule Pinchflat.Media.MediaItem do
|
|||
:subtitle_filepaths,
|
||||
:thumbnail_filepath,
|
||||
:metadata_filepath,
|
||||
:nfo_filepath
|
||||
:nfo_filepath,
|
||||
# These are user or system controlled fields
|
||||
:prevent_download
|
||||
]
|
||||
# Pretty much all the fields captured at index are required.
|
||||
@required_fields ~w(
|
||||
|
|
@ -70,6 +72,8 @@ defmodule Pinchflat.Media.MediaItem do
|
|||
# Will very likely revisit because I can't leave well-enough alone.
|
||||
field :subtitle_filepaths, {:array, {:array, :string}}, default: []
|
||||
|
||||
field :prevent_download, :boolean, default: false
|
||||
|
||||
field :matching_search_term, :string, virtual: true
|
||||
|
||||
belongs_to :source, Source
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
defmodule Pinchflat.Repo.Migrations.AddPreventDownloadToMediaItems do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:media_items) do
|
||||
add :prevent_download, :boolean, default: false, null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue