Move db engine changing into db adaptor monkeypatch
This commit is contained in:
parent
c19d1b406b
commit
91374368fa
4 changed files with 12 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue