Module: Neo4j::Migrations

Extended by:
ActiveSupport::Autoload
Defined in:
lib/neo4j/migrations.rb,
lib/neo4j/migrations/base.rb,
lib/neo4j/migrations/runner.rb,
lib/neo4j/migrations/schema.rb,
lib/neo4j/migrations/helpers.rb,
lib/neo4j/migrations/check_pending.rb,
lib/neo4j/migrations/helpers/schema.rb,
lib/neo4j/migrations/migration_file.rb,
lib/neo4j/migrations/schema_migration.rb,
lib/neo4j/migrations/helpers/id_property.rb,
lib/neo4j/migrations/helpers/relationships.rb

Defined Under Namespace

Modules: Helpers, Schema Classes: Base, CheckPending, MigrationFile, Runner, SchemaMigration

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.currently_running_migrationsObject

Returns the value of attribute currently_running_migrations.



20
21
22
# File 'lib/neo4j/migrations.rb', line 20

def currently_running_migrations
  @currently_running_migrations
end

Class Method Details

.check_for_pending_migrations!Object



12
13
14
15
16
17
18
# File 'lib/neo4j/migrations.rb', line 12

def check_for_pending_migrations!
  return if Neo4j::Config.configuration['skip_migration_check']

  runner = Neo4j::Migrations::Runner.new
  pending = runner.pending_migrations
  fail ::Neo4j::PendingMigrationError, pending if pending.any?
end

.maintain_test_schema!Object



22
23
24
# File 'lib/neo4j/migrations.rb', line 22

def maintain_test_schema!
  Neo4j::Migrations::Runner.new(silenced: true).all
end