Exception: Neo4j::PendingMigrationError
- Inherits:
-
MigrationError
- Object
- StandardError
- Error
- MigrationError
- Neo4j::PendingMigrationError
- Defined in:
- lib/neo4j/errors.rb
Overview
Inspired/taken from active_record/migration.rb
Instance Method Summary collapse
-
#initialize(migrations) ⇒ PendingMigrationError
constructor
A new instance of PendingMigrationError.
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 |