Skip to content

Allow reusing soft-deleted feed slugs #1407

@cavis

Description

@cavis

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions