Documentation
¶
Index ¶
Constants ¶
View Source
const (
SQL_VARIANT_POSTGRES = "POSTGRES"
)
Variables ¶
View Source
var ErrEndOfIteration = errors.New("end of iterations")
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGeneratorFromVariant ¶
func NewGeneratorFromVariant(variant string, source MigrationSource, destinationPath string) (Generator, error)
func (*Generator) WithSchemaFilter ¶
type GoMigrateSource ¶
type GoMigrateSource struct {
// contains filtered or unexported fields
}
func NewGoMigrateSource ¶
func NewGoMigrateSource(driver gomigratesource.Driver) (GoMigrateSource, error)
The driver needs to be opened before it is passed here.
func (*GoMigrateSource) Close ¶
func (s *GoMigrateSource) Close() error
func (*GoMigrateSource) Next ¶
func (s *GoMigrateSource) Next() (io.ReadCloser, error)
type MigrationSource ¶
type MigrationSource interface {
// Returns the next migration script in the correct order. If the end of the scripts is reached,
// this method returns `ErrEndOfIteration`.
Next() (io.ReadCloser, error)
// Close the underlying source if needed.
Close() error
}
MigrationSource abstracts the location and the handling of migration definitions.
Click to show internal directories.
Click to hide internal directories.