Deleting Media

Is there really no way to actually delete a media type other than marking it inactive? We have a few that were misentered and saved that I'd like to actually DELETE instead of inactivate. Currently they're just inactive and renamed Delete, Delete 2, Delete 3.

 

Thanks!

Marta

Parents
  • I would first make sure they are not in use with something like:

    select id into #media_to_delete
    from tr_media_type m
    where not exists
    (
        select *
        from t_contribution c
        where c.media_type = m.id
    )
    and not exists
    (
        select *
        from tx_appeal_media_type a
        where a.media_type = m.id
    )

    ... then review the contents of that table, and then possibly delete them with

    delete from tr_media_type where id in (select id from #media_to_delete)

Reply
  • I would first make sure they are not in use with something like:

    select id into #media_to_delete
    from tr_media_type m
    where not exists
    (
        select *
        from t_contribution c
        where c.media_type = m.id
    )
    and not exists
    (
        select *
        from tx_appeal_media_type a
        where a.media_type = m.id
    )

    ... then review the contents of that table, and then possibly delete them with

    delete from tr_media_type where id in (select id from #media_to_delete)

Children
No Data