Fix migrations

- Fix generation of full name for the migration
- Fix memory leak

refs #21800