Sha256: 7f963df9d7d98cb3d2ec30b5774420076a41c874a048b1787a26920179c93309

Contents?: true

Size: 693 Bytes

Versions: 13

Compression:

Stored size: 693 Bytes

Contents

module DataMigrate
  class Migration < ::ActiveRecord::Migration

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

      def migrate(direction)
        new.migrate direction
      end

      def table_name
        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

13 entries across 13 versions & 1 rubygems

Version Path
data_migrate-3.5.0 lib/data_migrate/migration.rb
data_migrate-3.4.0 lib/data_migrate/migration.rb
data_migrate-3.3.1 lib/data_migrate/migration.rb
data_migrate-3.3.0 lib/data_migrate/migration.rb
data_migrate-3.2.2 lib/data_migrate/migration.rb
data_migrate-3.2.1 lib/data_migrate/migration.rb
data_migrate-3.2.0 lib/data_migrate/migration.rb
data_migrate-3.1.0 lib/data_migrate/migration.rb
data_migrate-3.0.1 lib/data_migrate/migration.rb
data_migrate-3.0.0 lib/data_migrate/migration.rb
data_migrate-2.2.0 lib/data_migrate/migration.rb
data_migrate-2.1.0 lib/data_migrate/migration.rb
data_migrate-2.0.1 lib/data_migrate/migration.rb