-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Description
Hi, @wesleytodd
I'm trying to create a custom SQL store for migrations, and I want to store migrations log not as one json stringified row.
I want organized it as one row - one migration.
All works fine for up migrations but for down migrations in save method I have problems.
I can't understand the context (up or down) of invoking save method.
And I see two reasons.
savedoes not have access to direction value.- set.lastRun has a specific value, that does not reflect really last running migration for
down.lastRunhas incorrect value when migrating down #142
But I understand that this trick with lastRun allows work whole system in general.
So I see two ways how it can be fixed.
-
Change/extend signature of store save method. Add third argument
context. save(set, fn, ctx);
And pass the context with { direction } to store.save.


I can prepare PR if you agree with my suggestion and select one of them.
brunosousadev
Metadata
Metadata
Assignees
Labels
No labels
