Class: Gitlab::Database::Migration

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/database/migration.rb

Defined Under Namespace

Modules: LockRetriesConcern Classes: V1_0, V2_0, V2_1, V2_2, V2_3

Class Method Summary collapse

Class Method Details

.[](version) ⇒ Object

Raises:

  • (ArgumentError)


74
75
76
77
78
79
80
# File 'lib/gitlab/database/migration.rb', line 74

def self.[](version)
  version = version.to_s
  name = "V#{version.tr('.', '_')}"
  raise ArgumentError, "Unknown migration version: #{version}" unless const_defined?(name, false)

  const_get(name, false)
end

.current_versionObject

The current version to be used in new migrations



83
84
85
# File 'lib/gitlab/database/migration.rb', line 83

def self.current_version
  2.3
end