Updated schemamigration method, updated tests