Suppose Brexit happens, and the UK leaves the EU without a customs union. Scotland then has a 2nd independence referendum on the basis that they voted heavily to stay within the EU, and Scotland ends up leaving the UK. Scotland then tries to rejoin the EU, and has the support of the other 27 nations.
What would be the situation with the English-Scottish border? I'd assume that a hard border between the two would be fairly unpalatable and possibly not even practical. Would Scotland need to become an EU backstop (i.e. comply with applicable English/Welsh laws / tariffs / immigration policy ..), effectively reversing the UK/EU backstop situation in Northern Ireland?