From 815dd11bc5b6988b55573530644de93aefefa1b4 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 20 Aug 2017 23:32:41 +0900 Subject: Refactor `SchemaDumper` to make it possible to adapter specific customization Currently `SchemaDumper` is only customizable for column options. But 3rd party connection adapters (oracle-enhanced etc) need to customizable for table or index dumping also. To make it possible, I introduced adapter specific `SchemaDumper` classes for that. --- .../lib/active_record/connection_adapters/mysql/schema_statements.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb') diff --git a/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb index 7bebe82065..759493e3bd 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb @@ -66,6 +66,10 @@ module ActiveRecord MySQL::Table.new(table_name, base) end + def create_schema_dumper(options) + MySQL::SchemaDumper.create(self, options) + end + private CHARSETS_OF_4BYTES_MAXLEN = ["utf8mb4", "utf16", "utf16le", "utf32"] -- cgit v1.2.3