Classes and database migration