Mvdb/ana 460/complex migrations

to test:

    make test_migration LOGLEVEL=DEBUG