Module: ActiveGraph::Migrations

Extended by:
ActiveSupport::Autoload
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.



20
21
22
# File 'lib/active_graph/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/active_graph/migrations.rb', line 12

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



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

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