The EU has, wisely in my opinion, agreed that Northern Ireland would be immediately readmitted to EU membership if it were to join a United Ireland. I stress that I am well aware that unification is unlikely at present. But post-Brexit, who knows?
There is an obvious point to make though. If Northern Ireland can be a special case, why not Scotland, and even Wales? I, again, know that independence for the latter is very unlikely, but the point is that they are already separate countries and are recognised as such. So if they left the UK why could they not, at the very least, be given fast track re-admission?
I sincerely hope that the EU will see the reason for that case in due course, and that Spain will too despite Catalonia.
The logic is clear. Goodwill should permit it.