def get_model_schema(metadata):
    """Find the tables and columns in the SQLAlchemy model.

    Args:
        metadata: SQLAlchemy metadata structure.

    Returns:
        A dict-of-sets with table names as keys and column names as values.
    """
    result = {}
    for table in metadata.sorted_tables:
        result[table.name] = set()
        for column in table.columns:
            result[table.name].add(column.name)
    return result