Skip to content

[Feature Request] Record custom property to meta tables #656

Closed Answered by mmkal
beiifeng asked this question in Ideas
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
@beiifeng
Comment options

Answer selected by beiifeng
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