mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Made migrations create InnoDB tables per default
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1168 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
9dd8d3d3e4
commit
0baf344457
2 changed files with 6 additions and 2 deletions
|
@ -378,8 +378,8 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
def create_table(name)
|
||||
execute "CREATE TABLE #{name} (id #{native_database_types[:primary_key]})"
|
||||
def create_table(name, options = "")
|
||||
execute "CREATE TABLE #{name} (id #{native_database_types[:primary_key]}) #{options}"
|
||||
table_definition = yield TableDefinition.new
|
||||
table_definition.columns.each { |column_name, type, options| add_column(name, column_name, type, options) }
|
||||
end
|
||||
|
|
|
@ -191,6 +191,10 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
|
||||
def create_table(name)
|
||||
super(name, "ENGINE=InnoDB")
|
||||
end
|
||||
|
||||
private
|
||||
def select(sql, name = nil)
|
||||
result = nil
|
||||
|
|
Loading…
Reference in a new issue