Permalink
Browse files

Made migrations create InnoDB tables per default

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1168 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 9dd8d3d commit 0baf3444579a3fac780b58471db00045a9ac7cc5 @dhh dhh committed Apr 16, 2005
@@ -378,8 +378,8 @@ def initialize_schema_information
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
@@ -190,6 +190,10 @@ def create_database(name)
execute "CREATE DATABASE #{name}"
end
+
+ def create_table(name)
+ super(name, "ENGINE=InnoDB")
+ end
private
def select(sql, name = nil)

0 comments on commit 0baf344

Please sign in to comment.