Exception: ActiveGraph::PendingMigrationError

Inherits:
MigrationError show all
Defined in:
lib/active_graph/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/active_graph/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