Documentation ¶
Index ¶
Constants ¶
View Source
const MigrationsTable = "schema_migrations"
MigrationsTable table created by migration lib to track state of migration
Variables ¶
This section is empty.
Functions ¶
func NewPgxPool ¶
NewPgxPool get a concurrency safe pool of connection
Types ¶
type MigrationConfig ¶
type MigrationConfig struct { Host string Port string User string Password string Database string MigrationsTable string Source source.Driver }
MigrationConfig PG config for migration
func PGtoMigrateConfig ¶
func PGtoMigrateConfig(pgc PgConfig, source source.Driver) MigrationConfig
PGtoMigrateConfig convert postgres conn config to migration conn config
type MigrationHandler ¶
type MigrationHandler struct {
Migrate *migrate.Migrate
}
func NewHandler ¶
func NewHandler(cfg MigrationConfig) (*MigrationHandler, error)
NewHandler configure the migration data
func (*MigrationHandler) Printf ¶
func (h *MigrationHandler) Printf(format string, v ...interface{})
Printf is the implementation of migrate lib's logger interface
func (*MigrationHandler) Verbose ¶
func (h *MigrationHandler) Verbose() bool
Verbose is the implementation of migrate lib's logger interface
Click to show internal directories.
Click to hide internal directories.