Sha256: 4779231f80791187cd1e0064e15f9c284152e0d57ac4a4c8c2a0527615ec0224

Contents?: true

Size: 754 Bytes

Versions: 72

Compression:

Stored size: 754 Bytes

Contents

require 'neo4j/migration'

namespace :neo4j do
  desc 'Run a script against the database to perform system-wide changes'
  task :migrate, [:task_name, :subtask] => :environment do |_, args|
    path = Rake.original_dir
    migration_task = args[:task_name]
    task_name_constant = migration_task.split('_').map(&:capitalize).join('')
    begin
      migration_class = "Neo4j::Migration::#{task_name_constant}".constantize
    rescue NameError
      load File.join(path, 'db', 'neo4j-migrate', "#{migration_task}.rb")
      migration_class = "#{task_name_constant}".constantize
    end
    migration = migration_class.new(path)

    subtask = args[:subtask]
    if subtask
      migration.send(subtask)
    else
      migration.migrate
    end
  end
end

Version data entries

72 entries across 72 versions & 2 rubygems

Version Path
neo4j-6.0.7 lib/neo4j/tasks/migration.rake
neo4j-7.0.0.rc.1 lib/neo4j/tasks/migration.rake
neo4j-6.1.8 lib/neo4j/tasks/migration.rake
neo4j-6.1.7 lib/neo4j/tasks/migration.rake
neo4j-6.1.6 lib/neo4j/tasks/migration.rake
neo4j-6.1.5 lib/neo4j/tasks/migration.rake
neo4j-6.1.4 lib/neo4j/tasks/migration.rake
neo4j-6.1.3 lib/neo4j/tasks/migration.rake
neo4j-6.1.2 lib/neo4j/tasks/migration.rake
neo4j-6.0.6 lib/neo4j/tasks/migration.rake
neo4j-6.1.1 lib/neo4j/tasks/migration.rake
neo4j-6.1.0 lib/neo4j/tasks/migration.rake
neo4j-6.0.5 lib/neo4j/tasks/migration.rake
neo4j-6.0.4 lib/neo4j/tasks/migration.rake
neo4j-6.0.3 lib/neo4j/tasks/migration.rake
neo4j-6.0.2 lib/neo4j/tasks/migration.rake
neo4j-6.0.1 lib/neo4j/tasks/migration.rake
neo4j-6.0.0 lib/neo4j/tasks/migration.rake
neo4j-6.0.0.rc.4 lib/neo4j/tasks/migration.rake
neo4j-6.0.0.rc.3 lib/neo4j/tasks/migration.rake