Why has Britain’s response to the dismantling of the refugee camp in Calais been so lively – or ugly? Because it raises fundamental questions about who we are as a country.

Migration is being discussed, but it’s a debate bedevilled by myth. There never was a time when Britain and the British identity was impervious to migration. Migration to Britain didn’t begin when we joined the EU. The more common but equally faulty story that Britain slowly developed organically from Anglo-Saxon roots, until the Windrush arrived from the Caribbean and changed everything, is an increasingly embarrassing sign that we simply don’t know the facts of our own history. The key economic, political and cultural events in our history – Roman Britain, the development of the English language, Magna Carta, the industrial revolution, the world wars – cannot be understood without reference to migration.

Three themes resonate across the centuries. First, immigration has been intimately tied to economic innovation and growth, notably finance, trade, wool and silk production, metalworking, and of course the enslavement of Africans that helped to fund the industrial revolution. One of the best-known examples is the tens of thousands of French Protestant refugees (Huguenots) who from the 1680s onwards settled in Britain. As the historian William Pettigrew writes on the Runnymede Trust’s new website, ourmigrationstory.org.uk: “They revolutionised the textiles industries, the arts and journalism, and provided much of the hard cash for the financial revolution that took place in London in the 1690s and allowed the English state to defeat Louis XIV.” Silkweavers were perhaps most prominent in shaping the identity of Spitalfields, but they also spread to Macclesfield and Sudbury in Suffolk, where silkweaving is still practised.

Second, the waves of migration were accompanied by waves of discrimination and violence against the migrants. The Narrative of the freed slave James Albert Ukawsaw Gronniosaw reveals the extent of Britain’s links to the transatlantic slave trade, the development of British colonies, and how its connections to the Americas underpinned migration links back to Britain. During the American war of independence (1775-83), but also during the seven years’ war (1754-63) and the war of 1812 (1812-15), Britain offered freedom to any enslaved man willing to fight on its side. This was often the only way out of slavery, and following the 1772 Somerset case, formerly enslaved people were legally protected from being returned to the Americas.

Gronniosaw was one of the thousands of migrants who made the journey. to Britain, and is known to us because his ‘Narrative’ went through many reprints. As Gronniosaw explains in his narrative, he met his wife, a white textile worker named Betty, and travelled with his children around the country looking for work. Historian Ryan Hanley says: “Not only did migrants like Gronniosaw experience many of the hardships common to poor people in Britain at the time, but they also had to contend with racial prejudice.”

The third theme is more positive. The historical record shows how the British people and state could and would accept migrants, and that migrants generally integrate. The state’s response, as in the Letters of Denization (which gave migrants the protections of citizens), or the 1965 Race Relations Act, was often a less complete affirmation of open, inclusive definitions of our country, and more a way of defending notable and principled citizens. They have existed down the ages; think Daniel Defoe writing in 1701 (“Since scarce one family is left alive, / Which does not from some foreigner derive.”) or Gary Lineker speaking up for migrants in 2016.

Because of their success, we barely acknowledge the multiple examples of migrant contribution, even the more recent ones – be they Marks & Spencer, Tesco, or easyJet. We should better excavate that history at local levels across the country whether in public records offices, buildings, or even cemeteries and death records.

Integration has most obviously occurred in the case of the Huguenots, who – along with other white European migrants – have simply been absorbed into Britishness. Will the British-born children of Polish migrants be more likely to follow this route to integration than the great-grandchildren of migrants from the Caribbean?

We are, as we have always been, a country defined by immigration (and indeed emigration)

Some groups – notably Jews, Roma, Gypsies, African and Asian people – have been continually excluded, with our society actively blocking their integration. The belief that British identity struggles to include those identified as outsiders on grounds of race or ethnicity is also supported by evidence of discrimination in the labour market and other worrying indicators of social outcomes.

To the question of who we are, there is an obvious answer. We are, as we have always been, a country defined by immigration (and indeed emigration). It’s a truth we should embrace, one that will provide the best resources for our success in the 21st century, post-Brexit or otherwise. But right now that truth is elusive. It’s strange to see Germany, a country with much less history of migration and with onerous baggage from its past, appearing more confident in terms of its identity and values.

Many in Britain spoke this year of “taking our country back”, asserting the importance of sovereignty and democracy in the face of European bureaucracy. But it’s equally obvious that many based those aspirations on an imaginary history. This confusion imposes a cost, as the notion of a country where people of migrant background are never truly British doesn’t just misunderstand our past, it also pushes our nation down a route towards economic stagnation and social conflict.

The good news is that for the foreseeable future, where we stand in terms of identity will be at the centre of national discussion. Let that be an informed discussion. This post-EU referendum moment allows us to face up to who we have been, and to understand who we are today.