class method self.migration_strategy

Ruby on Rails edge

Since edge

Allows configuration of migration strategy per adapter type. When set on a specific adapter class (e.g., PostgreSQLAdapter), all migrations using that adapter will use the specified strategy instead of the global ActiveRecord.migration_strategy.

ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.migration_strategy = CustomPostgresStrategy
ActiveRecord::ConnectionAdapters::Mysql2Adapter.migration_strategy = CustomMySQLStrategy
Source
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 44
      class_attribute :migration_strategy, instance_writer: false

Defined in activerecord/lib/active_record/connection_adapters/abstract_adapter.rb line 44 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::AbstractAdapter

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close