1. kamipo
Changes in tags
-Rails
3.2.8
-MySQL
5.6.8
Changes in body
Source | HTML | Preview
@@ -42,11 +42,11 @@
ActiveSupport.on_load :active_record do
module ActiveRecord::ConnectionAdapters
class AbstractMysqlAdapter
def create_table_with_innodb_row_format(table_name, options = {})
- table_options = options.reverse_merge(:options => 'ENGINE=InnoDB ROW_FORMAT=DYNAMIC')
+ table_options = options.merge(:options => 'ENGINE=InnoDB ROW_FORMAT=DYNAMIC')
create_table_without_innodb_row_format(table_name, table_options) do |td|
yield td if block_given?
end
end
alias_method_chain :create_table, :innodb_row_format
@@ -57,6 +57,6 @@
```
これでとりあえずutf8mb4で動きます!
### 参考
-- [MySQL(InnoDB) で "Index column size too large. The maximum column size is 767 bytes." いわれるときの対策 - かみぽわーる](http://blog.kamipo.net/entry/2012/11/13/102024)
+- [MySQL(InnoDB) で "Index column size too large. The maximum column size is 767 bytes." いわれるときの対策 - かみぽわーる](http://blog.kamipo.net/entry/2012/11/13/102024)