tj / node-migrate

Abstract migration framework for node
MIT License
1.54k stars 224 forks source link

Callback for finished migration #188

Open crizzis opened 3 years ago

crizzis commented 3 years ago

Currently, we can use the callback parameter to Set.up(...) to perform cleanup (e.g. close DB connection).

This does not, however, cover the case when the migration has been performed using the cmdline (if such an option exists, it is undocumented).

It would be nice to be able to specify a 'callback' JS file for when the migration is finished (probably also for when the migration is about to start). Perhaps using the EventEmitter API?