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-7.2.3 lib/neo4j/tasks/migration.rake
neo4j-7.2.2 lib/neo4j/tasks/migration.rake
neo4j-7.1.4 lib/neo4j/tasks/migration.rake
neo4j-7.0.16 lib/neo4j/tasks/migration.rake
neo4j-7.2.1 lib/neo4j/tasks/migration.rake
neo4j_legacy-7.2.0.2 lib/neo4j/tasks/migration.rake
neo4j_legacy-7.2.0.1 lib/neo4j/tasks/migration.rake
neo4j-7.2.0 lib/neo4j/tasks/migration.rake
neo4j-7.1.3 lib/neo4j/tasks/migration.rake
neo4j-7.0.15 lib/neo4j/tasks/migration.rake
neo4j-7.1.2 lib/neo4j/tasks/migration.rake
neo4j-7.1.1 lib/neo4j/tasks/migration.rake
neo4j-7.1.0 lib/neo4j/tasks/migration.rake
neo4j-7.0.14 lib/neo4j/tasks/migration.rake
neo4j-7.0.13 lib/neo4j/tasks/migration.rake
neo4j-7.0.12 lib/neo4j/tasks/migration.rake
neo4j-7.0.11 lib/neo4j/tasks/migration.rake
neo4j-7.0.10 lib/neo4j/tasks/migration.rake
neo4j-7.0.9 lib/neo4j/tasks/migration.rake
neo4j-7.0.8 lib/neo4j/tasks/migration.rake