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: Node.js - getting current filename - Stack Overflow

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.

3 Likes