diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-11-30 13:36:47 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-11-30 13:36:47 -0500 |
commit | a5d2933fd332655a289d4a6fe57d722491a183f1 (patch) | |
tree | 1b6b7c2223b387ac3fa43c09a6a0d24db4734994 /config/initializers | |
parent | 0929719a845897cc8567cf972e07a69a71f0fa6f (diff) | |
download | wittle-a5d2933fd332655a289d4a6fe57d722491a183f1.tar.gz wittle-a5d2933fd332655a289d4a6fe57d722491a183f1.tar.bz2 wittle-a5d2933fd332655a289d4a6fe57d722491a183f1.zip |
Fix mysql behaviour with long strings
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/mysql_utf8mb4_fix.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config/initializers/mysql_utf8mb4_fix.rb b/config/initializers/mysql_utf8mb4_fix.rb new file mode 100644 index 0000000..8388027 --- /dev/null +++ b/config/initializers/mysql_utf8mb4_fix.rb | |||
@@ -0,0 +1,9 @@ | |||
1 | require 'active_record/connection_adapters/abstract_mysql_adapter' | ||
2 | |||
3 | module ActiveRecord | ||
4 | module ConnectionAdapters | ||
5 | class AbstractMysqlAdapter | ||
6 | NATIVE_DATABASE_TYPES[:string] = { :name => "varchar", :limit => 191 } | ||
7 | end | ||
8 | end | ||
9 | end | ||