Module: ActiveGraph::Migrations

Defined in:
lib/active_graph/migrations.rb,
lib/active_graph/migrations/base.rb,
lib/active_graph/migrations/runner.rb,
lib/active_graph/migrations/schema.rb,
lib/active_graph/migrations/helpers.rb,
lib/active_graph/migrations/check_pending.rb,
lib/active_graph/migrations/helpers/schema.rb,
lib/active_graph/migrations/migration_file.rb,
lib/active_graph/migrations/schema_migration.rb,
lib/active_graph/migrations/helpers/id_property.rb,
lib/active_graph/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.



12
13
14
# File 'lib/active_graph/migrations.rb', line 12

def currently_running_migrations
  @currently_running_migrations
end

Class Method Details

.check_for_pending_migrations!Object



4
5
6
7
8
9
10
# File 'lib/active_graph/migrations.rb', line 4

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

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

.maintain_test_schema!Object



14
15
16
# File 'lib/active_graph/migrations.rb', line 14

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