def replace_shorturl(ctx, slug, new_target):
    """Change the target of a shorturl."""
    query = 'UPDATE `shorturls` SET `target` = %s WHERE `slug` = %s'
    ctx.execute(query, (new_target, slug))
