In an interactive CLI (e.g. TTY) we use animations and re-render the console output all the time. If something else is written to stdout it will not show up if it's only one line and instead it will make the content jump.
To avoid this the global console instance should temporarily be replaced with a custom Console instance (similar to how Vite does it) to collect logs and render them next to the migration that caused the logs to be written.