Bye2k - government IT and Brexit

As Mat points out, one of the unwritten stories about if Brexit can be implemented is that of the changes required of 'government IT'.

How many databases will need to be updated to store a distinction between U.K. and EU citizens? How many government services rely on access to EU systems and APIs? What EU systems do we rely on today that will need to be rebuilt from scratch in the next 18 months?

For all of the above: What are the timeframes? How much will it cost? Has the civil service leadership recognised the problem yet?

If Brexit is going to be anything approaching a success, we need answers to some of these questions asap.

Edit: renamed post to the much better 'Bye2k' suggested by Matthew Harris