Move db engine changing into db adaptor monkeypatch

This commit is contained in:
Andy Allan 2008-11-08 18:04:36 +00:00
parent c19d1b406b
commit 91374368fa
4 changed files with 12 additions and 4 deletions

View file

@ -73,6 +73,14 @@ module ActiveRecord
def innodb_table
return { :id => false, :force => true, :options => "ENGINE=InnoDB" }
end
def innodb_option
return "ENGINE=InnoDB"
end
def change_engine (table_name, engine)
execute "ALTER TABLE #{table_name} ENGINE = #{engine}"
end
end
end
end