diff options
author | Yasuo Honda <yasuo.honda@gmail.com> | 2018-09-12 23:16:43 +0000 |
---|---|---|
committer | Yasuo Honda <yasuo.honda@gmail.com> | 2018-09-13 12:11:37 +0000 |
commit | 70043da86a3510063c668061bd84d1661188d3e8 (patch) | |
tree | 13ac439f72ca948d2810fa3f73a82b6f8e345d8d /activerecord | |
parent | be021a809c29b79a501ae7e0146c08a39d963e48 (diff) | |
download | rails-70043da86a3510063c668061bd84d1661188d3e8.tar.gz rails-70043da86a3510063c668061bd84d1661188d3e8.tar.bz2 rails-70043da86a3510063c668061bd84d1661188d3e8.zip |
Raise an exception if :charset is not specified and large prefixes / utf8mb4 are not supported
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb index ebfb33005c..982a38d6e1 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -263,7 +263,7 @@ module ActiveRecord elsif supports_longer_index_key_prefix? execute "CREATE DATABASE #{quote_table_name(name)} DEFAULT CHARACTER SET `utf8mb4`" else - execute "CREATE DATABASE #{quote_table_name(name)} DEFAULT CHARACTER SET `utf8`" + raise "Configure a supported :charset and ensure innodb_large_prefix is enabled to support indexes on varchar(255) string columns." end end |