def column_names_from_table(db, table_name):
    """
    Gets the column names from a db table.
    """

    columns = db.get_columns(table_name)
    mapped = [column.name for column in columns]

    # season_id is our construct, and isn't returned by any NBA endpoint.
    if 'season_id' in mapped:
        mapped.remove('season_id')

    # Ignore autogenerated id columns.
    if 'id' in mapped:
        mapped.remove('id')

    return mapped