Sha256: 90a7e22abf941e819935fdee4855d7f317680db899afcc7f649b2e861910f878

Contents?: true

Size: 688 Bytes

Versions: 9

Compression:

Stored size: 688 Bytes

Contents

module DataMigrate
  module Tasks
    module DataMigrateTasks
      extend self
      def migrations_paths
        @migrations_paths ||= DataMigrate.config.data_migrations_path
      end

      def migrate
        DataMigrate::DataMigrator.assure_data_schema_table
        target_version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
        if (Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR == 2) ||
          Rails::VERSION::MAJOR == 6
          DataMigrate::MigrationContext.new(migrations_paths).migrate(target_version)
        else
          DataMigrate::DataMigrator.migrate(migrations_paths, ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
data_migrate-6.2.0 lib/data_migrate/tasks/data_migrate_tasks.rb
data_migrate-6.1.0 lib/data_migrate/tasks/data_migrate_tasks.rb
data_migrate-6.0.7 lib/data_migrate/tasks/data_migrate_tasks.rb
data_migrate-6.0.6 lib/data_migrate/tasks/data_migrate_tasks.rb
data_migrate-6.0.5 lib/data_migrate/tasks/data_migrate_tasks.rb
data_migrate-6.0.4.beta lib/data_migrate/tasks/data_migrate_tasks.rb
data_migrate-6.0.3.beta lib/data_migrate/tasks/data_migrate_tasks.rb
data_migrate-6.0.1.beta lib/data_migrate/tasks/data_migrate_tasks.rb
data_migrate-6.0.0.beta lib/data_migrate/tasks/data_migrate_tasks.rb