Sha256: 8a39b026a98285046f9cd4c6e7d910962ed4cbb6e28c1ff2007d7af04072b69b
Contents?: true
Size: 604 Bytes
Versions: 6
Compression:
Stored size: 604 Bytes
Contents
module TestData class InsertsTestData def initialize @config = TestData.config @statistics = TestData.statistics end def call search_path = connection.execute("show search_path").first["search_path"] connection.disable_referential_integrity do connection.execute(File.read(@config.data_dump_full_path)) end connection.execute <<~SQL select pg_catalog.set_config('search_path', '#{search_path}', false) SQL @statistics.count_load! end private def connection ActiveRecord::Base.connection end end end
Version data entries
6 entries across 6 versions & 1 rubygems