Sha256: c77ab752146f266f2bb0f61e6eecd0eaf8218b3132f28b9653147c76a3f1b185

Contents?: true

Size: 307 Bytes

Versions: 5

Compression:

Stored size: 307 Bytes

Contents

# frozen_string_literal: true

require_relative 'database_adapter'

class Mysql2Adapter < DatabaseAdapter
  def reset_database!
    ActiveRecord::Base.connection.execute("SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = '#{@database}';")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
activerecord_json_validator-3.0.0 spec/support/macros/database/mysql_adapter.rb
activerecord_json_validator-2.1.5 spec/support/macros/database/mysql_adapter.rb
activerecord_json_validator-2.1.4 spec/support/macros/database/mysql_adapter.rb
activerecord_json_validator-2.1.3 spec/support/macros/database/mysql_adapter.rb
activerecord_json_validator-2.1.2 spec/support/macros/database/mysql_adapter.rb