Documentation ¶
Index ¶
- func GetFunctionName(i interface{}) string
- func MigrateStackEntryPoint(stackService dataservices.StackService) error
- type MigrationFuncs
- type Migrations
- type Migrator
- func (m *Migrator) Always() error
- func (m *Migrator) CurrentDBEdition() portainer.SoftwareEdition
- func (m *Migrator) CurrentDBVersion() string
- func (m *Migrator) CurrentSemanticDBVersion() *semver.Version
- func (m *Migrator) LatestMigrations() Migrations
- func (m *Migrator) Migrate() error
- func (m *Migrator) MigrateSettingsToDB30() error
- func (m *Migrator) NeedsMigration() bool
- type MigratorParameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFunctionName ¶
func GetFunctionName(i interface{}) string
func MigrateStackEntryPoint ¶
func MigrateStackEntryPoint(stackService dataservices.StackService) error
MigrateStackEntryPoint exported for testing
Types ¶
type MigrationFuncs ¶
type MigrationFuncs []func() error
type Migrations ¶
type Migrations struct { Version *semver.Version MigrationFuncs MigrationFuncs }
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator defines a service to migrate data after a Portainer version update.
func NewMigrator ¶
func NewMigrator(parameters *MigratorParameters) *Migrator
NewMigrator creates a new Migrator.
func (*Migrator) CurrentDBEdition ¶
func (m *Migrator) CurrentDBEdition() portainer.SoftwareEdition
func (*Migrator) CurrentDBVersion ¶
func (*Migrator) CurrentSemanticDBVersion ¶
func (*Migrator) LatestMigrations ¶
func (m *Migrator) LatestMigrations() Migrations
func (*Migrator) Migrate ¶
Migrate checks the database version and migrate the existing data to the most recent data model.
func (*Migrator) MigrateSettingsToDB30 ¶
so setting to false and "", is what would happen without this code I'm going to bet there's zero point to changing the value inthe DB Public for testing
func (*Migrator) NeedsMigration ¶
type MigratorParameters ¶
type MigratorParameters struct { CurrentDBVersion *models.Version EndpointGroupService *endpointgroup.Service EndpointService *endpoint.Service EndpointRelationService *endpointrelation.Service ExtensionService *extension.Service FDOProfilesService *fdoprofile.Service RegistryService *registry.Service ResourceControlService *resourcecontrol.Service RoleService *role.Service ScheduleService *schedule.Service SettingsService *settings.Service SnapshotService *snapshot.Service StackService *stack.Service TagService *tag.Service TeamMembershipService *teammembership.Service UserService *user.Service VersionService *version.Service FileService portainer.FileService AuthorizationService *authorization.Service DockerhubService *dockerhub.Service EdgeStackService *edgestack.Service }
MigratorParameters represents the required parameters to create a new Migrator instance.
Source Files ¶
- migrate_ce.go
- migrate_dbversion17.go
- migrate_dbversion18.go
- migrate_dbversion19.go
- migrate_dbversion20.go
- migrate_dbversion22.go
- migrate_dbversion23.go
- migrate_dbversion24.go
- migrate_dbversion25.go
- migrate_dbversion26.go
- migrate_dbversion29.go
- migrate_dbversion31.go
- migrate_dbversion32.go
- migrate_dbversion33.go
- migrate_dbversion34.go
- migrate_dbversion35.go
- migrate_dbversion40.go
- migrate_dbversion50.go
- migrate_dbversion60.go
- migrate_dbversion70.go
- migrate_dbversion71.go
- migrate_dbversion80.go
- migrate_dbversion81.go
- migrator.go
Click to show internal directories.
Click to hide internal directories.