From 4951de8358a24ed8b874f7f27da724df04473857 Mon Sep 17 00:00:00 2001 From: c_meyer <998475a2-a9e1-483a-a46a-8f34462b7f5b@localhost> Date: Wed, 24 May 2023 19:09:38 +0200 Subject: [PATCH] abstract_mysql2_adapter Behebt Problem beim Erstellen der Datenbank https://stackoverflow.com/questions/37315546/uninitialized-constant-activerecordconnectionadaptersmysql2adapternative-d --- config/initializers/abstract_mysql2_adapter.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 config/initializers/abstract_mysql2_adapter.rb diff --git a/config/initializers/abstract_mysql2_adapter.rb b/config/initializers/abstract_mysql2_adapter.rb new file mode 100644 index 0000000..f1b6251 --- /dev/null +++ b/config/initializers/abstract_mysql2_adapter.rb @@ -0,0 +1,6 @@ +require 'active_record/connection_adapters/mysql2_adapter' +NativeDbTypesOverride.configure({ + ActiveRecord::ConnectionAdapters::Mysql2Adapter => { + primary_key: "int(11) auto_increment PRIMARY KEY" + } +}) \ No newline at end of file