Sha256: 53b9ed1aa25f82d01e8c2b08c6a21d0633eb94359b0f6fec91276f863ecc05dc

Contents?: true

Size: 733 Bytes

Versions: 1

Compression:

Stored size: 733 Bytes

Contents

module DataMigrate
  class Migration < ::ActiveRecord::Migration

    class << self
      def check_pending!(connection = ::ActiveRecord::Base.connection)
        binding.pry
        raise ActiveRecord::PendingMigrationError if DataMigrator::Migrator.needs_migration?(connection)
      end

      def migrate(direction)
        new.migrate direction
      end

      def table_name
        binding.pry
        ActiveRecord::Base.table_name_prefix + 'data_migrations' + ActiveRecord::Base.table_name_suffix
      end

      def index_name
        "#{table_name_prefix}unique_data_migrations#{table_name_suffix}"
      end
    end

    def initialize(name = self.class.name, version = nil)
      super(name, version)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
data_migrate-2.0.0 lib/data_migrate/migration.rb