Exception: ActiveRecord::PendingMigrationError
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
MigrationError ,
ActiveRecordError ,
StandardError
|
|
Instance Chain:
|
|
Inherits: |
ActiveRecord::MigrationError
|
Defined in: | activerecord/lib/active_record/migration.rb |
::ActiveSupport::ActionableError
- Attributes & Methods
- ._actions rw
- #_actions rw
- ._actions? ⇒ Boolean rw
- #_actions? ⇒ Boolean rw
Class Method Summary
MigrationError
- Inherited
Instance Method Summary
- #connection_pool private
- #detailed_migration_message(pending_migrations) private
Constructor Details
.new(message = nil, pending_migrations: nil) ⇒ PendingMigrationError
# File 'activerecord/lib/active_record/migration.rb', line 159
def initialize( = nil, pending_migrations: nil) if pending_migrations.nil? pending_migrations = connection_pool.migration_context.open.pending_migrations end super( || (pending_migrations)) end
Class Attribute Details
._actions (rw)
[ GitHub ]# File 'activesupport/lib/active_support/actionable_error.rb', line 17
class_attribute :_actions, default: {}
._actions? ⇒ Boolean
(rw)
[ GitHub ]
# File 'activesupport/lib/active_support/actionable_error.rb', line 17
class_attribute :_actions, default: {}
Instance Attribute Details
#_actions (rw)
[ GitHub ]# File 'activesupport/lib/active_support/actionable_error.rb', line 17
class_attribute :_actions, default: {}
#_actions? ⇒ Boolean
(rw)
[ GitHub ]
# File 'activesupport/lib/active_support/actionable_error.rb', line 17
class_attribute :_actions, default: {}
Instance Method Details
#connection_pool (private)
[ GitHub ]# File 'activerecord/lib/active_record/migration.rb', line 182
def connection_pool ActiveRecord::Tasks::DatabaseTasks.migration_connection_pool end
#detailed_migration_message(pending_migrations) (private)
[ GitHub ]# File 'activerecord/lib/active_record/migration.rb', line 168
def (pending_migrations) = "Migrations are pending. To resolve this issue, run:\n\n bin/rails db:migrate" += " RAILS_ENV=#{::Rails.env}" if defined?(Rails.env) && !Rails.env.local? += "\n\n" += "You have #{pending_migrations.size} pending #{pending_migrations.size > 1 ? 'migrations:' : 'migration:'}\n\n" pending_migrations.each do |pending_migration| += "#{pending_migration.filename}\n" end end