db-migrate / db-migrate/node-db-migrate
Is there a way to hook into an "afterMigrate" event?
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 361
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to figure out a way to always run code after a migration happens, in my case I'm using mysql and I'd like to ensure a set of views is up to date so that we don't have to manually re-create our views after the underlying schema of the table changes.
I noticed there is an `endMigration` event in the driver, maybe there is a way to hook into this?
Or perhaps if I put an index.js file in the migrations directory I can monkey patch the `up` function to call my recreate views methods after migrations are done?
Thanks for your help.
##
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/35929151-is-there-a-way-to-hook-into-an-aftermigrate-event?utm_campaign=plugin&utm_content=tracker%2F73887&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F73887&utm_medium=issues&utm_source=github).
Contributor guide
Assessment
This issue has not been assessed yet.