delete duplicate code and change to do not run the migration if table exists