hard core unit test for core database schema migration 5.0.13 -> 6.0.0

:construction: 

@PVince81 @butonic @bantu @karlitschek @bartv2