aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-08-20 23:32:41 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-08-22 19:18:29 +0900
commit815dd11bc5b6988b55573530644de93aefefa1b4 (patch)
treec4b35396b375c123e9b54dd28e680b63f41e25ca /activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb
parentf2099361da05dd6890c733e5aecdce4cd52efdff (diff)
downloadrails-815dd11bc5b6988b55573530644de93aefefa1b4.tar.gz
rails-815dd11bc5b6988b55573530644de93aefefa1b4.tar.bz2
rails-815dd11bc5b6988b55573530644de93aefefa1b4.zip
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.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb4
1 files changed, 4 insertions, 0 deletions
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"]