get database or collection from migration class