def _fk_colspec(fk, metadata_schema):
    """Implement a 'safe' version of ForeignKey._get_colspec() that
    never tries to resolve the remote table.

    """
    if metadata_schema is None:
        return fk._get_colspec()
    else:
        tokens = fk._colspec.split('.')
        if len(tokens) == 2:
            return '%s.%s' % (metadata_schema, fk._colspec)
        else:
            return fk._colspec
