Documentation
¶
Index ¶
- Variables
- type Creator
- type Migrator
- type Repository
- func (r *Repository) CreateRepository() error
- func (r *Repository) Delete(migration string) error
- func (r *Repository) DeleteRepository() error
- func (r *Repository) GetLast() ([]migration.File, error)
- func (r *Repository) GetLastBatchNumber() (int, error)
- func (r *Repository) GetMigrations() ([]migration.File, error)
- func (r *Repository) GetMigrationsByBatch(batch int) ([]migration.File, error)
- func (r *Repository) GetMigrationsByStep(steps int) ([]migration.File, error)
- func (r *Repository) GetNextBatchNumber() (int, error)
- func (r *Repository) GetRan() ([]string, error)
- func (r *Repository) Log(file string, batch int) error
- func (r *Repository) RepositoryExists() bool
- type Stubs
- type TableGuesser
Constants ¶
This section is empty.
Variables ¶
View Source
var ChangePatterns = []string{
`_(to|from|in)_(\w+)_table$`,
`_(to|from|in)_(\w+)$`,
}
View Source
var CreatePatterns = []string{
`^create_(\w+)_table$`,
`^create_(\w+)$`,
}
Functions ¶
This section is empty.
Types ¶
type Creator ¶ added in v1.15.12
type Creator struct {
}
func NewCreator ¶ added in v1.15.12
func NewCreator() *Creator
func (*Creator) GetFileName ¶ added in v1.15.12
GetFileName Get the full path to the migration.
func (*Creator) PopulateStub ¶ added in v1.15.12
PopulateStub Populate the place-holders in the migration stub.
type Migrator ¶ added in v1.15.12
type Migrator struct {
// contains filtered or unexported fields
}
func NewMigrator ¶ added in v1.15.12
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(schema schema.Schema, table string) *Repository
func (*Repository) CreateRepository ¶
func (r *Repository) CreateRepository() error
func (*Repository) Delete ¶
func (r *Repository) Delete(migration string) error
func (*Repository) DeleteRepository ¶
func (r *Repository) DeleteRepository() error
func (*Repository) GetLastBatchNumber ¶ added in v1.15.12
func (r *Repository) GetLastBatchNumber() (int, error)
func (*Repository) GetMigrations ¶
func (r *Repository) GetMigrations() ([]migration.File, error)
func (*Repository) GetMigrationsByBatch ¶
func (r *Repository) GetMigrationsByBatch(batch int) ([]migration.File, error)
func (*Repository) GetMigrationsByStep ¶
func (r *Repository) GetMigrationsByStep(steps int) ([]migration.File, error)
func (*Repository) GetNextBatchNumber ¶
func (r *Repository) GetNextBatchNumber() (int, error)
func (*Repository) GetRan ¶
func (r *Repository) GetRan() ([]string, error)
func (*Repository) RepositoryExists ¶
func (r *Repository) RepositoryExists() bool
type TableGuesser ¶
type TableGuesser struct {
}
Click to show internal directories.
Click to hide internal directories.