'Returns the name of the primary key column for the given table.'

def get_primary_key_column(self, cursor, table_name):

    for column in six.iteritems(self.get_indexes(cursor, table_name)):
        if column[1]['primary_key']:
            return column[0]
    return None
