Moved compare code to it's own class
Added method to save migration version applied to database