An anti-migration motion brought by the main opposition conservatives – the CDU – was passed with support from the far-right Alternative for Germany (AfD)