Given a table X and a view Y (that has the same structure as X) is there a way to rename X to Z and Y to X atomically so that no query will ever see nothing named X? Renaming X and creating the view would also be valid.
The point would be to, as part of a schema migration plan, replace the old tables with views that simulate the old version from the new version so both sets of client code can run at the same time.
MySQL is my choice but info on others would be useful as well.