Exception: Neo4j::PendingMigrationError

Inherits:
MigrationError show all
Defined in:
lib/neo4j/errors.rb

Overview

Inspired/taken from active_record/migration.rb

Instance Method Summary collapse

Constructor Details

#initialize(migrations) ⇒ PendingMigrationError

Returns a new instance of PendingMigrationError.



37
38
39
40
41
42
43
44
# File 'lib/neo4j/errors.rb', line 37

def initialize(migrations)
  pending_migrations = migrations.join("\n")
  if rails? && defined?(Rails.env)
    super("Migrations are pending:\n#{pending_migrations}\n To resolve this issue, run:\n\n        #{command_name} neo4j:migrate RAILS_ENV=#{::Rails.env}")
  else
    super("Migrations are pending:\n#{pending_migrations}\n To resolve this issue, run:\n\n        #{command_name} neo4j:migrate")
  end
end