migrations

package
v0.0.0-...-8b5a1e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Migrations = []migration.Migrator{}/* 121 elements not displayed */

Functions

func AddAdminToTeams

func AddAdminToTeams(tx migration.LimitedTx) error

func AddAttemptsToContainers

func AddAttemptsToContainers(tx migration.LimitedTx) error

func AddAuthFieldsToTeams

func AddAuthFieldsToTeams(tx migration.LimitedTx) error

func AddBaggageclaimURLToWorkers

func AddBaggageclaimURLToWorkers(tx migration.LimitedTx) error

func AddBestIfUsedByToContainers

func AddBestIfUsedByToContainers(tx migration.LimitedTx) error

func AddBuildEvents

func AddBuildEvents(tx migration.LimitedTx) error

func AddBuildPreparation

func AddBuildPreparation(tx migration.LimitedTx) error

func AddCaseInsenstiveUniqueIndexToTeamsName

func AddCaseInsenstiveUniqueIndexToTeamsName(tx migration.LimitedTx) error

func AddCheckErrorToResources

func AddCheckErrorToResources(tx migration.LimitedTx) error

func AddCheckTypeAndCheckSourceToContainers

func AddCheckTypeAndCheckSourceToContainers(tx migration.LimitedTx) error

func AddCheckingToResources

func AddCheckingToResources(tx migration.LimitedTx) error

func AddCompletedToBuilds

func AddCompletedToBuilds(tx migration.LimitedTx) error

func AddCompositeUniqueConstraintToVolumes

func AddCompositeUniqueConstraintToVolumes(tx migration.LimitedTx) error

func AddConfig

func AddConfig(tx migration.LimitedTx) error

func AddConfigToJobsResources

func AddConfigToJobsResources(tx migration.LimitedTx) error

func AddContainerIDToVolumes

func AddContainerIDToVolumes(tx migration.LimitedTx) error

func AddContainers

func AddContainers(tx migration.LimitedTx) error

func AddEnabledToBuilds

func AddEnabledToBuilds(tx migration.LimitedTx) error

func AddEngineAndEngineMetadataToBuilds

func AddEngineAndEngineMetadataToBuilds(tx migration.LimitedTx) error

func AddEnvVariablesToContainers

func AddEnvVariablesToContainers(tx migration.LimitedTx) error

func AddExplicitToBuildOutputs

func AddExplicitToBuildOutputs(tx migration.LimitedTx) error

func AddFirstLoggedBuildIDToJobsAndReapTimeToBuildsAndLeases

func AddFirstLoggedBuildIDToJobsAndReapTimeToBuildsAndLeases(tx migration.LimitedTx) error

func AddGenericOAuthToTeams

func AddGenericOAuthToTeams(tx migration.LimitedTx) error

func AddHijackURLToBuilds

func AddHijackURLToBuilds(tx migration.LimitedTx) error

func AddHostPathVersionToVolumes

func AddHostPathVersionToVolumes(tx migration.LimitedTx) error

func AddHttpProxyHttpsProxyNoProxyToWorkers

func AddHttpProxyHttpsProxyNoProxyToWorkers(tx migration.LimitedTx) error

func AddIdToConfig

func AddIdToConfig(tx migration.LimitedTx) error

func AddImageResourceTypeAndSourceToContainers

func AddImageResourceTypeAndSourceToContainers(tx migration.LimitedTx) error

func AddImageResourceVersions

func AddImageResourceVersions(tx migration.LimitedTx) error

func AddIndexesToABunchOfStuff

func AddIndexesToABunchOfStuff(tx migration.LimitedTx) error

func AddInputsDeterminedToBuilds

func AddInputsDeterminedToBuilds(tx migration.LimitedTx) error

func AddInputsSatisfiedToBuildPreparation

func AddInputsSatisfiedToBuildPreparation(tx migration.LimitedTx) error

func AddLastCheckedAndCheckingToResourceTypes

func AddLastCheckedAndCheckingToResourceTypes(tx migration.LimitedTx) error

func AddLastCheckedToResources

func AddLastCheckedToResources(tx migration.LimitedTx) error

func AddLastScheduledToBuilds

func AddLastScheduledToBuilds(tx migration.LimitedTx) error

func AddLastScheduledToPipelines

func AddLastScheduledToPipelines(tx migration.LimitedTx) error

func AddLastTrackedToBuilds

func AddLastTrackedToBuilds(tx migration.LimitedTx) error

func AddLocks

func AddLocks(tx migration.LimitedTx) error

func AddMissingInputReasonsToBuildPreparation

func AddMissingInputReasonsToBuildPreparation(tx migration.LimitedTx) error

func AddModifiedTimeToBuildInputs

func AddModifiedTimeToBuildInputs(tx migration.LimitedTx) error

func AddModifiedTimeToVersionedResourcesAndBuildOutputs

func AddModifiedTimeToVersionedResourcesAndBuildOutputs(tx migration.LimitedTx) error

func AddNameToBuildInputs

func AddNameToBuildInputs(tx migration.LimitedTx) error

func AddNameToPipelines

func AddNameToPipelines(tx migration.LimitedTx) error

func AddNameToWorkers

func AddNameToWorkers(tx migration.LimitedTx) error

func AddNextBuildInputs

func AddNextBuildInputs(tx migration.LimitedTx) error

func AddNonEmptyConstraintToTeamName

func AddNonEmptyConstraintToTeamName(tx migration.LimitedTx) error

func AddOnDeleteSetNullToFKeyContainerId

func AddOnDeleteSetNullToFKeyContainerId(tx migration.LimitedTx) error

func AddOneOffNameSequence

func AddOneOffNameSequence(tx migration.LimitedTx) error

func AddOrderToVersionedResources

func AddOrderToVersionedResources(tx migration.LimitedTx) error

func AddOrderingToPipelines

func AddOrderingToPipelines(tx migration.LimitedTx) error

func AddOriginalVolumeHandleToVolumes

func AddOriginalVolumeHandleToVolumes(tx migration.LimitedTx) error

func AddOutputNameToVolumes

func AddOutputNameToVolumes(tx migration.LimitedTx) error

func AddPathToVolumes

func AddPathToVolumes(tx migration.LimitedTx) error

func AddPausedToJobs

func AddPausedToJobs(tx migration.LimitedTx) error

func AddPausedToPipelines

func AddPausedToPipelines(tx migration.LimitedTx) error

func AddPausedToResources

func AddPausedToResources(tx migration.LimitedTx) error

func AddPipelineBuildEventsTables

func AddPipelineBuildEventsTables(tx migration.LimitedTx) error

func AddPipelineIDToJobs

func AddPipelineIDToJobs(tx migration.LimitedTx) error

func AddPipelineIDToResources

func AddPipelineIDToResources(tx migration.LimitedTx) error

func AddPlatformAndTagsToWorkers

func AddPlatformAndTagsToWorkers(tx migration.LimitedTx) error

func AddPublicToPipelines

func AddPublicToPipelines(tx migration.LimitedTx) error

func AddReplicatedFromToVolumes

func AddReplicatedFromToVolumes(tx migration.LimitedTx) error

func AddResourceTypesToWorkers

func AddResourceTypesToWorkers(tx migration.LimitedTx) error

func AddSizeToVolumes

func AddSizeToVolumes(tx migration.LimitedTx) error

func AddStageToContainers

func AddStageToContainers(tx migration.LimitedTx) error

func AddStartTimeToWorkers

func AddStartTimeToWorkers(tx migration.LimitedTx) error

func AddStepLocationToContainers

func AddStepLocationToContainers(tx migration.LimitedTx) error

func AddTTLToContainers

func AddTTLToContainers(tx migration.LimitedTx) error

func AddTeamIDToBuilds

func AddTeamIDToBuilds(tx migration.LimitedTx) error

func AddTeamIDToContainers

func AddTeamIDToContainers(tx migration.LimitedTx) error

func AddTeamIDToPipelineNameUniqueness

func AddTeamIDToPipelineNameUniqueness(tx migration.LimitedTx) error

func AddTeamIDToVolumes

func AddTeamIDToVolumes(tx migration.LimitedTx) error

func AddTeamIDToWorkers

func AddTeamIDToWorkers(tx migration.LimitedTx) error

func AddTeamNameToPipe

func AddTeamNameToPipe(tx migration.LimitedTx) error

func AddTeamsColumnToPipelinesAndTeamsTable

func AddTeamsColumnToPipelinesAndTeamsTable(tx migration.LimitedTx) error

func AddTimestampsToBuilds

func AddTimestampsToBuilds(tx migration.LimitedTx) error

func AddTypeToVersionedResources

func AddTypeToVersionedResources(tx migration.LimitedTx) error

func AddUAAAuthToTeams

func AddUAAAuthToTeams(tx migration.LimitedTx) error

func AddUniqueConstraintToResources

func AddUniqueConstraintToResources(tx migration.LimitedTx) error

func AddUserToContainer

func AddUserToContainer(tx migration.LimitedTx) error

func AddVersionToBuildEvents

func AddVersionToBuildEvents(tx migration.LimitedTx) error

func AddVolumesAndCacheInvalidator

func AddVolumesAndCacheInvalidator(tx migration.LimitedTx) error

func AddWorkerIDToVolumes

func AddWorkerIDToVolumes(tx migration.LimitedTx) error

func AddWorkers

func AddWorkers(tx migration.LimitedTx) error

func AddWorkingDirectoryToContainers

func AddWorkingDirectoryToContainers(tx migration.LimitedTx) error

func CascadePipelineDeletes

func CascadePipelineDeletes(tx migration.LimitedTx) error

func CleanUpMassiveUniqueConstraint

func CleanUpMassiveUniqueConstraint(tx migration.LimitedTx) error

func ConvertJobBuildConfigToJobPlans

func ConvertJobBuildConfigToJobPlans(tx migration.LimitedTx) error

func CreateEventIDSequencesForInFlightBuilds

func CreateEventIDSequencesForInFlightBuilds(tx migration.LimitedTx) error

func CreateJobsSerialGroups

func CreateJobsSerialGroups(tx migration.LimitedTx) error

func CreateLocks

func CreateLocks(tx migration.LimitedTx) error

func CreatePipes

func CreatePipes(tx migration.LimitedTx) error

func CreateResourceTypes

func CreateResourceTypes(tx migration.LimitedTx) error

func DropCompletedFromBuildPreparation

func DropCompletedFromBuildPreparation(tx migration.LimitedTx) error

func DropLocks

func DropLocks(tx migration.LimitedTx) error

func DropNotNullResourceConstraintsOnVolumes

func DropNotNullResourceConstraintsOnVolumes(tx migration.LimitedTx) error

func DropOldLocks

func DropOldLocks(tx migration.LimitedTx) error

func InitialSchema

func InitialSchema(tx migration.LimitedTx) error

func LockDBAndMigrate

func LockDBAndMigrate(logger lager.Logger, sqlDriver string, sqlDataSource string) (db.Conn, error)

func MakeContainerIdentifiersUnique

func MakeContainerIdentifiersUnique(tx migration.LimitedTx) error

func MakeContainerWorkingDirectoryNotNull

func MakeContainerWorkingDirectoryNotNull(tx migration.LimitedTx) error

func MakeContainersBuildIdsNullable

func MakeContainersBuildIdsNullable(tx migration.LimitedTx) error

func MakeContainersExpiresAtNullable

func MakeContainersExpiresAtNullable(tx migration.LimitedTx) error

func MakeContainersLinkToPipelineIds

func MakeContainersLinkToPipelineIds(tx migration.LimitedTx) error

func MakeContainersLinkToResourceIds

func MakeContainersLinkToResourceIds(tx migration.LimitedTx) error

func MakeContainersLinkToWorkerIds

func MakeContainersLinkToWorkerIds(tx migration.LimitedTx) error

func MakeVolumeSizeBigint

func MakeVolumeSizeBigint(tx migration.LimitedTx) error

func MakeVolumesExpiresAtNullable

func MakeVolumesExpiresAtNullable(tx migration.LimitedTx) error

func MigrateFromLeasesToLocks

func MigrateFromLeasesToLocks(tx migration.LimitedTx) error

func MoveSourceAndMetadataToVersionedResources

func MoveSourceAndMetadataToVersionedResources(tx migration.LimitedTx) error

func NonNullableVersionInfo

func NonNullableVersionInfo(tx migration.LimitedTx) error

func RemoveSourceFromVersionedResources

func RemoveSourceFromVersionedResources(tx migration.LimitedTx) error

func RemoveTransitionalCurrentVersions

func RemoveTransitionalCurrentVersions(tx migration.LimitedTx) error

func RemoveVolumesWithExpiredWorkers

func RemoveVolumesWithExpiredWorkers(tx migration.LimitedTx) error

func RemoveWorkerIds

func RemoveWorkerIds(tx migration.LimitedTx) error

func RenameConfigToPipelines

func RenameConfigToPipelines(tx migration.LimitedTx) error

func RenamePipelineIDToVersionAddPrimaryKey

func RenamePipelineIDToVersionAddPrimaryKey(tx migration.LimitedTx) error

func ReplaceBuildEventsIDWithEventID

func ReplaceBuildEventsIDWithEventID(tx migration.LimitedTx) error

func ReplaceBuildsAbortHijackURLsWithGuidAndEndpoint

func ReplaceBuildsAbortHijackURLsWithGuidAndEndpoint(tx migration.LimitedTx) error

func ReplaceStepLocationWithPlanID

func ReplaceStepLocationWithPlanID(tx migration.LimitedTx) error

func ResetCheckOrder

func ResetCheckOrder(tx migration.LimitedTx) error

func ResetPendingBuilds

func ResetPendingBuilds(tx migration.LimitedTx) error

func Translogrifier

func Translogrifier(logger lager.Logger, migrations []migration.Migrator) []migration.Migrator

func WithLogger

func WithLogger(logger lager.Logger, mig migration.Migrator) migration.Migrator

Types

type Condition

type Condition string
const (
	ConditionSuccess Condition = "success"
	ConditionFailure Condition = "failure"
)

type Conditions

type Conditions []Condition

type Config

type Config struct {
	Groups    GroupConfigs    `json:"groups,omitempty"`
	Resources ResourceConfigs `json:"resources,omitempty"`
	Jobs      JobConfigs      `json:"jobs,omitempty"`
}

type Duration

type Duration time.Duration

type GroupConfig

type GroupConfig struct {
	Name      string   `json:"name"`
	Jobs      []string `json:"jobs,omitempty"`
	Resources []string `json:"resources,omitempty"`
}

type GroupConfigs

type GroupConfigs []GroupConfig

type JobConfig

type JobConfig struct {
	Name   string `json:"name"`
	Public bool   `json:"public,omitempty"`
	Serial bool   `json:"serial,omitempty"`

	Privileged     bool        `json:"privileged,omitempty"`
	TaskConfigPath string      `json:"build,omitempty"`
	TaskConfig     *TaskConfig `json:"config,omitempty"`

	InputConfigs  []JobInputConfig  `json:"inputs,omitempty"`
	OutputConfigs []JobOutputConfig `json:"outputs,omitempty"`

	Plan PlanSequence `json:"plan,omitempty"`
}

type JobConfigs

type JobConfigs []JobConfig

type JobInputConfig

type JobInputConfig struct {
	RawName    string   `json:"name,omitempty"`
	Resource   string   `json:"resource"`
	Params     Params   `json:"params,omitempty"`
	Passed     []string `json:"passed,omitempty"`
	RawTrigger *bool    `json:"trigger"`
}

type JobOutputConfig

type JobOutputConfig struct {
	Resource string `json:"resource"`
	Params   Params `json:"params,omitempty"`

	RawPerformOn []Condition `json:"perform_on,omitempty"`
}

type LimitedTx

type LimitedTx interface {
	Exec(query string, args ...interface{}) (sql.Result, error)
	Prepare(query string) (*sql.Stmt, error)
	Query(query string, args ...interface{}) (*sql.Rows, error)
	QueryRow(query string, args ...interface{}) *sql.Row
	Stmt(stmt *sql.Stmt) *sql.Stmt
}

type Params

type Params map[string]interface{}

type PlanConfig

type PlanConfig struct {
	Conditions *Conditions `json:"conditions,omitempty"`

	RawName string `json:"name,omitempty"`

	Do *PlanSequence `json:"do,omitempty"`

	Aggregate *PlanSequence `json:"aggregate,omitempty"`

	Get        string   `json:"get,omitempty"`
	Passed     []string `json:"passed,omitempty"`
	RawTrigger *bool    `json:"trigger,omitempty"`

	Put string `json:"put,omitempty"`

	Resource string `json:"resource,omitempty"`

	Task           string      `json:"task,omitempty"`
	Privileged     bool        `json:"privileged,omitempty"`
	TaskConfigPath string      `json:"file,omitempty"`
	TaskConfig     *TaskConfig `json:"config,omitempty"`

	Params Params `json:"params,omitempty"`
}

type PlanSequence

type PlanSequence []PlanConfig

type ResourceConfig

type ResourceConfig struct {
	Name string `json:"name"`

	Type   string `json:"type"`
	Source Source `json:"source"`
}

type ResourceConfigs

type ResourceConfigs []ResourceConfig

type Source

type Source map[string]interface{}

type TaskConfig

type TaskConfig struct {
	Platform string `json:"platform,omitempty"`

	Tags []string `json:"tags,omitempty"`

	Image string `json:"image,omitempty"`

	Params map[string]string `json:"params,omitempty"`

	Run *TaskRunConfig `json:"run,omitempty"`

	Inputs []TaskInputConfig `json:"inputs,omitempty"`
}

type TaskInputConfig

type TaskInputConfig struct {
	Name string `json:"name"`
	Path string `json:"path,omitempty"`
}

type TaskRunConfig

type TaskRunConfig struct {
	Path string   `json:"path,omitempty"`
	Args []string `json:"args,omitempty"`
}

type Version

type Version map[string]interface{}

Source Files

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL