var SQLTemplateFuncs = map[string]interface{}{ "identifier": Identifier, }
func Identifier(i string) (string, error)
func MustRead(f pkging.File, err error) []byte
MustRead reads a pkging.File or panics.
func Read(f pkging.File, err error) ([]byte, error)
Read reads a pkging.File or returns an error
func WithMigrationContentMiddleware(middleware func(content string, err error) (string, error)) func(*MigrationBox) *MigrationBox
func WithTemplateValues(v map[string]interface{}) func(*MigrationBox) *MigrationBox
MigrationBox is a wrapper around pkger.Dir and Migrator. This will allow you to run migrations from migrations packed inside of a compiled binary.
type MigrationBox struct { pop.Migrator Dir pkger.Dir // contains filtered or unexported fields }
func NewMigrationBox(dir pkger.Dir, c *pop.Connection, l *logrusx.Logger, opts ...func(*MigrationBox) *MigrationBox) (*MigrationBox, error)
NewMigrationBox from a packr.Dir and a Connection.
migrations, err := NewMigrationBox(pkger.Dir("/migrations"))
type MigrationContent func(mf pop.Migration, c *pop.Connection, r io.Reader, usingTemplate bool) (string, error)