Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractVersionFromFilename ¶
ExtractVersionFromFilename returns the migration version from a filename
func GenerateMigrationVersion ¶
GenerateMigrationVersion returns a new timestamp-derived migration version
Types ¶
type IMigration ¶
type IMigration interface { Validate() error File() *serializers.MigrationFile Filename() *string SyncPath() string Serializable() interface{} MigrationVersion() *string SameResourceAs(other IMigration) bool ApplyToSchema(schema *serializers.Schema, migrationRepo Repository, idempotently bool) error }
IMigration represents a migration
type Repository ¶
type Repository map[string]IMigration
Repository is a map of migrations indexed by migration version
func (*Repository) SortedVersions ¶
func (m *Repository) SortedVersions() []string
SortedVersions sorts and returns the migration versions in a repo because maps don't preserve order in go
Click to show internal directories.
Click to hide internal directories.