seppevs / migrate-mongo

A database migration tool for MongoDB in Node
MIT License
927 stars 163 forks source link

Migration timestamp in database should be the execution timestamp, not the creation timestamp #258

Closed MaikeMota closed 4 years ago

MaikeMota commented 4 years ago

Describe the bug When running a migration, the timestamp in the migration table in the database is inserting the same timestamp as the creation of the file ( the one prepending at the filename).

To Reproduce Run any migration.

Expected behavior When a migration is created, a timestamp is prepended at his filename, this is a good way for preventing filename collision, but this is not the timestamp when the migration is really applied in the database, that still need to be developed and tested, maybe run in different environments before really executes in a production database.

What I expected to see in the timestamp column in the database is exactly when that migration has executed in that database. If I need to track down a bug or some misbehavior, is easier to see if the that migration could be the cause or contribute for that.

Additional context

image

MaikeMota commented 4 years ago

Sorry, this issue was for the TypeORM project;