Files
mostlymatter/vendor/github.com/mattermost/morph/drivers/driver.go
Agniva De Sarker 2a59047d07 Moved morph dependency to new repo (#19618)
```release-note
NONE
```

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2022-02-23 20:11:12 +05:30

24 строки
726 B
Go

package drivers
import (
"github.com/mattermost/morph/models"
)
type Config struct {
MigrationsTable string
// StatementTimeoutInSecs is used to set a timeout for each migration file.
// Set below zero to disable timeout. Zero value will result in default value, which is 60 seconds.
StatementTimeoutInSecs int
MigrationMaxSize int
}
type Driver interface {
Ping() error
// Close closes the underlying db connection. If the driver is created via Open() function
// this method will also going to call Close() on the sql.db instance.
Close() error
Apply(migration *models.Migration, saveVersion bool) error
AppliedMigrations() ([]*models.Migration, error)
SetConfig(key string, value interface{}) error
}