Make migrations upgrade safe.
Copy default config while running upgrader.
Fixes configuration reading in messages controller.