migrate classes and subjects