Documentation ¶
Index ¶
- Constants
- func Add(ctx context.Context, migration sdk.Migration)
- func Delete(db gorp.SqlExecutor, mig *sdk.Migration) error
- func GetAll(db gorp.SqlExecutor) ([]sdk.Migration, error)
- func GetByName(db gorp.SqlExecutor, name string) (*sdk.Migration, error)
- func Insert(db gorp.SqlExecutor, mig *sdk.Migration) error
- func MigrateBranchToRef(ctx context.Context, db *gorp.DbMap) error
- func MigrateConsumers(ctx context.Context, db *gorp.DbMap, c cache.Store) error
- func MigrateHashSignature(ctx context.Context, db *gorp.DbMap, c cache.Store) error
- func MigrateHeadEntity(ctx context.Context, db *gorp.DbMap) error
- func MigrateProjectRepositories(ctx context.Context, db *gorp.DbMap) error
- func MigrateRunContextsToJSON(ctx context.Context, db *gorp.DbMap) error
- func MigrateRunJobSignature(ctx context.Context, db *gorp.DbMap) error
- func MigrateRunRepositoryInfo(ctx context.Context, db *gorp.DbMap) error
- func Run(ctx context.Context, db gorp.SqlExecutor)
- func SaveAllMigrations(db gorp.SqlExecutor) error
- func Status(db gorp.SqlExecutor) sdk.MonitoringStatusLine
- func Update(db gorp.SqlExecutor, mig *sdk.Migration) error
- func UpdateStatus(db gorp.SqlExecutor, id int64, status string) error
- type OldContext
- type UserOrganizationMigrate
Constants ¶
View Source
const MinCompatibleRelease = "0.52.0"
MinCompatibleRelease represent the minimum release which is working with these migrations, need to update when we delete migration in our codebase
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add adds a migration to the list of migrations to run at API start time example of usage:
migrate.Add(sdk.Migration{Name: "MyMigration", Release: "0.39.3", Mandatory: true, ExecFunc: func(ctx context.Context) error { return migrate.MyMigration(ctx, a.Cache, a.DBConnectionFactory.GetDBMap) }})
func Delete ¶
func Delete(db gorp.SqlExecutor, mig *sdk.Migration) error
Delete migration in database.
func GetAll ¶
func GetAll(db gorp.SqlExecutor) ([]sdk.Migration, error)
GetAll returns the migration for given name.
func Insert ¶
func Insert(db gorp.SqlExecutor, mig *sdk.Migration) error
Insert migration in database.
func MigrateBranchToRef ¶ added in v0.53.1
func MigrateConsumers ¶ added in v0.53.0
func MigrateHashSignature ¶ added in v0.53.1
func MigrateHeadEntity ¶ added in v0.53.1
func MigrateProjectRepositories ¶ added in v0.53.1
func MigrateRunContextsToJSON ¶ added in v0.53.1
func MigrateRunJobSignature ¶ added in v0.53.1
func MigrateRunRepositoryInfo ¶ added in v0.53.1
func SaveAllMigrations ¶
func SaveAllMigrations(db gorp.SqlExecutor) error
SaveAllMigrations save all local migrations marked to "done" into database (in case of a fresh installation)
func Status ¶
func Status(db gorp.SqlExecutor) sdk.MonitoringStatusLine
Status returns monitoring status, if there are cds migration in progress it returns WARN
func Update ¶
func Update(db gorp.SqlExecutor, mig *sdk.Migration) error
Update migration in database.
func UpdateStatus ¶
func UpdateStatus(db gorp.SqlExecutor, id int64, status string) error
UpdateStatus update the status of a migration given its id
Types ¶
type OldContext ¶ added in v0.53.1
type OldContext sdk.WorkflowRunContext
func (*OldContext) Scan ¶ added in v0.53.1
func (m *OldContext) Scan(src interface{}) error
type UserOrganizationMigrate ¶ added in v0.53.0
type UserOrganizationMigrate struct { User *sdk.AuthentifiedUser OrganizationName string }
func GetOrganizationUsersToMigrate ¶ added in v0.53.0
Click to show internal directories.
Click to hide internal directories.