def get_table_names(connection):
    """
    Gets all table names in the specified database file.

    :param connection: Connection to the DB file.
    :return: List of table names
    """
    connection.execute("SELECT name FROM sqlite_master WHERE type='table';")
    tables = []
    for table in connection.fetchall():
        tables.append(table[0])
    return tables