Changed database migration to be compatible with the ORM database changes