From a5d2933fd332655a289d4a6fe57d722491a183f1 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 30 Nov 2023 13:36:47 -0500 Subject: Fix mysql behaviour with long strings --- config/initializers/mysql_utf8mb4_fix.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 config/initializers/mysql_utf8mb4_fix.rb (limited to 'config/initializers') 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 @@ +require 'active_record/connection_adapters/abstract_mysql_adapter' + +module ActiveRecord + module ConnectionAdapters + class AbstractMysqlAdapter + NATIVE_DATABASE_TYPES[:string] = { :name => "varchar", :limit => 191 } + end + end +end -- cgit 1.4.1