Class: Kanal::Plugins::ActiveRecord::Overriden::VersionSuffixMigrator

Inherits:
ActiveRecord::Migrator
  • Object
show all
Defined in:
lib/kanal/plugins/active_record/overriden/version_suffix_migrator.rb

Overview

NOTE: NOT USED

Instance Method Summary collapse

Constructor Details

#initialize(direction, migrations, schema_migration, target_version = nil, version_suffix: nil) ⇒ VersionSuffixMigrator

Returns a new instance of VersionSuffixMigrator.



13
14
15
16
17
# File 'lib/kanal/plugins/active_record/overriden/version_suffix_migrator.rb', line 13

def initialize(direction, migrations, schema_migration, target_version = nil, version_suffix: nil)
  super(direction, migrations, schema_migration, target_version)

  @verson_suffix = version_suffix
end

Instance Method Details

#record_version_state_after_migrating(version) ⇒ Object



19
20
21
22
23
# File 'lib/kanal/plugins/active_record/overriden/version_suffix_migrator.rb', line 19

def record_version_state_after_migrating(version)
  result = super

  "#{result}_#{@version_suffix}"
end