'Create an alias for a nick.
Raises ValueError if the alias already exists. If nick does not already
exist, it will be added along with the alias.'

def alias_nick(self, nick, alias):

    nick = Identifier(nick)
    alias = Identifier(alias)
    nick_id = self.get_nick_id(nick)
    sql = u'INSERT    INTO    nicknames    (nick_id,    slug,    canonical)    VALUES    (?,    ?,    ?)'
    values = [nick_id, alias.lower(), alias]
    try:
        self.execute(sql, values)
    except sqlite3.IntegrityError:
        raise ValueError(u'Alias    already    exists.')
