Skip to content

Instantly share code, notes, and snippets.

@wreimers
wreimers / monkeypatch_mysql2_adapter.rb
Created December 14, 2011 23:03
A Rails 3.1 initializer to monkeypatch the mysql2 AR adapter.
ActiveRecord::Base.connection.execute("SELECT 1")
module ActiveRecord
module ConnectionAdapters
class Mysql2Adapter
def create_table(table_name, options = {})
super(table_name, options.reverse_merge(:options => "ENGINE=ndbcluster"))
end
end
end