gofr-dev / gofr

An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability.
https://gofr.dev
Apache License 2.0
3.58k stars 235 forks source link

Add context to all migrators #1183

Open ccoVeille opened 2 days ago

ccoVeille commented 2 days ago

As per discussed here

passing context is a better option for all other datasource migrators as our migrator interface doesn't have context as paramter in the following methods:

type migrator interface {
    checkAndCreateMigrationTable(c *container.Container) error
    getLastMigration(c *container.Container) int64

    beginTransaction(c *container.Container) transactionData

    commitMigration(c *container.Container, data transactionData) error
    rollback(c *container.Container, data transactionData)
}
ccoVeille commented 2 days ago

But we have to wait for this one to be merged