Sha256: 7b5623b5d254fe338aa7adaebd38305d083394f6e7623d18e902143d1e10e610

Contents?: true

Size: 648 Bytes

Versions: 9

Compression:

Stored size: 648 Bytes

Contents

module DataMigrate
  class MigrationFive < ::ActiveRecord::Migration[5.0]

    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 primary_key
        "version"
      end
    end

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
data_migrate-7.0.2 lib/data_migrate/migration_five.rb
data_migrate-7.0.1 lib/data_migrate/migration_five.rb
data_migrate-7.0.0 lib/data_migrate/migration_five.rb
data_migrate-6.8.0 lib/data_migrate/migration_five.rb
data_migrate-6.7.0 lib/data_migrate/migration_five.rb
data_migrate-6.6.2 lib/data_migrate/migration_five.rb
data_migrate-6.6.0 lib/data_migrate/migration_five.rb
data_migrate-6.5.0 lib/data_migrate/migration_five.rb
data_migrate-6.4.0 lib/data_migrate/migration_five.rb