adds auto_migration flag
adds test for auto_migration flag