Say a user creates a Feed with the slug adfree, then deletes that from the UI.
Later they come back and create another Feed with that same adfree slug. The rails validation will pass, since it's not checking for deleted_at Feeds. But, the postgres validation will fail, resulting in a 500:
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_feeds_on_podcast_id_and_slug"
DETAIL: Key (podcast_id, slug)=(73, adfree) already exists.
We should allow "reclaiming" that adfree slug later on. Maybe we just throw a random guid in the slug when the Feed is soft deleted or something? I feel like @kookster did that somewhere else already.
Say a user creates a Feed with the slug
adfree, then deletes that from the UI.Later they come back and create another Feed with that same
adfreeslug. The rails validation will pass, since it's not checking fordeleted_atFeeds. But, the postgres validation will fail, resulting in a 500:We should allow "reclaiming" that
adfreeslug later on. Maybe we just throw a random guid in the slug when the Feed is soft deleted or something? I feel like @kookster did that somewhere else already.