class method
self.migration_strategy
Ruby on Rails edge
Since edgeAllows 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