Skip to content
Discussion options

You must be logged in to vote

Could you just use context for this?

class YourStorage implements UmzugStorage<{author: string}> {
  async logMigration({name, context}: MigrationParams<{author: string}>) {
    await this.syncModel()
    await this.model.create({
      name,
      author: context.author,
    })
  }
  async unlogMigration({name, context}: MigrationParams<{author: string}>) {}
  async executed() {
    return []
  }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xtpss
Comment options

Answer selected by xtpss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants