Community Health Toolkit

Why don't migrations take their names from their file name?

Imported Question by alex · Aug 30, 2016 at 04:20 PM

As the meta doc records which migrations have run by name, it seems like currently two different files could define migrations with the same name.

That would work using something like this: http://stackoverflow.com/a/28319077/1292073

It would be bad if someone changed the filename without realising this would cause it to re-run everywhere. Maybe a better solution is to have the migrations unit test ensure there aren’t two migrations with the same name.

2 Likes