Module: Ridgepole::ExtTidb::DumpPatch
- Defined in:
- lib/ridgepole/ext_tidb/dump_patch.rb
Instance Method Summary collapse
Instance Method Details
#dump(*args) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ridgepole/ext_tidb/dump_patch.rb', line 6 def dump(*args) dsl = super conn = ActiveRecord::Base.connection return dsl unless conn.respond_to?(:tidb?) && conn.tidb? begin tables = conn.tables rescue StandardError return dsl end tables.each do |table| extras = (conn, table) next if extras.empty? # inject into create_table line dsl = (dsl, table, extras) end dsl end |