@@ -63,6 +63,15 @@ module ActiveRecord::ConnectionAdapters |
||
| 63 | 63 |
end |
| 64 | 64 |
} |
| 65 | 65 |
end |
| 66 |
+ |
|
| 67 |
+ def create_database(name, options = {})
|
|
| 68 |
+ # utf8mb4 is used in column definitions; use utf8 for |
|
| 69 |
+ # databases. |
|
| 70 |
+ if options[:charset] == 'utf8mb4' |
|
| 71 |
+ options = options.merge(charset: 'utf8') |
|
| 72 |
+ end |
|
| 73 |
+ super(name, options) |
|
| 74 |
+ end |
|
| 66 | 75 |
end |
| 67 | 76 |
|
| 68 | 77 |
prepend CharsetSupport |