Class: Gitlab::Database::Migration
- Inherits:
-
Object
- Object
- Gitlab::Database::Migration
- Defined in:
- lib/gitlab/database/migration.rb
Defined Under Namespace
Modules: LockRetriesConcern Classes: V1_0, V2_0, V2_1
Class Method Summary collapse
- .[](version) ⇒ Object
-
.current_version ⇒ Object
The current version to be used in new migrations.
Class Method Details
.[](version) ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/gitlab/database/migration.rb', line 59 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_version ⇒ Object
The current version to be used in new migrations
68 69 70 |
# File 'lib/gitlab/database/migration.rb', line 68 def self.current_version 2.1 end |