diff --git a/lib/pinchflat/sources/source.ex b/lib/pinchflat/sources/source.ex index 58e7ec0..2932ac9 100644 --- a/lib/pinchflat/sources/source.ex +++ b/lib/pinchflat/sources/source.ex @@ -29,6 +29,7 @@ defmodule Pinchflat.Sources.Source do last_indexed_at original_url download_cutoff_date + retention_period_days title_filter_regex media_profile_id )a @@ -72,6 +73,7 @@ defmodule Pinchflat.Sources.Source do field :last_indexed_at, :utc_datetime # Only download media items that were published after this date field :download_cutoff_date, :date + field :retention_period_days, :integer field :original_url, :string field :title_filter_regex, :string diff --git a/priv/repo/migrations/20240402221638_add_retention_period_to_sources.exs b/priv/repo/migrations/20240402221638_add_retention_period_to_sources.exs new file mode 100644 index 0000000..a738678 --- /dev/null +++ b/priv/repo/migrations/20240402221638_add_retention_period_to_sources.exs @@ -0,0 +1,9 @@ +defmodule Pinchflat.Repo.Migrations.AddRetentionPeriodToSources do + use Ecto.Migration + + def change do + alter table(:sources) do + add :retention_period_days, :integer + end + end +end