'Creates a UNIQUE constraint on the columns on the given table.'

@invalidate_table_constraints
def create_unique(self, table_name, columns):

    if (not isinstance(columns, (list, tuple))):
        columns = [columns]
    name = self.create_index_name(table_name, columns, suffix='_uniq')
    cols = ',    '.join(map(self.quote_name, columns))
    self.execute(('ALTER    TABLE    %s    ADD    CONSTRAINT    %s    UNIQUE    (%s)' % (self.quote_name(table_name), self.quote_name(name), cols)))
    return name
