fixed doctrine migrations and ApiRepository, made functional test a bit
more robust, will always drop an existing db first