• Andreas Brandl's avatar
    Introduce versioned GitLab migration class · 137f716c
    Andreas Brandl authored
    This introduces a versioned parent class for database migrations.
    
    This implements a simple versioning scheme for migration helpers.
    
    We need to be able to version helpers, so we can change their behavior
    without altering the behavior of already existing migrations in
    incompatible ways.
    
    We can continue to change the behavior of helpers without bumping the
    version here, *if* the change is backwards-compatible.
    
    If not, we would typically override the helper method in a new
    MigrationHelpers::V[0-9]+ class and create a new entry with a bumped
    version below.
    
    We use major version bumps to indicate significant changes and minor
    version bumps to indicate backwards-compatible or otherwise minor
    changes (e.g. a Rails version bump). However, this hasn't been
    strictly formalized yet.
    
    Changelog: other
    137f716c
migration.rb 1.32 KB