Documentation
¶
Index ¶
- type MigrationService
- func (s *MigrationService) ApplyAllMigrationsDown() ([]string, error)
- func (s *MigrationService) ApplyMigrationsDown() ([]string, error)
- func (s *MigrationService) ApplyMigrationsUp() ([]string, error)
- func (s *MigrationService) CreateMigrationFiles(migrationName string) ([]string, error)
- func (s *MigrationService) Prepare() error
- func (s *MigrationService) RefreshMigrations() ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MigrationService ¶ added in v0.1.3
type MigrationService struct {
// contains filtered or unexported fields
}
MigrationService for works with migrations
func NewMigrationService ¶ added in v0.1.3
func NewMigrationService(repo storeContract, cfg *config.Config) *MigrationService
NewMigrationService returns the new instance
func (*MigrationService) ApplyAllMigrationsDown ¶ added in v0.1.3
func (s *MigrationService) ApplyAllMigrationsDown() ([]string, error)
ApplyAllMigrationsDown roll back all migrations
func (*MigrationService) ApplyMigrationsDown ¶ added in v0.1.3
func (s *MigrationService) ApplyMigrationsDown() ([]string, error)
ApplyMigrationsDown roll back latest migrations
func (*MigrationService) ApplyMigrationsUp ¶ added in v0.1.3
func (s *MigrationService) ApplyMigrationsUp() ([]string, error)
ApplyMigrationsUp rolls out migrations
func (*MigrationService) CreateMigrationFiles ¶ added in v0.1.3
func (s *MigrationService) CreateMigrationFiles(migrationName string) ([]string, error)
CreateMigrationFiles creates new migration files for up and down
func (*MigrationService) Prepare ¶ added in v0.1.3
func (s *MigrationService) Prepare() error
Prepare application
func (*MigrationService) RefreshMigrations ¶ added in v0.1.3
func (s *MigrationService) RefreshMigrations() ([]string, error)
RefreshMigrations cleans of all migrations and roll out them over again
Click to show internal directories.
Click to hide internal directories.