Module: SchemaPlusPgIndexes::Middleware::Postgresql::Migration::Index

Defined in:
lib/schema_plus_pg_indexes/middleware/postgresql/migration.rb

Instance Method Summary collapse

Instance Method Details

#before(env) ⇒ Object

Deprecate args



8
9
10
11
12
13
14
15
# File 'lib/schema_plus_pg_indexes/middleware/postgresql/migration.rb', line 8

def before(env)
  {:conditions => :where, :kind => :using}.each do |deprecated, proper|
    if env.options[deprecated]
      ActiveSupport::Deprecation.warn "ActiveRecord index option #{deprecated.inspect} is deprecated, use #{proper.inspect} instead"
      env.options[proper] = env.options.delete(deprecated)
    end
  end
end