SQL update for media management