Sha256: 9162e671810571382072793bb2b75b6076bf7166eb95a8f79524c5bb0369f1b8
Contents?: true
Size: 887 Bytes
Versions: 1
Compression:
Stored size: 887 Bytes
Contents
require 'active_record/connection_adapters/abstract_mysql_adapter' module Ridgepole module Ext module AbstractMysqlAdapter def add_index(table_name, column_name, options = {}) index_name, index_type, index_columns, index_options, index_algorithm, index_using = add_index_options(table_name, column_name, options) # cannot specify index_algorithm execute "ALTER TABLE #{quote_table_name(table_name)} ADD #{index_type} INDEX #{quote_column_name(index_name)} #{index_using} (#{index_columns})#{index_options}" end def remove_index!(table_name, index_name) execute "ALTER TABLE #{quote_table_name(table_name)} DROP INDEX #{quote_column_name(index_name)}" end end end end module ActiveRecord module ConnectionAdapters class AbstractMysqlAdapter include Ridgepole::Ext::AbstractMysqlAdapter end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ridgepole-0.6.4.beta6 | lib/ridgepole/ext/abstract_mysql_adapter.rb |