Class: DataMigrate::DataSchemaMigration

Inherits:
Object
  • Object
show all
Defined in:
lib/data_migrate/data_schema_migration.rb

Class Method Summary collapse

Class Method Details

.instanceObject



6
7
8
9
10
11
# File 'lib/data_migrate/data_schema_migration.rb', line 6

def instance
  @instance ||= Class.new(::ActiveRecord::SchemaMigration) do
    define_singleton_method(:table_name) { ActiveRecord::Base.table_name_prefix + 'data_migrations' + ActiveRecord::Base.table_name_suffix }
    define_singleton_method(:primary_key) { "version" }
  end
end